PU2CLR Si4735 Arduino Library  1.1.9
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Si47XX device Mode, Band and Frequency setup

Functions

void SI4735::setMaxDelaySetFrequency (uint16_t ms)
 Set the Max Delay after Set Frequency. More...
 
void SI4735::setFrequencyStep (uint16_t step)
 Sets the current step value. More...
 
void SI4735::setTuneFrequencyAntennaCapacitor (uint16_t capacitor)
 Only FM. Freeze Metrics During Alternate Frequency Jump. More...
 
void SI4735::setFrequency (uint16_t)
 Set the frequency to the corrent function of the Si4735 (FM, AM or SSB) More...
 
void SI4735::frequencyUp ()
 Increments the current frequency on current band/function by using the current step. More...
 
void SI4735::frequencyDown ()
 Decrements the current frequency on current band/function by using the current step. More...
 
void SI4735::setAM ()
 Sets the radio to AM function. It means: LW MW and SW. More...
 
void SI4735::setFM ()
 Sets the radio to FM function. More...
 
void SI4735::setAM (uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step)
 Sets the radio to AM (LW/MW/SW) function. More...
 
void SI4735::setFM (uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step)
 Sets the radio to FM function. More...
 
bool SI4735::isCurrentTuneFM ()
 Returns true if the current function is FM (FM_TUNE_FREQ). More...
 
bool SI4735::isCurrentTuneAM ()
 Returns true if the current function is AM (AM_TUNE_FREQ). More...
 
bool SI4735::isCurrentTuneSSB ()
 Returns true if the current function is SSB (SSB_TUNE_FREQ). More...
 

Detailed Description

Function Documentation

◆ setMaxDelaySetFrequency()

void SI4735::setMaxDelaySetFrequency ( uint16_t  ms)
inline

Set the Max Delay after Set Frequency.

After the set frequency command, the system need a time to get ready to the next set frequency (default value 30ms).

Why the waitToSend() does not work in this case? No idea for while!

A low value makes the getFrequency command inaccurate.

See also
MAX_DELAY_AFTER_POWERUP
Parameters
ms

◆ setFrequencyStep()

void SI4735::setFrequencyStep ( uint16_t  step)
inline

Sets the current step value.

This function does not check the limits of the current band. Please, don't take a step bigger than your legs.

Example:

setFM(6400,10800,10390,10);
setFrequencyStep(100); // the step will be 1MHz (you are using FM mode)
.
.
.
setAM(7000,7600,7100,5);
setFrequencyStep(1); // the step will be 1KHz (you are usin AM or SSB mode)
See also
setFM()
setAM()
setSSB()
Parameters
stepif you are using FM, 10 means 100KHz. If you are using AM 10 means 10KHz For AM, 1 (1KHz) to 1000 (1MHz) are valid values. For FM 5 (50KHz), 10 (100KHz) and 100 (1MHz) are valid values.

◆ setTuneFrequencyAntennaCapacitor()

void SI4735::setTuneFrequencyAntennaCapacitor ( uint16_t  capacitor)

Only FM. Freeze Metrics During Alternate Frequency Jump.

Selects the tuning capacitor value.

On FM mode, The Antenna Tuning Capacitor is valid only when using TXO/LPI pin as the antenna input. This selects the value of the antenna tuning capacitor manually, or automatically if set to zero. The valid range is 0 to 191. Automatic capacitor tuning is recommended. Whentunedmanually,thevaractorisoffsetbyfourcodes. Forexample,if the varactor is set to a value of 5 manually, when read back the value will be 1. The four codes (1pf) delta accounts for the capacitance at the chip.

on AM mode, If the value is set to anything other than 0, the tuning capacitance is manually set as 95 fF x ANTCAP + 7 pF. ANTCAP manual range is 1–6143. Automatic capacitor tuning is recommended. In SW mode, ANTCAPH[15:8] (high byte) needs to be set to 0 and ANTCAPL[7:0] (low byte) needs to be set to 1.

See also
Si47XX PROGRAMMING GUIDE; AN332; pages 71 and 136
Parameters
capacitorIf zero, the tuning capacitor value is selected automatically. If the value is set to anything other than 0: AM - the tuning capacitance is manually set as 95 fF x ANTCAP + 7 pF. ANTCAP manual range is 1–6143; FM - the valid range is 0 to 191.
According to Silicon Labs, automatic capacitor tuning is recommended (value 0).

◆ setFrequency()

void SI4735::setFrequency ( uint16_t  freq)

Set the frequency to the corrent function of the Si4735 (FM, AM or SSB)

You have to call setup or setPowerUp before call setFrequency.

See also
maxDelaySetFrequency()
MAX_DELAY_AFTER_SET_FREQUENCY
Si47XX PROGRAMMING GUIDE; AN332; pages 70, 135
AN332 REV 0.8 UNIVERSAL PROGRAMMING GUIDE; page 13
Parameters
uint16_tfreq is the frequency to change. For example, FM => 10390 = 103.9 MHz; AM => 810 = 810 KHz.

References SI4735::waitToSend().

◆ frequencyUp()

void SI4735::frequencyUp ( )

Increments the current frequency on current band/function by using the current step.

See also
setFrequencyStep()

◆ frequencyDown()

void SI4735::frequencyDown ( )

Decrements the current frequency on current band/function by using the current step.

See also
setFrequencyStep()

◆ setAM() [1/2]

void SI4735::setAM ( )

Sets the radio to AM function. It means: LW MW and SW.

Todo:
Adjust the power up parameters

Define the band range you want to use for the AM mode.

See also
Si47XX PROGRAMMING GUIDE; AN332; page 129.

References SI4735::powerDown(), and SI4735::radioPowerUp().

Referenced by SI4735::setAM().

◆ setFM() [1/2]

void SI4735::setFM ( )

Sets the radio to FM function.

Todo:
Adjust the power up parameters
See also
Si47XX PROGRAMMING GUIDE; AN332; page 64.

References SI4735::disableFmDebug(), SI4735::powerDown(), and SI4735::radioPowerUp().

Referenced by SI4735::setFM().

◆ setAM() [2/2]

void SI4735::setAM ( uint16_t  fromFreq,
uint16_t  toFreq,
uint16_t  initialFreq,
uint16_t  step 
)

Sets the radio to AM (LW/MW/SW) function.

The example below sets the band from 550KHz to 1750KHz on AM mode. The band will start on 810KHz and step is 10KHz.

si4735.setAM(520, 1750, 810, 10);
See also
setFM()
setSSB()
Parameters
fromFreqminimum frequency for the band
toFreqmaximum frequency for the band
initialFreqinitial frequency
stepstep used to go to the next channel

References SI4735::setAM().

◆ setFM() [2/2]

void SI4735::setFM ( uint16_t  fromFreq,
uint16_t  toFreq,
uint16_t  initialFreq,
uint16_t  step 
)

Sets the radio to FM function.

Defines the band range you want to use for the FM mode.

The example below sets the band from 64MHz to 108MHzKHz on FM mode. The band will start on 103.9MHz and step is 100KHz. On FM mode, the step 10 means 100KHz. If you want a 1MHz step, use 100.

si4735.setFM(6400, 10800, 10390, 10);
See also
Si47XX PROGRAMMING GUIDE; AN332; pages 70
setFM()
setFrequencyStep()
Parameters
fromFreqminimum frequency for the band
toFreqmaximum frequency for the band
initialFreqinitial frequency (default frequency)
stepstep used to go to the next channel

References SI4735::setFM().

◆ isCurrentTuneFM()

bool SI4735::isCurrentTuneFM ( )

Returns true if the current function is FM (FM_TUNE_FREQ).

Returns
true if the current function is FM (FM_TUNE_FREQ).

◆ isCurrentTuneAM()

bool SI4735::isCurrentTuneAM ( )

Returns true if the current function is AM (AM_TUNE_FREQ).

Returns
true if the current function is AM (AM_TUNE_FREQ).

◆ isCurrentTuneSSB()

bool SI4735::isCurrentTuneSSB ( )

Returns true if the current function is SSB (SSB_TUNE_FREQ).

Returns
true if the current function is SSB (SSB_TUNE_FREQ).
SI4735::setFM
void setFM()
Sets the radio to FM function.
Definition: SI4735.cpp:724
SI4735::setFrequencyStep
void setFrequencyStep(uint16_t step)
Sets the current step value.
Definition: SI4735.h:1662