Arduino Radio Library  0.9
A set of Arduino libraries to control diverse FM radio receiver chips in Arduino projects.
Macros
SI4705.cpp File Reference

Implementation for the radio library to control the SI4705 radio chip. More...

#include <Arduino.h>
#include <Wire.h>
#include <RADIO.h>
#include <SI4705.h>

Macros

#define SI4705_ADR   0x63
 The I2C address of SI4705 is 0x61 or 0x63. More...
 
#define ELVRADIO
 
#define CMD_POWER_UP   0x01
 
#define CMD_POWER_UP_1_FUNC_FM   0x00
 
#define CMD_POWER_UP_1_XOSCEN   0x10
 
#define CMD_POWER_UP_1_PATCH   0x20
 
#define CMD_POWER_UP_1_GPO2OEN   0x40
 
#define CMD_POWER_UP_1_CTSIEN   0x80
 
#define CMD_POWER_UP_2_ANALOGOUT   0x05
 
#define CMD_GET_REV   0x10
 
#define CMD_POWER_DOWN   0x11
 
#define CMD_SET_PROPERTY   0x12
 
#define CMD_GET_PROPERTY   0x13
 
#define CMD_GET_INT_STATUS   0x14
 
#define CMD_PATCH_ARGS   * 0x15
 
#define CMD_PATCH_DATA   * 0x16
 
#define CMD_FM_TUNE_FREQ   0x20
 
#define CMD_FM_SEEK_START   0x21
 
#define CMD_FM_TUNE_STATUS   0x22
 
#define CMD_FM_RSQ_STATUS   0x23
 
#define CMD_FM_RDS_STATUS   0x24
 
#define CMD_FM_AGC_STATUS   0x27
 
#define CMD_FM_AGC_OVERRIDE   0x28
 
#define CMD_GPIO_CTL   0x80
 
#define CMD_GPIO_CTL_GPO1OEN   0x02
 
#define CMD_GPIO_CTL_GPO2OEN   0x04
 
#define CMD_GPIO_CTL_GPO3OEN   0x08
 
#define CMD_GPIO_SET   0x81
 
#define CMD_GPIO_SET_GPO1LEVEL   0x02
 
#define CMD_GPIO_SET_GPO2LEVEL   0x04
 
#define CMD_GPIO_SET_GPO3LEVEL   0x08
 
#define PROP_GPO_IEN   0x0001
 
#define PROP_GPO_IEN_STCIEN   0x01
 
#define PROP_GPO_IEN_RDSIEN   0x04
 
#define PROP_FM_DEEMPHASIS   0x1100
 
#define PROP_FM_DEEMPHASIS_50   0x01
 
#define PROP_FM_ANTENNA_INPUT   0x1107
 
#define PROP_FM_ANTENNA_INPUT_FMI   0x00
 
#define PROP_FM_ANTENNA_INPUT_SHORT   0x01
 
#define FM_SOFT_MUTE_SLOPE   0x1301
 
#define FM_SOFT_MUTE_MAX_ATTENUATION   0x1302
 
#define FM_SOFT_MUTE_SNR_THRESHOLD   0x1303
 
#define FM_SOFT_MUTE_RELEASE_RATE   0x1304
 
#define FM_SOFT_MUTE_ATTACK_RATE   0x1305
 
#define PROP_FM_SEEK_FREQ_SPACING   0x1402
 
#define FM_SEEK_TUNE_SNR_THRESHOLD   0x1403
 
#define FM_SEEK_TUNE_RSSI_TRESHOLD   0x1404
 
#define PROP_RDS_INTERRUPT_SOURCE   0x1500
 
#define PROP_RDS_INTERRUPT_SOURCE_RDSRECV   0x01
 
#define PROP_RDS_INT_FIFO_COUNT   0x1501
 
#define PROP_RDS_CONFIG   0x1502
 
#define PROP_RX_VOLUME   0x4000
 
#define PROP_FM_BLEND_RSSI_STEREO_THRESHOLD   0x1800
 
#define PROP_FM_BLEND_RSSI_MONO_THRESHOLD   0x1801
 
#define PROP_RX_HARD_MUTE   0x4001
 
#define PROP_RX_HARD_MUTE_RIGHT   0x01
 
#define PROP_RX_HARD_MUTE_LEFT   0x02
 
#define PROP_RX_HARD_MUTE_BOTH   0x03
 
#define RDSBLOCKWORD(h, l)   (h << 8 | l)
 

Detailed Description

Implementation for the radio library to control the SI4705 radio chip.

Author
Matthias Hertel, http://www.mathertel.de

This library enables the use of the Radio Chip SI4705.

More documentation and source code is available at http://www.mathertel.de/Arduino

Many hints can be found in AN332: http://www.silabs.com/Support%20Documents/TechnicalDocs/AN332.pdf

ChangeLog see SI4705.h.

Macro Definition Documentation

#define CMD_FM_AGC_OVERRIDE   0x28
#define CMD_FM_AGC_STATUS   0x27
#define CMD_FM_RDS_STATUS   0x24
#define CMD_FM_RSQ_STATUS   0x23
#define CMD_FM_SEEK_START   0x21
#define CMD_FM_TUNE_FREQ   0x20
#define CMD_FM_TUNE_STATUS   0x22
#define CMD_GET_INT_STATUS   0x14
#define CMD_GET_PROPERTY   0x13
#define CMD_GET_REV   0x10
#define CMD_GPIO_CTL   0x80
#define CMD_GPIO_CTL_GPO1OEN   0x02
#define CMD_GPIO_CTL_GPO2OEN   0x04
#define CMD_GPIO_CTL_GPO3OEN   0x08
#define CMD_GPIO_SET   0x81
#define CMD_GPIO_SET_GPO1LEVEL   0x02
#define CMD_GPIO_SET_GPO2LEVEL   0x04
#define CMD_GPIO_SET_GPO3LEVEL   0x08
#define CMD_PATCH_ARGS   * 0x15
#define CMD_PATCH_DATA   * 0x16
#define CMD_POWER_DOWN   0x11
#define CMD_POWER_UP   0x01
#define CMD_POWER_UP_1_CTSIEN   0x80
#define CMD_POWER_UP_1_FUNC_FM   0x00
#define CMD_POWER_UP_1_GPO2OEN   0x40
#define CMD_POWER_UP_1_PATCH   0x20
#define CMD_POWER_UP_1_XOSCEN   0x10
#define CMD_POWER_UP_2_ANALOGOUT   0x05
#define CMD_SET_PROPERTY   0x12
#define ELVRADIO

Uncomment this definition when not using the ELV radio board. There is a special mute implementation.

#define FM_SEEK_TUNE_RSSI_TRESHOLD   0x1404
#define FM_SEEK_TUNE_SNR_THRESHOLD   0x1403
#define FM_SOFT_MUTE_ATTACK_RATE   0x1305
#define FM_SOFT_MUTE_MAX_ATTENUATION   0x1302
#define FM_SOFT_MUTE_RELEASE_RATE   0x1304
#define FM_SOFT_MUTE_SLOPE   0x1301
#define FM_SOFT_MUTE_SNR_THRESHOLD   0x1303
#define PROP_FM_ANTENNA_INPUT   0x1107
#define PROP_FM_ANTENNA_INPUT_FMI   0x00
#define PROP_FM_ANTENNA_INPUT_SHORT   0x01
#define PROP_FM_BLEND_RSSI_MONO_THRESHOLD   0x1801
#define PROP_FM_BLEND_RSSI_STEREO_THRESHOLD   0x1800
#define PROP_FM_DEEMPHASIS   0x1100
#define PROP_FM_DEEMPHASIS_50   0x01
#define PROP_FM_SEEK_FREQ_SPACING   0x1402
#define PROP_GPO_IEN   0x0001
#define PROP_GPO_IEN_RDSIEN   0x04
#define PROP_GPO_IEN_STCIEN   0x01
#define PROP_RDS_CONFIG   0x1502
#define PROP_RDS_INT_FIFO_COUNT   0x1501
#define PROP_RDS_INTERRUPT_SOURCE   0x1500
#define PROP_RDS_INTERRUPT_SOURCE_RDSRECV   0x01
#define PROP_RX_HARD_MUTE   0x4001
#define PROP_RX_HARD_MUTE_BOTH   0x03
#define PROP_RX_HARD_MUTE_LEFT   0x02
#define PROP_RX_HARD_MUTE_RIGHT   0x01
#define PROP_RX_VOLUME   0x4000
#define RDSBLOCKWORD (   h,
 
)    (h << 8 | l)
#define SI4705_ADR   0x63

The I2C address of SI4705 is 0x61 or 0x63.