PU2CLR Si4735 Arduino Library 2.1.4
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
Functions | |
bool | SI4735::getSignalQualityInterrupt () |
Get the Signal Quality Interrupt status. | |
bool | SI4735::getRadioDataSystemInterrupt () |
Get the Radio Data System (RDS) Interrupt status. | |
bool | SI4735::getTuneCompleteTriggered () |
Get the Tune Complete status. | |
bool | SI4735::getStatusError () |
Get the Status Error. | |
bool | SI4735::getStatusCTS () |
Gets the Error flag Clear to Send. | |
bool | SI4735::getACFIndicator () |
Returns true if the AFC rails (AFC Rail Indicator). | |
bool | SI4735::getBandLimit () |
Returns true if a seek hit the band limit. | |
bool | SI4735::getStatusValid () |
Gets the channel status. | |
uint8_t | SI4735::getReceivedSignalStrengthIndicator () |
Returns the value of Received Signal Strength Indicator (dBμV). | |
uint8_t | SI4735::getStatusSNR () |
Gets the SNR metric when tune is complete (dB) | |
uint8_t | SI4735::getStatusMULT () |
Get the Status the M U L T. | |
bool | SI4735::isAgcEnabled () |
Checks if the AGC is enabled. | |
uint8_t | SI4735::getAgcGainIndex () |
Gets the current AGC gain index. | |
void | SI4735::setAGC (uint8_t AGCDIS, uint8_t AGCIDX) |
Automatic Gain Control setup (alternative name for setAutomaticGainControl ) | |
uint8_t | SI4735::getCurrentRSSI () |
Get the current receive signal strength (0–127 dBμV) | |
uint8_t | SI4735::getCurrentSNR () |
Gets the current SNR metric (0–127 dB). | |
bool | SI4735::getCurrentRssiDetectLow () |
Checks if RSSI detected is LOW. | |
bool | SI4735::getCurrentRssiDetectHigh () |
Checks if RSSI detected is high. | |
bool | SI4735::getCurrentSnrDetectLow () |
Checks if SNR detect is low. | |
bool | SI4735::getCurrentSnrDetectHigh () |
Checks if SNR detect is high. | |
bool | SI4735::getCurrentValidChannel () |
Checks if the current channel is valid. | |
bool | SI4735::getCurrentAfcRailIndicator () |
AFC Rail Indicator. | |
bool | SI4735::getCurrentSoftMuteIndicator () |
Soft Mute Indicator. | |
uint8_t | SI4735::getCurrentStereoBlend () |
Gets the value of the amount of stereo blend in % (100 = full stereo, 0 = full mono). | |
bool | SI4735::getCurrentPilot () |
Checks the current pilot. | |
uint8_t | SI4735::getCurrentMultipath () |
Gets the current Multipath. | |
uint8_t | SI4735::getCurrentSignedFrequencyOffset () |
Gets the Signed frequency offset (kHz). | |
bool | SI4735::getCurrentMultipathDetectLow () |
Get Multipath Detect Low. | |
bool | SI4735::getCurrentMultipathDetectHigh () |
Gets the Current Multipath Detect High. | |
bool | SI4735::getCurrentBlendDetectInterrupt () |
Gets the Current Blend Detect Interrupt. | |
void | SI4735::setFMDeEmphasis (uint8_t parameter) |
Sets the FM Receive de-emphasis to 50 or 75 μs. | |
void | SI4735::setFmSoftMuteMaxAttenuation (uint8_t smattn=0) |
Sets the Fm Soft Mute Max Attenuation. | |
void | SI4735::setAMDeEmphasis (uint8_t parameter) |
Sets the AM Receive de-emphasis to 50 or disable. | |
void | SI4735::setAMSoftMuteSlop (uint8_t parameter) |
Sets the AM attenuation slope during soft mute. | |
void | SI4735::setAMSoftMuteRate (uint8_t parameter) |
Sets the attack and decay rates when entering or leaving soft mute. | |
void | SI4735::setAMSoftMuteSnrThreshold (uint8_t parameter) |
Sets the SNR threshold to engage soft mute. | |
void | SI4735::setAMSoftMuteReleaseRate (uint8_t parameter) |
Sets the soft mute release rate. | |
void | SI4735::setAMSoftMuteAttackRate (uint16_t parameter) |
Sets the soft mute attack rate. | |
void | SI4735::setAmAgcAttackRate (uint16_t parameter) |
Sets the AGC attack rate. | |
void | SI4735::setAmAgcReleaseRate (uint16_t parameter) |
Sets the AGC release rate. | |
void | SI4735::setAMFrontEndAgcControl (uint8_t MIN_GAIN_INDEX, uint8_t ATTN_BACKUP) |
Adjusts the AM AGC for external front-end attenuator and external front-end cascode LNA. | |
bool | SI4735::isCurrentTuneAM () |
Returns true if the current function is AM (AM_TUNE_FREQ). | |
bool | SI4735::isCurrentTuneSSB () |
Returns true if the current function is SSB (SSB_TUNE_FREQ). | |
uint8_t | SI4735::getTuneFrequecyFast () |
Returns the FAST tuning status. | |
void | SI4735::setTuneFrequencyFast (uint8_t FAST) |
Sets the FAST Tuning. | |
uint8_t | SI4735::getTuneFrequecyFreeze () |
Returns the FREEZE status. | |
void | SI4735::setTuneFrequencyFreze (uint8_t FREEZE) |
Sets Freeze Metrics During Alternate Frequency Jum. | |
void | SI4735::setFrequencyUp () |
Set the FrequencyUp. | |
void | SI4735::setFrequencyDown () |
Set the Frequency Down. | |
void | SI4735::setMaxSeekTime (long time_in_ms) |
Sets the maximum time in milliseconds for seeking. The default value is 8000ms (8s). | |
void | SI4735::seekStationUp () |
Search for the next station. | |
void | SI4735::seekStationDown () |
Search the previous station. | |
void | SI4735::setSeekAmSrnThreshold (uint16_t value) |
Set the Seek Am Srn Threshold object. | |
void | SI4735::setSeekAmSNRThreshold (uint16_t value) |
Sets the SNR threshold for a valid AM Seek/Tune. | |
void | SI4735::setSeekFmSrnThreshold (uint16_t value) |
Set the Seek Fm Srn Threshold object. | |
void | SI4735::setSeekFmSNRThreshold (uint16_t value) |
Sets the SNR threshold for a valid FM Seek/Tune. | |
void | SI4735::setMaxDelaySetFrequency (uint16_t ms) |
Set the Max Delay after Set Frequency. | |
void | SI4735::setFrequencyStep (uint16_t step) |
Sets the current step value. | |
uint16_t | SI4735::getCurrentFrequency () |
Gets the current frequency saved in memory. | |
void | SI4735::getStatus () |
Gets the current status of the Si47XX (AM, FM or SSB) | |
void | SI4735::setTuneFrequencyAntennaCapacitor (uint16_t capacitor) |
Selects the tuning capacitor value. | |
void | SI4735::setFrequency (uint16_t) |
Set the frequency to the corrent function of the Si4735 (FM, AM or SSB) | |
void | SI4735::frequencyUp () |
Increments the current frequency on current band/function by using the current step. | |
void | SI4735::frequencyDown () |
Decrements the current frequency on current band/function by using the current step. | |
void | SI4735::setAM () |
Sets the radio to AM function. It means: LW MW and SW. | |
void | SI4735::setFM () |
Sets the radio to FM function. | |
void | SI4735::setAM (uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step) |
Sets the radio to AM (LW/MW/SW) function. | |
void | SI4735::setFM (uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step) |
Sets the radio to FM function. | |
void | SI4735::setBandwidth (uint8_t AMCHFLT, uint8_t AMPLFLT) |
Selects the bandwidth of the channel filter for AM reception. | |
uint16_t | SI4735::getFrequency (void) |
Gets the current frequency of the Si4735 (AM or FM) | |
void | SI4735::getStatus (uint8_t, uint8_t) |
Gets the current status of the Si4735 (AM or FM) | |
void | SI4735::getAutomaticGainControl () |
Queries Automatic Gain Control STATUS. | |
void | SI4735::setAutomaticGainControl (uint8_t AGCDIS, uint8_t AGCIDX) |
Automatic Gain Control setup. | |
void | SI4735::setAvcAmMaxGain (uint8_t gain=90) |
Sets the maximum gain for automatic volume control. | |
void | SI4735::getCurrentReceivedSignalQuality (uint8_t INTACK) |
Queries the status of the Received Signal Quality (RSQ) of the current channel. | |
void | SI4735::getCurrentReceivedSignalQuality (void) |
Queries the status of the Received Signal Quality (RSQ) of the current channel (FM_RSQ_STATUS) | |
void | SI4735::seekStation (uint8_t SEEKUP, uint8_t WRAP) |
Look for a station (Automatic tune) | |
void | SI4735::seekNextStation () |
Search for the next station. | |
void | SI4735::seekPreviousStation () |
Search the previous station. | |
void | SI4735::seekStationProgress (void(*showFunc)(uint16_t f), uint8_t up_down) |
Seeks a station up or down. | |
void | SI4735::seekStationProgress (void(*showFunc)(uint16_t f), bool(*stopSeking)(), uint8_t up_down) |
Seeks a station up or down. | |
void | SI4735::setSeekAmLimits (uint16_t bottom, uint16_t top) |
Sets the bottom frequency and top frequency of the AM band for seek. Default is 520 to 1710. | |
void | SI4735::setSeekFmLimits (uint16_t bottom, uint16_t top) |
Sets the bottom frequency and top frequency of the FM band for seek. Default is 8750 to 10790. | |
void | SI4735::setSeekAmSpacing (uint16_t spacing) |
Selects frequency spacingfor AM seek. Default is 10 kHz spacing. | |
void | SI4735::setSeekFmSpacing (uint16_t spacing) |
Selects frequency spacingfor FM seek. Default is 100 kHz (value 10) spacing. There are only 3 valid values: 5, 10, and 20. | |
void | SI4735::setSeekAmRssiThreshold (uint16_t value) |
Sets the RSSI threshold for a valid AM Seek/Tune. | |
void | SI4735::setSeekFmRssiThreshold (uint16_t value) |
Sets the RSSI threshold for a valid FM Seek/Tune. | |
|
inline |
Get the Signal Quality Interrupt status.
STATUS RESPONSE Set of methods to get current status information. Call them after getStatus or getFrequency or seekStation
|
inline |
Get the Radio Data System (RDS) Interrupt status.
|
inline |
Get the Tune Complete status.
Seek/Tune Complete Interrupt; 1 = Tune complete has been triggered.
|
inline |
Get the Status Error.
Return the Error flag (true or false) of status of the least Tune or Seek
|
inline |
Gets the Error flag Clear to Send.
|
inline |
Returns true if the AFC rails (AFC Rail Indicator).
|
inline |
Returns true if a seek hit the band limit.
(WRAP = 0 in FM_START_SEEK) or wrapped to the original frequency(WRAP = 1).
|
inline |
Gets the channel status.
Returns true if the channel is currently valid as determined by the seek/tune properties (0x1403, 0x1404, 0x1108)
|
inline |
Returns the value of Received Signal Strength Indicator (dBμV).
|
inline |
Gets the SNR metric when tune is complete (dB)
Returns the value of the SNR metric when tune is complete (dB).
|
inline |
Get the Status the M U L T.
Returns the value containing the multipath metric when tune is complete.
|
inline |
Checks if the AGC is enabled.
|
inline |
Gets the current AGC gain index.
|
inline |
Automatic Gain Control setup (alternative name for setAutomaticGainControl )
If FM, overrides AGC setting by disabling the AGC and forcing the LNA to have a certain gain that ranges between 0 (minimum attenuation) and 26 (maximum attenuation).
If AM/SSB, Overrides the AGC setting by disabling the AGC and forcing the gain index that ranges between 0 (minimum attenuation) and 37+ATTN_BACKUP (maximum attenuation).
uint8_t | AGCDIS This param selects whether the AGC is enabled or disabled (0 = AGC enabled; 1 = AGC disabled); |
uint8_t | AGCIDX AGC Index (0 = Minimum attenuation (max gain); 1 – 36 = Intermediate attenuation); if >greater than 36 - Maximum attenuation (min gain) ). |
|
inline |
Get the current receive signal strength (0–127 dBμV)
|
inline |
Gets the current SNR metric (0–127 dB).
|
inline |
Checks if RSSI detected is LOW.
|
inline |
Checks if RSSI detected is high.
|
inline |
Checks if SNR detect is low.
|
inline |
Checks if SNR detect is high.
|
inline |
Checks if the current channel is valid.
|
inline |
AFC Rail Indicator.
|
inline |
Soft Mute Indicator.
Indicates soft mute is engaged.
|
inline |
Gets the value of the amount of stereo blend in % (100 = full stereo, 0 = full mono).
|
inline |
Checks the current pilot.
Indicates stereo pilot presence.
|
inline |
Gets the current Multipath.
Contains the current multipath metric. (0 = no multipath; 100 = full multipath)
|
inline |
Gets the Signed frequency offset (kHz).
|
inline |
Get Multipath Detect Low.
|
inline |
Gets the Current Multipath Detect High.
|
inline |
Gets the Current Blend Detect Interrupt.
|
inline |
Sets the FM Receive de-emphasis to 50 or 75 μs.
valid parameters are 1 = 50 μs. Usedin Europe, Australia, Japan; 2 = 75 μs. Used in USA (default)
parameter | 1 or 2 (default 1 - USA) |
|
inline |
Sets the Fm Soft Mute Max Attenuation.
This function can be useful to disable Soft Mute on FM mode. The value 0 disable soft mute.
Specified in units of dB. Default maximum attenuation is 8 dB. It works for AM and SSB.
smattn | Maximum attenuation to apply when in soft mute |
|
inline |
Sets the AM Receive de-emphasis to 50 or disable.
valid parameters are 1 = 50 μs. Usedin urope, Australia, Japan; 2 = 75 μs. Used in USA (default)
parameter | 1 = enable or 0 = disable |
|
inline |
Sets the AM attenuation slope during soft mute.
Configures attenuation slope during soft mute in dB attenuation per dB SNR below the soft mute SNR threshold.
Soft mute attenuation is the minimum of SMSLOPEx(SMTHR–SNR) and SMATTN.
The default slope is 1 dB/dB for AMRX component 5.0 or later and 2 dB/dB for AMRX component 3.0 or earlier.
parameter | the valid values are 1–5 (default 1). |
|
inline |
Sets the attack and decay rates when entering or leaving soft mute.
The value specified is multiplied by 4.35 dB/s to come up with the actual attack rate
The default rate is 278 dB/s.
parameter | The valid values are 1-255 ( Default is ~64 - [64 x 4.35 = 278] ) |
|
inline |
Sets the SNR threshold to engage soft mute.
Whenever the SNR for a tuned frequency drops below this threshold the AM reception will go in soft mute,
provided soft mute max attenuation property is non-zero. The default value is 8dB
parameter | 0-63 (default is 8) |
|
inline |
Sets the soft mute release rate.
Smaller values provide slower release and larger values provide faster release. The default is 8192 (approximately 8000 dB/s).
parameter | 1–32767 |
|
inline |
Sets the soft mute attack rate.
Smaller values provide slower attack and larger values provide faster attack.
parameter | 1–32767 (The default is 8192 (approximately 8000 dB/s) |
|
inline |
Sets the AGC attack rate.
Large values provide slower attack, and smaller values provide faster attack..
parameter | Range: 4–248 (The default is 0x04) |
|
inline |
Sets the AGC release rate.
Larger values provide slower release, and smaller values provide faster release.
parameter | Range: 4–248 (The default is 0x8C) |
|
inline |
Adjusts the AM AGC for external front-end attenuator and external front-end cascode LNA.
This property contains two fields: MIN_GAIN_INDEX and ATTN_BACKUP.
MIN_GAIN_INDEX impacts sensitivity and U/D performance. Lower values improve sensitivity, but degrade
far away blocker U/D performance.
Higher values degrade sensitivity, but improve U/D. With MIN_GAIN_INDEX=19 and Si4743 EVB reference
design, the Si474x provides sensitivity of 28dBuV typical and U/D exceeding 55dB on far away blockers.
With MIN_GAIN_INDEX=24, the Si474x provides sensitivity of 34dBuV typical and U/D approaching 70dB on
far away blockers.
MIN_GAIN_INDEX | Values below 19 have minimal sensitivity improvement; Higher values degrade sensitivity, but improve U/D. |
ATTN_BACKUP | ??? |
|
inline |
Returns true if the current function is AM (AM_TUNE_FREQ).
|
inline |
Returns true if the current function is SSB (SSB_TUNE_FREQ).
|
inline |
Returns the FAST tuning status.
@retrn uint8_t
|
inline |
Sets the FAST Tuning.
If set, excutes fast and invalidated tune. Theune status will not be accurate
FAST |
|
inline |
Returns the FREEZE status.
|
inline |
Sets Freeze Metrics During Alternate Frequency Jum.
Only on FM mode
FREEZE |
|
inline |
|
inline |
Set the Frequency Down.
same frequencyDown
References SI4735::frequencyDown().
|
inline |
Sets the maximum time in milliseconds for seeking. The default value is 8000ms (8s).
Depending on the bandwidth, your reception conditions or step configuration, the seek process can take a long time.
This function sets a time limit for seeking process and back the control to the system if the time runs out.
time_in_ms | time in milliseconds. |
References SI4735::maxSeekTime.
|
inline |
Search for the next station.
Seek a station up. Stop when a station is found or the frequency has reached the upper limit
|
inline |
Search the previous station.
Seek a station Down. Stop when a station is found or the frequency has reached the lower limit
|
inline |
Set the Seek Am Srn Threshold object.
value |
|
inline |
Sets the SNR threshold for a valid AM Seek/Tune.
If the value is zero then SNR threshold is not considered when doing a seek. Default value is 5 dB.
|
inline |
Set the Seek Fm Srn Threshold object.
value |
|
inline |
Sets the SNR threshold for a valid FM Seek/Tune.
SNR Threshold which determines if a valid channel has been found during Seek/Tune. Specified in units of dB in 1 dB steps (0–127). Default is 3 dB
value | between 0 and 127. |
|
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.
ms |
|
inline |
Sets the current step value.
This function does not check the limits of the current band. Do not take a step that will extend past the limit of the band.
Example:
step | if 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. |
|
inline |
Gets the current frequency saved in memory.
Unlike getFrequency, this method gets the current frequency recorded after the last setFrequency command.
This method avoids bus traffic and CI processing.
However, you can not get others status information like RSSI.
|
inline |
Gets the current status of the Si47XX (AM, FM or SSB)
References SI4735::getStatus().
Referenced by SI4735::getFrequency(), and SI4735::getStatus().
void SI4735::setTuneFrequencyAntennaCapacitor | ( | uint16_t | capacitor | ) |
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. For example, if the varactor is set to a value of 5 manually, when read back the value will be 1.
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.
capacitor | If 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). |
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.
uint16_t | freq is the frequency to change. For example, FM => 10390 = 103.9 MHz; AM => 810 = 810 kHz. |
References SI4735::waitToSend().
void SI4735::frequencyUp | ( | ) |
Increments the current frequency on current band/function by using the current step.
Referenced by SI4735::setFrequencyUp().
void SI4735::frequencyDown | ( | ) |
Decrements the current frequency on current band/function by using the current step.
Referenced by SI4735::setFrequencyDown().
void SI4735::setAM | ( | ) |
Sets the radio to AM function. It means: LW MW and SW.
Define the band range you want to use for the AM mode.
References SI4735::powerDown(), and SI4735::radioPowerUp().
Referenced by SI4735::setAM().
void SI4735::setFM | ( | ) |
Sets the radio to FM function.
References SI4735::disableFmDebug(), SI4735::powerDown(), and SI4735::radioPowerUp().
Referenced by SI4735::setFM().
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.
fromFreq | minimum frequency for the band |
toFreq | maximum frequency for the band |
initialFreq | initial frequency |
step | step used to go to the next channel |
References SI4735::setAM().
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.
fromFreq | minimum frequency for the band |
toFreq | maximum frequency for the band |
initialFreq | initial frequency (default frequency) |
step | step used to go to the next channel |
References SI4735::setFM().
void SI4735::setBandwidth | ( | uint8_t | AMCHFLT, |
uint8_t | AMPLFLT | ||
) |
Selects the bandwidth of the channel filter for AM reception.
The choices are 6, 4, 3, 2, 2.5, 1.8, or 1 (kHz). The default bandwidth is 2 kHz. It works only in AM / SSB (LW/MW/SW)
AMCHFLT | the choices are: 0 = 6 kHz Bandwidth 1 = 4 kHz Bandwidth 2 = 3 kHz Bandwidth 3 = 2 kHz Bandwidth 4 = 1 kHz Bandwidth 5 = 1.8 kHz Bandwidth 6 = 2.5 kHz Bandwidth, gradual roll off 7–15 = Reserved (Do not use). |
AMPLFLT | Enables the AM Power Line Noise Rejection Filter. |
References SI4735::waitToSend().
uint16_t SI4735::getFrequency | ( | void | ) |
Gets the current frequency of the Si4735 (AM or FM)
The method status do it an more. See getStatus below.
References SI4735::getStatus().
void SI4735::getStatus | ( | uint8_t | INTACK, |
uint8_t | CANCEL | ||
) |
Gets the current status of the Si4735 (AM or FM)
uint8_t | INTACK Seek/Tune Interrupt Clear. If set, clears the seek/tune complete interrupt status indicator; |
uint8_t | CANCEL Cancel seek. If set, aborts a seek currently in progress; |
References SI4735::waitToSend().
void SI4735::getAutomaticGainControl | ( | ) |
Queries Automatic Gain Control STATUS.
After call this method, you can call isAgcEnabled to know the AGC status and getAgcGainIndex to know the gain index value.
References SI4735::waitToSend().
void SI4735::setAutomaticGainControl | ( | uint8_t | AGCDIS, |
uint8_t | AGCIDX | ||
) |
Automatic Gain Control setup.
If FM, overrides AGC setting by disabling the AGC and forcing the LNA to have a certain gain that ranges between 0 (minimum attenuation) and 26 (maximum attenuation).
If AM/SSB, Overrides the AGC setting by disabling the AGC and forcing the gain index that ranges between 0 (minimum attenuation) and 37+ATTN_BACKUP (maximum attenuation).
uint8_t | AGCDIS This param selects whether the AGC is enabled or disabled (0 = AGC enabled; 1 = AGC disabled); |
uint8_t | AGCIDX AGC Index (0 = Minimum attenuation (max gain); 1 – 36 = Intermediate attenuation); if >greater than 36 - Maximum attenuation (min gain) ). |
References SI4735::waitToSend().
void SI4735::setAvcAmMaxGain | ( | uint8_t | gain = 90 | ) |
Sets the maximum gain for automatic volume control.
Sets the gain for automatic volume control.
uint8_t | gain Select a value between 12 and 90. Defaul value 48dB. |
void SI4735::getCurrentReceivedSignalQuality | ( | uint8_t | INTACK | ) |
Queries the status of the Received Signal Quality (RSQ) of the current channel.
This method sould be called berore call getCurrentRSSI(), getCurrentSNR() etc. Command FM_RSQ_STATUS
INTACK | Interrupt Acknowledge. 0 = Interrupt status preserved; 1 = Clears RSQINT, BLENDINT, SNRHINT, SNRLINT, RSSIHINT, RSSILINT, MULTHINT, MULTLINT. |
References SI4735::waitToSend().
void SI4735::getCurrentReceivedSignalQuality | ( | void | ) |
Queries the status of the Received Signal Quality (RSQ) of the current channel (FM_RSQ_STATUS)
INTACK | Interrupt Acknowledge. 0 = Interrupt status preserved; 1 = Clears RSQINT, BLENDINT, SNRHINT, SNRLINT, RSSIHINT, RSSILINT, MULTHINT, MULTLINT. |
References SI4735::getCurrentReceivedSignalQuality().
Referenced by SI4735::getCurrentReceivedSignalQuality().
void SI4735::seekStation | ( | uint8_t | SEEKUP, |
uint8_t | WRAP | ||
) |
Look for a station (Automatic tune)
Starts a seek process for a channel that meets the RSSI and SNR criteria for AM.
This function does not work on SSB mode.
SEEKUP | Seek Up/Down. Determines the direction of the search, either UP = 1, or DOWN = 0. |
Wrap/Halt. | Determines whether the seek should Wrap = 1, or Halt = 0 when it hits the band limit. |
References SI4735::waitToSend().
void SI4735::seekNextStation | ( | ) |
Search for the next station.
Like seekStationUp this function goes to a next station.
The main difference is the method used to look for a station.
void SI4735::seekPreviousStation | ( | ) |
Search the previous station.
Like seekStationDown this function goes to a previous station.
The main difference is the method used to look for a station.
void SI4735::seekStationProgress | ( | void(*)(uint16_t f) | showFunc, |
uint8_t | up_down | ||
) |
Seeks a station up or down.
Seek up or down a station and call a function defined by the developer to show the frequency.
The first parameter of this function is a name of your function that you have to implement to show the current frequency.
If you do not want to show the seeking progress, you can set NULL instead the name of the function.
The code below shows an example using ta function the shows the current frequency on he Serial Monitor. You might want to implement a function that shows the frequency on your display device.
Also, you have to declare the frequency parameter that will be used by the function to show the frequency value.
This function does not work on SSB mode.
showFunc | function that you have to implement to show the frequency during the seeking process. Set NULL if you do not want to show the progress. |
up_down | set up_down = 1 for seeking station up; set up_down = 0 for seeking station down |
void SI4735::seekStationProgress | ( | void(*)(uint16_t f) | showFunc, |
bool(*)() | stopSeking, | ||
uint8_t | up_down | ||
) |
Seeks a station up or down.
Seek up or down a station and call a function defined by the developer to show the frequency and stop seeking process by the user.
The first parameter of this function is a name of your function that you have to implement to show the current frequency.
The second parameter is the name function that will check stop seeking action. Thus function should return true or false and should read a button, encoder or some status to make decision to stop or keep seeking.
If you do not want to show the seeking progress, you can set NULL instead the name of the function.
If you do not want stop seeking checking, you can set NULL instead the name of a function.
The code below shows an example using ta function the shows the current frequency on he Serial Monitor. You might want to implement a function that shows the frequency on your display device.
Also, you have to declare the frequency parameter that will be used by the function to show the frequency value.
This function does not work on SSB mode.
showFunc | function that you have to implement to show the frequency during the seeking process. Set NULL if you do not want to show the progress. |
stopSeeking | functionthat you have to implement if you want to control the stop seeking action. Useful if you want abort the seek process. |
up_down | set up_down = 1 for seeking station up; set up_down = 0 for seeking station down |
void SI4735::setSeekAmLimits | ( | uint16_t | bottom, |
uint16_t | top | ||
) |
Sets the bottom frequency and top frequency of the AM band for seek. Default is 520 to 1710.
uint16_t | bottom - the bottom of the AM (MW/SW) mode for seek |
uint16_t | top - the top of the AM (MW/SW) mode for seek |
void SI4735::setSeekFmLimits | ( | uint16_t | bottom, |
uint16_t | top | ||
) |
Sets the bottom frequency and top frequency of the FM band for seek. Default is 8750 to 10790.
uint16_t | bottom - the bottom of the FM(VHF) mode for seek |
uint16_t | top - the top of the FM(VHF) mode for seek |
void SI4735::setSeekAmSpacing | ( | uint16_t | spacing | ) |
Selects frequency spacingfor AM seek. Default is 10 kHz spacing.
uint16_t | spacing - step in kHz |
void SI4735::setSeekFmSpacing | ( | uint16_t | spacing | ) |
Selects frequency spacingfor FM seek. Default is 100 kHz (value 10) spacing. There are only 3 valid values: 5, 10, and 20.
Although the guide does not mention it, the value 1 (10 kHz) seems to work better
uint16_t | spacing - step in kHz |
void SI4735::setSeekAmRssiThreshold | ( | uint16_t | value | ) |
Sets the RSSI threshold for a valid AM Seek/Tune.
If the value is zero then RSSI threshold is not considered when doing a seek. Default value is 25 dBμV.
void SI4735::setSeekFmRssiThreshold | ( | uint16_t | value | ) |
Sets the RSSI threshold for a valid FM Seek/Tune.
RSSI threshold which determines if a valid channel has been found during seek/tune. Specified in units of dBμV in 1 dBμV steps (0–127). Default is 20 dBμV.