PU2CLR Si4735 Arduino Library  2.0.7
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Device Setup and Start up

Functions

void SI4735::setPowerUp (uint8_t CTSIEN, uint8_t GPO2OEN, uint8_t PATCH, uint8_t XOSCEN, uint8_t FUNC, uint8_t OPMODE)
 Set the Power Up parameters for si473X. More...
 
void SI4735::radioPowerUp (void)
 Powerup the Si47XX. More...
 
void SI4735::analogPowerUp (void)
 You have to call setPowerUp method before. More...
 
void SI4735::powerDown (void)
 Moves the device from powerup to powerdown mode. More...
 
void SI4735::getFirmware (void)
 Gets firmware information. More...
 
void SI4735::setRefClock (uint16_t refclk)
 Sets the frequency of the REFCLK from the output of the prescaler. More...
 
void SI4735::setRefClockPrescaler (uint16_t prescale, uint8_t rclk_sel=0)
 Sets the number used by the prescaler to divide the external RCLK down to the internal REFCLK. More...
 
void SI4735::setup (uint8_t resetPin, uint8_t ctsIntEnable, uint8_t defaultFunction, uint8_t audioMode=SI473X_ANALOG_AUDIO, uint8_t clockType=XOSCEN_CRYSTAL, uint8_t gpo2Enable=0)
 Starts the Si473X device. More...
 
void SI4735::setup (uint8_t resetPin, uint8_t defaultFunction)
 Starts the Si473X device.
More...
 

Detailed Description

Function Documentation

◆ setPowerUp()

void SI4735::setPowerUp ( uint8_t  CTSIEN,
uint8_t  GPO2OEN,
uint8_t  PATCH,
uint8_t  XOSCEN,
uint8_t  FUNC,
uint8_t  OPMODE 
)

Set the Power Up parameters for si473X.

Use this method to chenge the defaul behavior of the Si473X. Use it before PowerUp()

About the parameter XOSCEN:

0 = Use external RCLK (crystal oscillator disabled);

1 = Use crystal oscillator (RCLK and GPO3/DCLK with external 32.768 kHz crystal and OPMODE = 01010000).

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 65 and 129
Parameters
uint8_tCTSIEN sets Interrupt anabled or disabled (1 = anabled and 0 = disabled )
uint8_tGPO2OEN sets GP02 Si473X pin enabled (1 = anabled and 0 = disabled )
uint8_tPATCH Used for firmware patch updates. Use it always 0 here.
uint8_tXOSCEN sets external Crystal enabled or disabled. 0 = Use external RCLK (crystal oscillator disabled); 1 = Use crystal oscillator
uint8_tFUNC sets the receiver function have to be used [0 = FM Receive; 1 = AM (LW/MW/SW) and SSB (if SSB patch apllied)]
uint8_tOPMODE set the kind of audio mode you want to use.

◆ radioPowerUp()

void SI4735::radioPowerUp ( void  )

Powerup the Si47XX.

Before call this function call the setPowerUp to set up the parameters.

Parameters you have to set up with setPowerUp

Parameter Description
CTSIEN Interrupt anabled or disabled
GPO2OEN GPO2 Output Enable or disabled
PATCH Boot normally or patch
XOSCEN Use external crystal oscillator. 1 = Use crystal oscillator; (crystal oscillator disabled)
FUNC defaultFunction = 0 = FM Receive; 1 = AM (LW/MW/SW) Receiver
OPMODE SI473X_ANALOG_AUDIO (B00000101) or SI473X_DIGITAL_AUDIO (B00001011)

ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.

see setMaxDelaySetFrequency()

See also
MAX_DELAY_AFTER_POWERUP
SI4735::setPowerUp()
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64, 129

References SI4735::setHardwareAudioMute(), and SI4735::waitToSend().

Referenced by SI4735::analogPowerUp(), SI4735::setAM(), SI4735::setFM(), SI4735::setNBFM(), SI4735::setSSB(), and SI4735::setup().

◆ analogPowerUp()

void SI4735::analogPowerUp ( void  )

You have to call setPowerUp method before.

This function is still available only for legacy reasons. If you are using this function, please, replace it by radioPowerup().

Deprecated:
Use radioPowerUp instead.
See also
SI4735::setPowerUp()
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 64, 129

References SI4735::radioPowerUp().

◆ powerDown()

void SI4735::powerDown ( void  )

Moves the device from powerup to powerdown mode.

After Power Down command, only the Power Up command is accepted.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 67, 132
radioPowerUp()

References SI4735::setHardwareAudioMute(), and SI4735::waitToSend().

Referenced by SI4735::queryLibraryId(), SI4735::setAM(), and SI4735::setFM().

◆ getFirmware()

void SI4735::getFirmware ( void  )

Gets firmware information.

The firmware information will be stored in firmwareInfo member variable

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 66, 131
firmwareInfo

References SI4735::waitToSend().

Referenced by SI4735::setup().

◆ setRefClock()

void SI4735::setRefClock ( uint16_t  refclk)

Sets the frequency of the REFCLK from the output of the prescaler.

The REFCLK range is 31130 to 34406 Hz (32768 ±5% Hz) in 1 Hz steps, or 0 (to disable AFC). For example, an RCLK of 13 MHz would require a prescaler value of 400 to divide it to 32500 Hz REFCLK.

The reference clock frequency property would then need to be set to 32500 Hz.

RCLK frequencies between 31130 Hz and 40 MHz are supported, however, there are gaps in frequency coverage for prescaler values ranging from 1 to 10, or frequencies up to 311300 Hz. See table below.

Table REFCLK Prescaler

Prescaler RCLK Low (Hz) RCLK High (Hz)
1 31130 34406
2 62260 68812
3 93390 103218
4 124520 137624
5 155650 172030
6 186780 206436
7 217910 240842
8 249040 275248
9 280170 309654
10 311300 344060
See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 34 and 35
Parameters
refclkThe allowed REFCLK frequency range is between 31130 and 34406 Hz (32768 ±5%), or 0 (to disable AFC).

◆ setRefClockPrescaler()

void SI4735::setRefClockPrescaler ( uint16_t  prescale,
uint8_t  rclk_sel = 0 
)

Sets the number used by the prescaler to divide the external RCLK down to the internal REFCLK.

The range may be between 1 and 4095 in 1 unit steps.

For example, an RCLK of 13 MHz would require a prescaler value of 400 to divide it to 32500 Hz. The reference clock frequency property would then need to be set to 32500 Hz.

ATTENTION by default, this function considers you are using the RCLK pin as clock source.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 34 and 35
Parameters
prescalePrescaler for Reference Clock value; Between 1 and 4095 in 1 unit steps. Default is 1.
rclk_sel0 = RCLK pin is clock source (default); 1 = DCLK pin is clock source

◆ setup() [1/2]

void SI4735::setup ( uint8_t  resetPin,
uint8_t  ctsIntEnable,
uint8_t  defaultFunction,
uint8_t  audioMode = SI473X_ANALOG_AUDIO,
uint8_t  clockType = XOSCEN_CRYSTAL,
uint8_t  gpo2Enable = 0 
)

Starts the Si473X device.

Use this function to start the device up with the parameters shown below.

If the audio mode parameter is not entered, analog mode will be considered.

You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin.

ATTENTION: The document AN383; "Si47XX ANTENNA, SCHEMATIC, LAYOUT, AND DESIGN GUIDELINES"; rev 0.8; page 6; there is the following note: Crystal and digital audio mode cannot be used at the same time. Populate R1 and remove C10, C11, and X1 when using digital audio.

Parameters
resetPinDigital Arduino Pin used to RESET de Si47XX device.
ctsIntEnableCTS Interrupt Enable.
defaultFunctionis the mode you want the receiver starts.
audioModedefault SI473X_ANALOG_AUDIO (Analog Audio). Use SI473X_ANALOG_AUDIO or SI473X_DIGITAL_AUDIO.
clockType0 = Use external RCLK (crystal oscillator disabled); 1 = Use crystal oscillator
gpo2EnableGPO2OE (GPO2 Output) 1 = Enable; 0 Disable (defult)

References SI4735::getFirmware(), SI4735::radioPowerUp(), SI4735::reset(), and SI4735::setHardwareAudioMute().

◆ setup() [2/2]

void SI4735::setup ( uint8_t  resetPin,
uint8_t  defaultFunction 
)

Starts the Si473X device.

Use this setup if you are not using interrupt resource.

If the audio mode parameter is not entered, analog mode will be considered.

You can use any Arduino digital pin. Be sure you are using less than 3.6V on Si47XX RST pin.

Parameters
uint8_tresetPin Digital Arduino Pin used to RESET command.
uint8_tdefaultFunction. 0 = FM mode; 1 = AM