![]() |
PU2CLR Si4735 Arduino Library
1.1.9
Arduino Library for Si47XX Devices - By Ricardo Lima Caratti
|
Functions | |
void | SI4735::waitInterrupr (void) |
Interrupt handle. More... | |
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... | |
|
protected |
Interrupt handle.
If you setup interrupt, this function will be called whenever the Si4735 changes.
|
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.
References SI4735::waitToSend().
|
protected |
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 |
GPO1OEN | |
GPO2OEN | |
GPO3OEN |
References SI4735::waitToSend().
|
protected |
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 |
GPO1LEVEL | |
GPO2LEVEL | |
GPO3LEVEL |
References SI4735::waitToSend().
|
protected |
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.
STCIEN | Seek/Tune Complete Interrupt Enable (0 or 1). |
RSQIEN | RSQ Interrupt Enable (0 or 1). |
ERRIEN | ERR Interrupt Enable (0 or 1). |
CTSIEN | CTS Interrupt Enable (0 or 1). |
STCREP | STC Interrupt Repeat (0 or 1). |
RSQREP | RSQ Interrupt Repeat(0 or 1). |
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.
uint8_t | resetPin MCU Mater (Arduino) reset pin |
References SI4735::reset().
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.
senPin | 0 - 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). |
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
uint8_t | i2cAddr (example 0x10) |