A mbed Port of 'Sparkfun Si4703 Arduino Library'.
Fork of Si4703 by
Diff: SparkFun-Si4703.cpp
- Revision:
- 2:558ef02f39d0
- Parent:
- 1:3d2b66e5d09e
- Child:
- 3:9ac35cc4a0b0
--- a/SparkFun-Si4703.cpp Fri Aug 07 04:30:15 2015 +0000 +++ b/SparkFun-Si4703.cpp Sat Aug 08 18:15:36 2015 +0000 @@ -170,11 +170,17 @@ // si4703_registers[POWERCFG] |= (1<<SMUTE) | (1<<DMUTE); //Disable Mute, disable softmute si4703_registers[SYSCONFIG1] |= (1<<RDS); //Enable RDS - si4703_registers[SYSCONFIG1] |= (1<<DE); //50kHz Europe setup + si4703_registers[SYSCONFIG1] |= (1<<DE); //50μS Europe setup si4703_registers[SYSCONFIG2] |= (1<<SPACE0); //100kHz channel spacing for Europe si4703_registers[SYSCONFIG2] &= 0xFFF0; //Clear volume bits si4703_registers[SYSCONFIG2] |= 0x0001; //Set volume to lowest + + // SI AN230 page 40 - Table 23 ('Good Quality Stations Only' Settings) + si4703_registers[SYSCONFIG2] |= (0xC<<SEEKTH); + si4703_registers[SYSCONFIG3] |= (0x7<<SKSNR); + si4703_registers[SYSCONFIG3] |= (0xF<<SKCNT); + /// updateRegisters(); //Update wait_ms(110); //Max powerup time, from datasheet page 13 @@ -250,8 +256,8 @@ uint8_t ack; readRegisters(); //Set seek mode wrap bit - si4703_registers[POWERCFG] |= (1<<SKMODE); //Allow wrap - //si4703_registers[POWERCFG] &= ~(1<<SKMODE); //Disallow wrap - if you disallow wrap, you may want to tune to 87.5 first + si4703_registers[POWERCFG] |= (1<<SKMODE); //Disallow wrap - if you disallow wrap, you may want to tune to 87.5 first + //si4703_registers[POWERCFG] &= ~(1<<SKMODE); //Allow wrap if(seekDirection == SEEK_DOWN) si4703_registers[POWERCFG] &= ~(1<<SEEKUP); //Seek down is the default upon reset else si4703_registers[POWERCFG] |= 1<<SEEKUP; //Set the bit to seek up @@ -296,5 +302,5 @@ void Si4703_Breakout::printRegs() { readRegisters(); - for (int x=0; x<16; x++) { pc->printf("Reg# 0x%X = 0x%X\r\n",x,si4703_registers[x]); } + for (int x=0; x<16; x++) { pc->printf("Reg# 0x%X = 0x%X\r\n",x,si4703_registers[x]); wait_ms(1); } }