PU2CLR Si4735 Arduino Library  2.0.7
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
Deal with Interrupt and I2C bus

Functions

si47x_status SI4735::getInterruptStatus ()
 Updates bits 6:0 of the status byte. More...
 
void SI4735::setGpioCtl (uint8_t GPO1OEN, uint8_t GPO2OEN, uint8_t GPO3OEN)
 Enables output for GPO1, 2, and 3. More...
 
void SI4735::setGpio (uint8_t GPO1LEVEL, uint8_t GPO2LEVEL, uint8_t GPO3LEVEL)
 Sets the output level (high or low) for GPO1, 2, and 3.
More...
 
void SI4735::setGpioIen (uint8_t STCIEN, uint8_t RSQIEN, uint8_t ERRIEN, uint8_t CTSIEN, uint8_t STCREP, uint8_t RSQREP)
 Configures the sources for the GPO2/INT interrupt pin. More...
 
int16_t SI4735::getDeviceI2CAddress (uint8_t resetPin)
 I2C bus address setup. More...
 
void SI4735::setDeviceI2CAddress (uint8_t senPin)
 Sets the I2C Bus Address. More...
 
void SI4735::setDeviceOtherI2CAddress (uint8_t i2cAddr)
 Sets the onther I2C Bus Address (for Si470X) More...
 

Detailed Description

Function Documentation

◆ getInterruptStatus()

si47x_status SI4735::getInterruptStatus ( )
protected

Updates bits 6:0 of the status byte.

This command should be called after any command that sets the STCINT or RSQINT bits.

When polling this command should be periodically called to monitor the STATUS byte, and when using interrupts, this command should be called after the interrupt is set to update the STATUS byte.

The CTS bit (and optional interrupt) is set when it is safe to send the next command.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); page 135
si47x_status
waitToSend
Returns
si47x_status the bit data structure with the status response

References SI4735::waitToSend().

◆ setGpioCtl()

void SI4735::setGpioCtl ( uint8_t  GPO1OEN,
uint8_t  GPO2OEN,
uint8_t  GPO3OEN 
)

Enables output for GPO1, 2, and 3.

GPO1, 2, and 3 can be configured for output (Hi-Z or active drive) by setting the GPO1OEN, GPO2OEN, and GPO3OEN bit.

The state (high or low) of GPO1, 2, and 3 is set with the GPIO_SET command.

To avoid excessive current consumption due to oscillation, GPO pins should not be left in a high impedance state.

GPIO Output Enable value 0 value 1
GPO1OEN Output Disabled (Hi-Z) (default) Output Enabled
GPO2OEN Output Disabled (Hi-Z) (default) Output Enabled
GPO3OEN Output Disabled (Hi-Z) (default) Output Enabled
See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 82 and 144
Parameters
GPO1OEN
GPO2OEN
GPO3OEN

References SI4735::waitToSend().

◆ setGpio()

void SI4735::setGpio ( uint8_t  GPO1LEVEL,
uint8_t  GPO2LEVEL,
uint8_t  GPO3LEVEL 
)

Sets the output level (high or low) for GPO1, 2, and 3.

GPO1, 2, and 3 can be configured for output by setting the GPO1OEN, GPO2OEN, and GPO3OEN bit in the GPIO_CTL command.

To avoid excessive current consumption due to oscillation, GPO pins should not be left in a high impedance state.

To avoid excessive current consumption due to oscillation, GPO pins should not be left in a high impedance state.

GPIO Output Enable value 0 value 1
GPO1LEVEL Output low (default) Output high
GPO2LEVEL Output low (default) Output high
GPO3LEVEL Output low (default) Output high
See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); pages 83 and 145
Parameters
GPO1LEVEL
GPO2LEVEL
GPO3LEVEL

References SI4735::waitToSend().

◆ setGpioIen()

void SI4735::setGpioIen ( uint8_t  STCIEN,
uint8_t  RSQIEN,
uint8_t  ERRIEN,
uint8_t  CTSIEN,
uint8_t  STCREP,
uint8_t  RSQREP 
)

Configures the sources for the GPO2/INT interrupt pin.

Valid sources are the lower 8 bits of the STATUS byte, including CTS, ERR, RSQINT, and STCINT bits.

The corresponding bit is set before the interrupt occurs. The CTS bit (and optional interrupt) is set when it is safe to send the next command.

The CTS interrupt enable (CTSIEN) can be set with this property and the POWER_UP command.

The state of the CTSIEN bit set during the POWER_UP command can be read by reading this property and modified by writing this property.

See also
Si47XX PROGRAMMING GUIDE; AN332 (REV 1.0); page 146
Parameters
STCIENSeek/Tune Complete Interrupt Enable (0 or 1).
RSQIENRSQ Interrupt Enable (0 or 1).
ERRIENERR Interrupt Enable (0 or 1).
CTSIENCTS Interrupt Enable (0 or 1).
STCREPSTC Interrupt Repeat (0 or 1).
RSQREPRSQ Interrupt Repeat(0 or 1).

◆ getDeviceI2CAddress()

int16_t SI4735::getDeviceI2CAddress ( uint8_t  resetPin)

I2C bus address setup.

Scans for two possible addresses for the Si47XX (0x11 or 0x63).

This function also sets the system to the found I2C bus address of Si47XX.

You do not need to use this function if the SEN PIN is configured to ground (GND). The default I2C address is 0x11.

Use this function if you do not know how the SEN pin is configured.

Parameters
uint8_tresetPin MCU Mater (Arduino) reset pin
Returns
int16_t 0x11 if the SEN pin of the Si47XX is low or 0x63 if the SEN pin of the Si47XX is HIGH or 0x0 if error.

References SI4735::reset().

◆ setDeviceI2CAddress()

void SI4735::setDeviceI2CAddress ( uint8_t  senPin)

Sets the I2C Bus Address.

The parameter senPin is not the I2C bus address. It is the SEN pin setup of the schematic (eletronic circuit).

If it is connected to the ground, call this function with senPin = 0; else senPin = 1.

You do not need to use this function if the SEN PIN configured to ground (GND).

The default value is 0x11 (senPin = 0). In this case you have to ground the pin SEN of the SI473X.

If you want to change this address, call this function with senPin = 1.

Parameters
senPin0 - when the pin SEN (16 on SSOP version or pin 6 on QFN version) is set to low (GND - 0V); 1 - when the pin SEN (16 on SSOP version or pin 6 on QFN version) is set to high (+3.3V).

◆ setDeviceOtherI2CAddress()

void SI4735::setDeviceOtherI2CAddress ( uint8_t  i2cAddr)

Sets the onther I2C Bus Address (for Si470X)

You can set another I2C address different of 0x11 and 0x63

Parameters
uint8_ti2cAddr (example 0x10)