2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
32#define SI473X_ADDR_SEN_LOW 0x11
33#define SI473X_ADDR_SEN_HIGH 0x63
37#define POWER_DOWN 0x11
38#define SET_PROPERTY 0x12
39#define GET_PROPERTY 0x13
40#define GET_INT_STATUS 0x14
43#define FM_TUNE_FREQ 0x20
44#define FM_SEEK_START 0x21
45#define FM_TUNE_STATUS 0x22
46#define FM_AGC_STATUS 0x27
47#define FM_AGC_OVERRIDE 0x28
48#define FM_RSQ_STATUS 0x23
49#define FM_RDS_STATUS 0x24
51#define FM_NB_DETECT_THRESHOLD 0x1900
52#define FM_NB_INTERVAL 0x1901
53#define FM_NB_RATE 0x1902
54#define FM_NB_IIR_FILTER 0x1903
55#define FM_NB_DELAY 0x1904
58#define FM_RDS_INT_SOURCE 0x1500
59#define FM_RDS_INT_FIFO_COUNT 0x1501
60#define FM_RDS_CONFIG 0x1502
61#define FM_RDS_CONFIDENCE 0x1503
63#define FM_DEEMPHASIS 0x1100
64#define FM_BLEND_STEREO_THRESHOLD 0x1105
65#define FM_BLEND_MONO_THRESHOLD 0x1106
66#define FM_BLEND_RSSI_STEREO_THRESHOLD 0x1800
67#define FM_BLEND_RSSI_MONO_THRESHOLD 0x1801
68#define FM_BLEND_SNR_STEREO_THRESHOLD 0x1804
69#define FM_BLEND_SNR_MONO_THRESHOLD 0x1805
70#define FM_BLEND_MULTIPATH_STEREO_THRESHOLD 0x1808
71#define FM_BLEND_MULTIPATH_MONO_THRESHOLD 0x1809
72#define FM_CHANNEL_FILTER 0x1102
73#define FM_SOFT_MUTE_MAX_ATTENUATION 0x1302
76#define FM_SEEK_BAND_BOTTOM 0x1400
77#define FM_SEEK_BAND_TOP 0x1401
78#define FM_SEEK_FREQ_SPACING 0x1402
79#define FM_SEEK_TUNE_SNR_THRESHOLD 0x1403
80#define FM_SEEK_TUNE_RSSI_THRESHOLD 0x1404
83#define NBFM_TUNE_FREQ 0x50
84#define NBFM_TUNE_STATUS 0x52
85#define NBFM_RSQ_STATUS 0x53
86#define NBFM_AGC_STATUS 0x57
87#define NBFM_AGC_OVERRIDE 0x58
91#define NBFM_MAX_TUNE_ERROR 0x5108
92#define NBFM_RSQ_INT_SOURCE 0x5200
93#define NBFM_RSQ_SNR_HI_THRESHOLD 0x5201
94#define NBFM_RSQ_SNR_LO_THRESHOLD 0x5202
95#define NBFM_RSQ_RSSI_HI_THRESHOLD 0x5203
96#define NBFM_RSQ_RSSI_LO_THRESHOLD 0x5204
97#define NBFM_VALID_SNR_THRESHOLD 0x5403
98#define NBFM_VALID_RSSI_THRESHOLD 0x5404
101#define AM_TUNE_FREQ 0x40
102#define AM_SEEK_START 0x41
103#define AM_TUNE_STATUS 0x42
104#define AM_RSQ_STATUS 0x43
105#define AM_AGC_STATUS 0x47
106#define AM_AGC_OVERRIDE 0x48
112#define SSB_TUNE_FREQ 0x40
113#define SSB_TUNE_STATUS 0x42
114#define SSB_RSQ_STATUS 0x43
115#define SSB_AGC_STATUS 0x47
116#define SSB_AGC_OVERRIDE 0x48
120#define AM_DEEMPHASIS 0x3100
121#define AM_CHANNEL_FILTER 0x3102
122#define AM_AUTOMATIC_VOLUME_CONTROL_MAX_GAIN 0x3103
123#define AM_MODE_AFC_SW_PULL_IN_RANGE 0x3104
124#define AM_MODE_AFC_SW_LOCK_IN_RANGE 0x3105
125#define AM_RSQ_INTERRUPTS 0x3200
126#define AM_RSQ_SNR_HIGH_THRESHOLD 0x3201
127#define AM_RSQ_SNR_LOW_THRESHOLD 0x3202
128#define AM_RSQ_RSSI_HIGH_THRESHOLD 0x3203
129#define AM_RSQ_RSSI_LOW_THRESHOLD 0x3204
130#define AM_SOFT_MUTE_RATE 0x3300
131#define AM_SOFT_MUTE_SLOPE 0x3301
132#define AM_SOFT_MUTE_MAX_ATTENUATION 0x3302
133#define AM_SOFT_MUTE_SNR_THRESHOLD 0x3303
134#define AM_SOFT_MUTE_RELEASE_RATE 0x3304
135#define AM_SOFT_MUTE_ATTACK_RATE 0x3305
136#define AM_SEEK_BAND_BOTTOM 0x3400
137#define AM_SEEK_BAND_TOP 0x3401
138#define AM_SEEK_FREQ_SPACING 0x3402
139#define AM_SEEK_SNR_THRESHOLD 0x3403
140#define AM_SEEK_RSSI_THRESHOLD 0x3404
141#define AM_AGC_ATTACK_RATE 0x3702
142#define AM_AGC_RELEASE_RATE 0x3703
143#define AM_FRONTEND_AGC_CONTROL 0x3705
144#define AM_NB_DETECT_THRESHOLD 0x3900
145#define AM_NB_INTERVAL 0x3901
146#define AM_NB_RATE 0x3902
147#define AM_NB_IIR_FILTER 0x3903
148#define AM_NB_DELAY 0x3904
150#define RX_VOLUME 0x4000
151#define RX_HARD_MUTE 0x4001
156#define GPO_IEN 0x0001
157#define SSB_BFO 0x0100
158#define SSB_MODE 0x0101
159#define SSB_RSQ_INTERRUPTS 0x3200
160#define SSB_RSQ_SNR_HI_THRESHOLD 0x3201
161#define SSB_RSQ_SNR_LO_THRESHOLD 0x3202
162#define SSB_RSQ_RSSI_HI_THRESHOLD 0x3203
163#define SSB_RSQ_RSSI_LO_THRESHOLD 0x3204
164#define SSB_SOFT_MUTE_RATE 0x3300
165#define SSB_SOFT_MUTE_MAX_ATTENUATION 0x3302
166#define SSB_SOFT_MUTE_SNR_THRESHOLD 0x3303
167#define SSB_RF_AGC_ATTACK_RATE 0x3700
168#define SSB_RF_AGC_RELEASE_RATE 0x3701
169#define SSB_IF_AGC_RELEASE_RATE 0x3703
170#define SSB_IF_AGC_ATTACK_RATE 0x3702
173#define SSB_RF_IF_AGC_ATTACK_RATE 0x3702
174#define SSB_RF_IF_AGC_RELEASE_RATE 0x3703
181#define SI473X_RDS_OUTPUT_ONLY 0b00000000
182#define SI473X_ANALOG_AUDIO 0b00000101
183#define SI473X_DIGITAL_AUDIO1 0b00001011
184#define SI473X_DIGITAL_AUDIO2 0b10110000
185#define SI473X_ANALOG_DIGITAL_AUDIO 0b10110101
188#define DIGITAL_OUTPUT_FORMAT 0x0102
189#define DIGITAL_OUTPUT_SAMPLE_RATE 0x0104
190#define REFCLK_FREQ 0x0201
191#define REFCLK_PRESCALE 0x0202
194#define FM_CURRENT_MODE 0
195#define AM_CURRENT_MODE 1
196#define SSB_CURRENT_MODE 2
197#define NBFM_CURRENT_MODE 3
202#define MAX_DELAY_AFTER_SET_FREQUENCY 30
203#define MAX_DELAY_AFTER_POWERUP 10
204#define MIN_DELAY_WAIT_SEND_LOOP 300
205#define MAX_SEEK_TIME 8000
207#define DEFAULT_CURRENT_AVC_AM_MAX_GAIN 36
209#define XOSCEN_CRYSTAL 1
213
214
215
216
217
218
219
220
221
222
223
224
225
228
229
230
231
232
233
251
252
253
254
255
256
257
258
273
274
275
276
277
278
279
280
300
301
302
303
304
316
317
318
327} si47x_antenna_capacitor;
330
331
332
333
334
335
350} si47x_set_frequency;
353
354
355
356
357
358
359
360
361
362
367 uint8_t RESERVED1 : 2;
370 uint8_t RESERVED2 : 4;
376
377
378
379
380
381
382
383
390} si47x_seek_am_complement;
393
394
395
396
397
398
415
416
417
418
419
420
421
422
454} si47x_response_status;
457
458
459
460
461
462
463
464
488} si47x_firmware_information;
491
492
493
494
495
496
497
498
499
500
501
524} si47x_firmware_query_library;
527
528
529
530
531
532
533
534
541 uint8_t RESERVED2 : 6;
547
548
549
550
551
552
564
565
566
567
568
569
570
571
585 uint8_t RSSIILINT : 1;
586 uint8_t RSSIHINT : 1;
589 uint8_t MULTLINT : 1;
590 uint8_t MULTHINT : 1;
592 uint8_t BLENDINT : 1;
612
613
614
615
621 uint8_t MIN_GAIN_INDEX;
624} si47x_frontend_agc_control;
627
628
629
630
631
632
633
640 uint8_t STATUSONLY : 1;
647
648
649
650
651
652
667 uint8_t RDSSYNCLOST : 1;
668 uint8_t RDSSYNCFOUND : 1;
670 uint8_t RDSNEWBLOCKA : 1;
671 uint8_t RDSNEWBLOCKB : 1;
702
703
704
705
706
707
708
714 uint8_t RDSSYNCLOST : 1;
715 uint8_t RDSSYNCFOUND : 1;
717 uint8_t RDSNEWBLOCKA : 1;
718 uint8_t RDSNEWBLOCKB : 1;
723} si47x_rds_int_source;
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
756
757
758
759
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
795 uint16_t address : 2;
799 uint16_t programType : 5;
800 uint16_t trafficProgramCode : 1;
801 uint16_t versionCode : 1;
802 uint16_t groupType : 4;
806 uint16_t address : 4;
807 uint16_t textABFlag : 1;
808 uint16_t programType : 5;
809 uint16_t trafficProgramCode : 1;
810 uint16_t versionCode : 1;
811 uint16_t groupType : 4;
815 uint16_t content : 4;
816 uint16_t textABFlag : 1;
817 uint16_t programType : 5;
818 uint16_t trafficProgramCode : 1;
819 uint16_t versionCode : 1;
820 uint16_t groupType : 4;
830
831
832
833
834
835
836
837
839
840
841
842
843
844
845
846
847
848
849
850
853
854
855
856
857
858
859
860
861
862
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
885 uint32_t offset_sense : 1;
891} si47x_rds_date_time;
894
895
896
897
898
899
900
901
924
925
926
927
928
929
930
931
943} si47x_agc_overrride;
946
947
948
949
950
951
952
953
954
955
956
957
958
959
970} si47x_bandwidth_config;
973
974
975
976
977
978
984 uint8_t SBCUTFLT : 4;
985 uint8_t AVC_DIVIDER : 4;
987 uint8_t SMUTESEL : 1;
989 uint8_t DSP_AFCDIS : 1;
995
996
997
998
999
1000
1001
1002
1003
1015} si4735_digital_output_format;
1018
1019
1020
1021
1022
1023
1028 uint8_t reserved[8];
1030 uint8_t patch_id[14];
1031 uint16_t patch_size;
1034} si4735_eeprom_patch_header;
1037
1038
1039
1040
1041
1042
1043
1044
1048} si4735_digital_output_sample_rate;
1051
1052
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1133 void sendProperty(uint16_t propertyNumber, uint16_t param);
1138
1139
1140
1141
1144
1145
1146
1147
1151
1152
1153
1154
1157
1158
1159
1160
1164
1165
1166
1167
1170
1171
1172
1173
1183 void setGpioCtl(uint8_t GPO1OEN, uint8_t GPO2OEN, uint8_t GPO3OEN);
1184 void setGpio(uint8_t GPO1LEVEL, uint8_t GPO2LEVEL, uint8_t GPO3LEVEL);
1185 void setGpioIen(uint8_t STCIEN, uint8_t RSQIEN, uint8_t ERRIEN, uint8_t CTSIEN, uint8_t STCREP, uint8_t RSQREP);
1187 void setup(uint8_t resetPin, uint8_t defaultFunction);
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1211 sendProperty(propertyNumber, param);
1214 void sendCommand(uint8_t cmd,
int parameter_size,
const uint8_t *parameter);
1218 void setPowerUp(uint8_t CTSIEN, uint8_t GPO2OEN, uint8_t PATCH, uint8_t XOSCEN, uint8_t FUNC, uint8_t OPMODE);
1230
1231
1232
1233
1236
1237
1238
1239
1240
1243 return currentStatus.resp.RSQINT;
1247
1248
1249
1250
1251
1254 return currentStatus.resp.RDSINT;
1258
1259
1260
1261
1262
1265 return currentStatus.resp.STCINT;
1269
1270
1271
1272
1273
1276 return currentStatus.resp.ERR;
1280
1281
1282
1283
1284
1288
1289
1290
1291
1292
1295 return currentStatus.resp.AFCRL;
1299
1300
1301
1302
1303
1304
1305
1308 return currentStatus.resp.BLTF;
1312
1313
1314
1315
1316
1317
1318
1319
1322 return currentStatus.resp.VALID;
1326
1327
1328
1329
1330
1333 return currentStatus.resp.RSSI;
1337
1338
1339
1340
1341
1342
1343
1346 return currentStatus.resp.SNR;
1350
1351
1352
1353
1354
1355
1356
1359 return currentStatus.resp.MULT;
1363
1364
1365
1366
1367
1368
1369
1370
1373 si47x_antenna_capacitor cap;
1376 return currentStatus.resp.READANTCAP;
1379 cap.raw.ANTCAPL = currentStatus.resp.READANTCAP;
1380 cap.raw.ANTCAPH = currentStatus.resp.MULT;
1388
1389
1390
1394 currentAvcAmMaxGain = 90;
1398
1399
1400
1404 currentAvcAmMaxGain = 12;
1408
1409
1410
1420
1421
1422
1423
1424
1427 return currentAvcAmMaxGain;
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1447
1448
1449
1450
1451
1452
1453
1454
1461
1462
1463
1464
1465
1466
1473
1474
1475
1476
1477
1478
1485
1486
1487
1488
1489
1492 return !currentAgcStatus.refined.AGCDIS;
1496
1497
1498
1499
1500
1503 return currentAgcStatus.refined.AGCIDX;
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525 inline void setAGC(uint8_t AGCDIS, uint8_t AGCIDX) { setAutomaticGainControl(AGCDIS, AGCIDX); };
1527 void setSsbAgcOverrite(uint8_t SSBAGCDIS, uint8_t SSBAGCNDX, uint8_t reserved = 0);
1535
1536
1537
1538
1539
1542 return currentRqsStatus.resp.RSSI;
1546
1547
1548
1549
1550
1553 return currentRqsStatus.resp.SNR;
1557
1558
1559
1560
1561
1564 return currentRqsStatus.resp.RSSIILINT;
1568
1569
1570
1571
1572
1575 return currentRqsStatus.resp.RSSIHINT;
1579
1580
1581
1582
1583
1586 return currentRqsStatus.resp.SNRLINT;
1590
1591
1592
1593
1594
1597 return currentRqsStatus.resp.SNRHINT;
1601
1602
1603
1604
1605
1608 return currentRqsStatus.resp.VALID;
1612
1613
1614
1615
1616
1619 return currentRqsStatus.resp.AFCRL;
1623
1624
1625
1626
1627
1628
1629
1632 return currentRqsStatus.resp.SMUTE;
1638
1639
1640
1641
1642
1645 return currentRqsStatus.resp.STBLEND;
1649
1650
1651
1652
1653
1654
1655
1658 return currentRqsStatus.resp.PILOT;
1662
1663
1664
1665
1666
1667
1668
1671 return currentRqsStatus.resp.MULT;
1675
1676
1677
1678
1679
1682 return currentRqsStatus.resp.FREQOFF;
1686
1687
1688
1689
1690
1691
1694 return currentRqsStatus.resp.MULTLINT;
1698
1699
1700
1701
1702
1703
1706 return currentRqsStatus.resp.MULTHINT;
1710
1711
1712
1713
1714
1715
1718 return currentRqsStatus.resp.BLENDINT;
1722
1723
1724
1725
1728
1729
1730
1731
1732
1735 return firmwareInfo.resp.PN;
1739
1740
1741
1742
1743
1746 return firmwareInfo.resp.FWMAJOR;
1750
1751
1752
1753
1754
1757 return firmwareInfo.resp.FWMINOR;
1761
1762
1763
1764
1765
1768 return firmwareInfo.resp.PATCHH;
1772
1773
1774
1775
1776
1779 return firmwareInfo.resp.PATCHL;
1783
1784
1785
1786
1787
1790 return firmwareInfo.resp.CMPMAJOR;
1794
1795
1796
1797
1798
1801 return firmwareInfo.resp.CMPMINOR;
1805
1806
1807
1808
1809
1812 return firmwareInfo.resp.CHIPREV;
1821
1822
1823
1824
1825
1829
1830
1831
1832
1833
1836
1837
1838
1839
1840
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1863 currentAudioMode = audioMode;
1867
1868
1869
1870
1871
1872
1885 void setAM(uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step);
1886 void setFM(uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step);
1889
1890
1891
1892
1893
1894
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1917
1918
1919
1920
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938 inline void setFmNoiseBlank(uint16_t nb_rate = 64, uint16_t nb_interval = 55, uint16_t nb_irr_filter = 300)
1946
1947
1948
1949
1956
1957
1958
1959
1960
1967
1968
1969
1970
1977
1978
1979
1980
1987
1988
1989
1990
1991
1992
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2015
2016
2017
2018
2019
2020
2021
2022
2029
2030
2031
2032
2033
2034
2035
2036
2043
2044
2045
2046
2047
2048
2049
2056
2057
2058
2059
2060
2061
2062
2069
2070
2071
2072
2073
2074
2075
2082
2083
2084
2085
2086
2087
2088
2095
2096
2097
2098
2099
2100
2101
2108
2109
2110
2111
2112
2113
2114
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2136 si47x_frontend_agc_control param;
2138 param.field.MIN_GAIN_INDEX = MIN_GAIN_INDEX;
2139 param.field.ATTN_BACKUP = ATTN_BACKUP;
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158 inline void setAmNoiseBlank(uint16_t nb_rate = 64, uint16_t nb_interval = 55, uint16_t nb_irr_filter = 300)
2166
2167
2168
2169
2176
2177
2178
2179
2180
2181
2188
2189
2190
2191
2192
2193
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2220
2221
2222
2223
2224
2227 return currentFrequencyParams.arg.FAST;
2231
2232
2233
2234
2235
2236
2239 currentFrequencyParams.arg.FAST = FAST;
2243
2244
2245
2246
2247
2250 return currentFrequencyParams.arg.FREEZE;
2254
2255
2256
2257
2258
2259
2262 currentFrequencyParams.arg.FREEZE = FREEZE;
2271
2272
2273
2274
2275
2279
2280
2281
2282
2283
2291
2292
2293
2294
2295
2296
2297
2298
2299
2306
2307
2308
2309
2310
2311
2312
2315 seekStationProgress(NULL,
SEEK_UP);
2319
2320
2321
2322
2323
2324
2325
2335 void seekStationProgress(
void (*showFunc)(uint16_t f),
bool (*stopSeking)(), uint8_t up_down);
2342
2343
2344
2345
2346
2347
2351
2352
2353
2354
2355
2356
2357
2367
2368
2369
2370
2371
2372
2376
2377
2378
2379
2380
2381
2382
2383
2384
2402
2403
2404
2405
2406
2408 void setRdsIntSource(uint8_t RDSRECV, uint8_t RDSSYNCLOST, uint8_t RDSSYNCFOUND, uint8_t RDSNEWBLOCKA, uint8_t RDSNEWBLOCKB);
2409 void getRdsStatus(uint8_t INTACK, uint8_t MTFIFO, uint8_t STATUSONLY);
2411
2412
2413
2414
2415
2416
2417
2418
2422
2423
2424
2425
2426
2429 return currentRdsStatus.resp.RDSRECV;
2433
2434
2435
2436
2437
2440 return currentRdsStatus.resp.RDSSYNCLOST;
2444
2445
2446
2447
2448
2451 return currentRdsStatus.resp.RDSSYNCFOUND;
2455
2456
2457
2458
2459
2460
2463 return currentRdsStatus.resp.RDSNEWBLOCKA;
2467
2468
2469
2470
2471
2474 return currentRdsStatus.resp.RDSNEWBLOCKB;
2478
2479
2480
2481
2482
2485 return currentRdsStatus.resp.RDSSYNC;
2489
2490
2491
2492
2493
2496 return currentRdsStatus.resp.GRPLOST;
2500
2501
2502
2503
2504
2507 return currentRdsStatus.resp.RDSFIFOUSED;
2511
2512
2513
2514
2515
2522
2523
2524
2525
2526
2533
2534
2535
2536
2543
2544
2545
2546
2547
2554
2555
2556
2557
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2580
2581
2582
2583
2584
2591
2592
2593
2594
2595
2601 void setRdsConfig(uint8_t RDSEN, uint8_t BLETHA, uint8_t BLETHB, uint8_t BLETHC, uint8_t BLETHD);
2613 bool getRdsAllData(
char **stationName,
char **stationInformation,
char **programInformation,
char **utcTime);
2616
2617
2618
2619
2620
2621
2622
2626
2627
2628
2629
2630
2631
2632
2636
2637
2638
2639
2640
2641
2644 void mjdConverter(uint32_t mjd, uint32_t *year, uint32_t *month, uint32_t *day);
2647 bool getRdsDateTime(uint16_t *year, uint16_t *month, uint16_t *day, uint16_t *hour, uint16_t *minute);
2653 void setSSBConfig(uint8_t AUDIOBW, uint8_t SBCUTFLT, uint8_t AVC_DIVIDER, uint8_t AVCEN, uint8_t SMUTESEL, uint8_t DSP_AFCDIS);
2654 void setSSB(uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step, uint8_t usblsb);
2655 void setSSB(uint8_t usblsb);
2661
2662
2663
2664
2665
2673 void setNBFM(uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step);
2675 void loadPatchNBFM(
const uint8_t *patch_content,
const uint16_t patch_content_size);
2680 bool downloadPatch(
const uint8_t *ssb_patch_content,
const uint16_t ssb_patch_content_size);
2681 bool downloadCompressedPatch(
const uint8_t *ssb_patch_content,
const uint16_t ssb_patch_content_size,
const uint16_t *cmd_0x15,
const int16_t cmd_0x15_size);
2682 void loadPatch(
const uint8_t *ssb_patch_content,
const uint16_t ssb_patch_content_size, uint8_t ssb_audiobw = 1);
2683 void loadCompressedPatch(
const uint8_t *ssb_patch_content,
const uint16_t ssb_patch_content_size,
const uint16_t *cmd_0x15,
const int16_t cmd_0x15_size, uint8_t ssb_audiobw = 1);
2688
2689
2690
2691
2692
2693
2694
2695
2696
2699 this->maxDelayAfterPouwerUp = ms;
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2715 this->maxDelaySetFrequency = ms;
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2745 this->currentStep = step;
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2761 return this->currentWorkFrequency;
2765
2766
2767
2768
2769
2780
2781
2782
2783
2786
2787
2788
2791 Wire.setClock(10000);
2795
2796
2797
2798
2802
2803
2804
2805
2808 Wire.setClock(400000);
2812
2813
2814
2815
2816
2817
2818
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2836 audioMuteMcuPin = pin;
2837 pinMode(audioMuteMcuPin, OUTPUT);
2841
2842
2843
2844
2845
2846
2847
2848
2849
2852 digitalWrite(audioMuteMcuPin, on);
2853 delayMicroseconds(300);
2856 void convertToChar(uint16_t value,
char *strValue, uint8_t len, uint8_t dot, uint8_t separator,
bool remove_leading_zeros =
true);
#define AM_DEEMPHASIS
Definition: SI4735.h:120
#define SSB_AGC_STATUS
Definition: SI4735.h:115
#define AM_AGC_STATUS
Definition: SI4735.h:105
#define MIN_DELAY_WAIT_SEND_LOOP
Definition: SI4735.h:204
#define SI473X_ADDR_SEN_HIGH
Definition: SI4735.h:33
#define GPO_IEN
Definition: SI4735.h:156
#define FM_SEEK_BAND_BOTTOM
Definition: SI4735.h:76
#define FM_TUNE_STATUS
Definition: SI4735.h:45
#define SSB_MODE
Definition: SI4735.h:158
#define SSB_BFO
Definition: SI4735.h:157
#define FM_SEEK_START
Definition: SI4735.h:44
#define AM_SEEK_BAND_TOP
Definition: SI4735.h:137
#define FM_BLEND_SNR_MONO_THRESHOLD
Definition: SI4735.h:69
#define AM_AGC_OVERRIDE
Definition: SI4735.h:106
#define AM_SOFT_MUTE_SLOPE
Definition: SI4735.h:131
#define AM_NB_DELAY
Definition: SI4735.h:148
#define AM_NB_INTERVAL
Definition: SI4735.h:145
#define AM_AUTOMATIC_VOLUME_CONTROL_MAX_GAIN
Definition: SI4735.h:122
#define XOSCEN_CRYSTAL
Definition: SI4735.h:209
#define NBFM_TUNE_FREQ
Definition: SI4735.h:83
#define DEFAULT_CURRENT_AVC_AM_MAX_GAIN
Definition: SI4735.h:207
#define AM_CURRENT_MODE
Definition: SI4735.h:195
#define MAX_DELAY_AFTER_SET_FREQUENCY
Definition: SI4735.h:202
#define SSB_RF_AGC_ATTACK_RATE
Definition: SI4735.h:167
#define AM_SEEK_SNR_THRESHOLD
Definition: SI4735.h:139
#define AM_CHANNEL_FILTER
Definition: SI4735.h:121
#define FM_NB_DETECT_THRESHOLD
Definition: SI4735.h:51
#define SI473X_ADDR_SEN_LOW
Definition: SI4735.h:32
#define NBFM_CURRENT_MODE
Definition: SI4735.h:197
#define AM_RSQ_STATUS
Definition: SI4735.h:104
#define AM_SOFT_MUTE_MAX_ATTENUATION
Definition: SI4735.h:132
#define AM_SEEK_FREQ_SPACING
Definition: SI4735.h:138
#define SSB_RF_AGC_RELEASE_RATE
Definition: SI4735.h:168
#define AM_TUNE_FREQ
Definition: SI4735.h:101
#define AM_FRONTEND_AGC_CONTROL
Definition: SI4735.h:143
#define RX_HARD_MUTE
Definition: SI4735.h:151
#define NBFM_RSQ_STATUS
Definition: SI4735.h:85
#define NBFM_AGC_OVERRIDE
Definition: SI4735.h:87
#define SEEK_UP
Definition: SI4735.h:199
#define REFCLK_PRESCALE
Definition: SI4735.h:191
#define SSB_IF_AGC_RELEASE_RATE
Definition: SI4735.h:169
#define NBFM_TUNE_STATUS
Definition: SI4735.h:84
#define SEEK_DOWN
Definition: SI4735.h:200
#define FM_BLEND_MULTIPATH_MONO_THRESHOLD
Definition: SI4735.h:71
#define AM_AGC_RELEASE_RATE
Definition: SI4735.h:142
#define FM_AGC_OVERRIDE
Definition: SI4735.h:47
#define SSB_IF_AGC_ATTACK_RATE
Definition: SI4735.h:170
#define AM_NB_RATE
Definition: SI4735.h:146
#define FM_BLEND_STEREO_THRESHOLD
Definition: SI4735.h:64
#define FM_BLEND_MULTIPATH_STEREO_THRESHOLD
Definition: SI4735.h:70
#define FM_NB_IIR_FILTER
Definition: SI4735.h:54
#define FM_RDS_INT_SOURCE
Definition: SI4735.h:58
#define FM_SOFT_MUTE_MAX_ATTENUATION
Definition: SI4735.h:73
#define DIGITAL_OUTPUT_SAMPLE_RATE
Definition: SI4735.h:189
#define FM_BLEND_MONO_THRESHOLD
Definition: SI4735.h:65
#define FM_BLEND_RSSI_MONO_THRESHOLD
Definition: SI4735.h:67
#define MAX_DELAY_AFTER_POWERUP
Definition: SI4735.h:203
#define SET_PROPERTY
Definition: SI4735.h:38
#define FM_BLEND_SNR_STEREO_THRESHOLD
Definition: SI4735.h:68
#define FM_SEEK_TUNE_RSSI_THRESHOLD
Definition: SI4735.h:80
#define FM_RSQ_STATUS
Definition: SI4735.h:48
#define DIGITAL_OUTPUT_FORMAT
Definition: SI4735.h:188
#define XOSCEN_RCLK
Definition: SI4735.h:210
#define GET_REV
Definition: SI4735.h:36
#define FM_DEEMPHASIS
Definition: SI4735.h:63
#define FM_SEEK_TUNE_SNR_THRESHOLD
Definition: SI4735.h:79
#define FM_TUNE_FREQ
Definition: SI4735.h:43
#define AM_NB_IIR_FILTER
Definition: SI4735.h:147
#define POWER_DOWN
Definition: SI4735.h:37
#define AM_SEEK_RSSI_THRESHOLD
Definition: SI4735.h:140
#define AM_SOFT_MUTE_SNR_THRESHOLD
Definition: SI4735.h:133
#define FM_NB_INTERVAL
Definition: SI4735.h:52
#define GET_INT_STATUS
Definition: SI4735.h:40
#define SSB_TUNE_FREQ
Definition: SI4735.h:112
#define SSB_AGC_OVERRIDE
Definition: SI4735.h:116
#define AM_SOFT_MUTE_RATE
Definition: SI4735.h:130
#define AM_SOFT_MUTE_ATTACK_RATE
Definition: SI4735.h:135
#define FM_BLEND_RSSI_STEREO_THRESHOLD
Definition: SI4735.h:66
#define POWER_UP
Definition: SI4735.h:35
#define FM_RDS_STATUS
Definition: SI4735.h:49
#define GPIO_CTL
Definition: SI4735.h:107
#define FM_SEEK_FREQ_SPACING
Definition: SI4735.h:78
#define FM_AGC_STATUS
Definition: SI4735.h:46
#define NBFM_AGC_STATUS
Definition: SI4735.h:86
#define FM_NB_RATE
Definition: SI4735.h:53
#define FM_CURRENT_MODE
Definition: SI4735.h:194
#define MAX_SEEK_TIME
Definition: SI4735.h:205
#define GET_PROPERTY
Definition: SI4735.h:39
#define AM_SEEK_START
Definition: SI4735.h:102
#define SSB_CURRENT_MODE
Definition: SI4735.h:196
#define FM_NB_DELAY
Definition: SI4735.h:55
#define AM_SOFT_MUTE_RELEASE_RATE
Definition: SI4735.h:134
#define REFCLK_FREQ
Definition: SI4735.h:190
#define SSB_SOFT_MUTE_MAX_ATTENUATION
Definition: SI4735.h:165
#define AM_TUNE_STATUS
Definition: SI4735.h:103
#define AM_AGC_ATTACK_RATE
Definition: SI4735.h:141
#define FM_SEEK_BAND_TOP
Definition: SI4735.h:77
#define RX_VOLUME
Definition: SI4735.h:150
#define GPIO_SET
Definition: SI4735.h:108
#define AM_SEEK_BAND_BOTTOM
Definition: SI4735.h:136
#define FM_RDS_CONFIG
Definition: SI4735.h:60
#define FM_CHANNEL_FILTER
Definition: SI4735.h:72
#define SI473X_ANALOG_AUDIO
Definition: SI4735.h:182
#define FM_RDS_INT_FIFO_COUNT
Definition: SI4735.h:59
SI4735 Class.
Definition: SI4735.h:1066
uint8_t ctsIntEnable
Definition: SI4735.h:1102
uint8_t currentSsbStatus
Definition: SI4735.h:1123
bool rdsEndGroupB
Definition: SI4735.h:1078
void setFmNoiseBlankInterval(uint16_t parameter)
Set the Fm Noise Blank Interval.
Definition: SI4735.h:1950
char rds_buffer2A[65]
RDS Radio Text buffer - Program Information.
Definition: SI4735.h:1068
int rdsTextAdress0A
rds_buffer0A current position
Definition: SI4735.h:1075
si473x_powerup powerUp
Definition: SI4735.h:1118
uint8_t lastMode
Stores the last mode used.
Definition: SI4735.h:1098
int8_t audioMuteMcuPin
Definition: SI4735.h:1124
int rdsTextAdress2A
rds_buffer2A current position
Definition: SI4735.h:1073
uint8_t currentClockType
Stores the current clock type used (Crystal or REF CLOCK)
Definition: SI4735.h:1101
void setAmNoiseBlank(uint16_t nb_rate=64, uint16_t nb_interval=55, uint16_t nb_irr_filter=300)
Set the Am Noise Blank.
Definition: SI4735.h:2158
int16_t deviceAddress
Stores the current I2C bus address.
Definition: SI4735.h:1080
uint16_t refClock
Frequency of Reference Clock in Hz.
Definition: SI4735.h:1105
void setFmNoiseBlankThreshold(uint16_t parameter)
Set the Fm Noise Blank Threshold.
Definition: SI4735.h:1921
si47x_rds_status currentRdsStatus
current RDS status
Definition: SI4735.h:1114
si47x_frequency currentFrequency
data structure to get current frequency
Definition: SI4735.h:1109
uint16_t currentMinimumFrequency
minimum frequency of the current band
Definition: SI4735.h:1092
uint8_t currentAudioMode
Current audio mode used (ANALOG or DIGITAL or both)
Definition: SI4735.h:1122
bool rdsEndGroupA
Definition: SI4735.h:1077
uint8_t refClockSourcePin
0 = RCLK pin is clock source; 1 = DCLK pin is clock source.
Definition: SI4735.h:1107
void setFmNoiseBlankRate(uint16_t parameter)
Set the Fm Noise Blank Rate.
Definition: SI4735.h:1961
uint16_t maxDelaySetFrequency
Stores the maximum delay after set frequency command (in ms).
Definition: SI4735.h:1083
uint8_t resetPin
pin used on Arduino Board to RESET the Si47XX device
Definition: SI4735.h:1088
uint8_t currentAvcAmMaxGain
Stores the current Automatic Volume Control Gain for AM.
Definition: SI4735.h:1100
si47x_ssb_mode currentSSBMode
indicates if USB or LSB
Definition: SI4735.h:1116
char rds_buffer2B[33]
RDS Radio Text buffer - Station Informaation.
Definition: SI4735.h:1069
si47x_response_status currentStatus
current device status
Definition: SI4735.h:1112
uint16_t maxDelayAfterPouwerUp
Stores the maximum delay you have to setup after a power up command (in ms).
Definition: SI4735.h:1084
SI4735()
Construct a new SI4735::SI4735.
Definition: SI4735.cpp:60
si47x_set_frequency currentFrequencyParams
Definition: SI4735.h:1110
void setFmNoiseBlankDelay(uint16_t parameter)
Set the Fm Noise Blank Delay.
Definition: SI4735.h:1971
void setFmNoiseBlank_IIR_Filter(uint16_t parameter)
Set the FmNoiseBlank IIR Filter.
Definition: SI4735.h:1981
uint16_t refClockPrescale
Prescaler for Reference Clock (divider).
Definition: SI4735.h:1106
uint16_t currentWorkFrequency
current frequency
Definition: SI4735.h:1094
si47x_rqs_status currentRqsStatus
current Radio SIgnal Quality status
Definition: SI4735.h:1111
uint8_t gpo2Enable
Definition: SI4735.h:1103
uint16_t currentMaximumFrequency
maximum frequency of the current band
Definition: SI4735.h:1093
uint8_t volume
Stores the current vlume setup (0-63).
Definition: SI4735.h:1120
uint8_t lastTextFlagAB
Definition: SI4735.h:1087
char rds_buffer0A[9]
RDS Basic tuning and switching information (Type 0 groups)
Definition: SI4735.h:1070
uint8_t currentTune
tell the current tune (FM, AM or SSB)
Definition: SI4735.h:1090
void setFmNoiseBlank(uint16_t nb_rate=64, uint16_t nb_interval=55, uint16_t nb_irr_filter=300)
Set the Fm Noise Blank.
Definition: SI4735.h:1938
si47x_firmware_information firmwareInfo
firmware information
Definition: SI4735.h:1113
unsigned long maxSeekTime
Stores the maximum time (ms) for a seeking process. Defines the maximum seeking time.
Definition: SI4735.h:1085
uint16_t currentStep
Stores the current step used to increment or decrement the frequency.
Definition: SI4735.h:1096
int rdsTextAdress2B
rds_buffer2B current position
Definition: SI4735.h:1074
si47x_agc_status currentAgcStatus
current AGC status
Definition: SI4735.h:1115
bool isCurrentTuneFM()
Definition: SI4735.h:2170
void setFmBandwidth(uint8_t filter_value=0)
Sets the Bandwith on FM mode.
Definition: SI4735.h:2214
char rds_time[25]
RDS date time received information.
Definition: SI4735.h:1071
uint16_t raw
Definition: SI4735.h:1014
uint8_t raw[8]
Definition: SI4735.h:608
uint8_t raw[3]
Definition: SI4735.h:920
uint8_t raw
Definition: SI4735.h:643
uint8_t raw[6]
Definition: SI4735.h:890
uint8_t raw[8]
Definition: SI4735.h:523
uint8_t raw[13]
Definition: SI4735.h:698
uint8_t ARG2
Definition: SI4735.h:386
uint8_t raw[5]
Definition: SI4735.h:349
uint8_t raw[2]
Definition: SI4735.h:942
uint16_t value
Definition: SI4735.h:560
uint8_t raw
Definition: SI4735.h:372
uint8_t raw
Definition: SI4735.h:411
uint8_t raw[32]
Definition: SI4735.h:1033
uint16_t DOSR
Definition: SI4735.h:1047
uint8_t raw[8]
Check it.
Definition: SI4735.h:453
uint8_t ARG3
Definition: SI4735.h:387
uint16_t raw
Definition: SI4735.h:296
uint8_t raw[9]
Definition: SI4735.h:487
uint16_t value
Definition: SI4735.h:326
uint8_t raw[2]
Definition: SI4735.h:969
uint16_t value
frequency (integer value)
Definition: SI4735.h:312
uint8_t raw[2]
Raw powerup parameters data. Same arg memory position. So, same content.
Definition: SI4735.h:247
uint8_t raw[2]
Definition: SI4735.h:722
uint8_t raw[2]
Definition: SI4735.h:991
uint8_t ANTCAPL
Definition: SI4735.h:389
uint8_t raw[2]
Definition: SI4735.h:752
uint8_t ANTCAPH
Definition: SI4735.h:388
uint8_t raw
Definition: SI4735.h:269
uint8_t raw
Definition: SI4735.h:543
uint16_t word
Definition: SI4735.h:623
void setGpioCtl(uint8_t GPO1OEN, uint8_t GPO2OEN, uint8_t GPO3OEN)
Enables output for GPO1, 2, and 3.
Definition: SI4735.cpp:119
void setGpio(uint8_t GPO1LEVEL, uint8_t GPO2LEVEL, uint8_t GPO3LEVEL)
Sets the output level (high or low) for GPO1, 2, and 3.
Definition: SI4735.cpp:158
void setDeviceOtherI2CAddress(uint8_t i2cAddr)
Sets the other I2C Bus Address (for Si470X)
Definition: SI4735.cpp:288
void 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.
Definition: SI4735.cpp:195
void setDeviceI2CAddress(uint8_t senPin)
Sets the I2C Bus Address.
Definition: SI4735.cpp:273
int16_t getDeviceI2CAddress(uint8_t resetPin)
I2C bus address setup.
Definition: SI4735.cpp:225
si47x_status getInterruptStatus()
Updates bits 6:0 of the status byte.
Definition: SI4735.cpp:83
uint8_t getFirmwarePATCHH()
Returns the Firmware P A T C H HIGH.
Definition: SI4735.h:1766
uint8_t getFirmwareFWMINOR()
Returns the Firmware F W M I N O R.
Definition: SI4735.h:1755
void waitToSend(void)
Wait for the si473x is ready (Clear to Send (CTS) status bit have to be 1).
Definition: SI4735.cpp:321
uint8_t getFirmwareCMPMINOR()
RESP6 - Returns the Component Major Revision (ASCII).
Definition: SI4735.h:1799
uint8_t getFirmwarePN()
Returns the Firmware Part Number.
Definition: SI4735.h:1733
uint8_t getFirmwareCMPMAJOR()
Get the Firmware C M P M A J O R object.
Definition: SI4735.h:1788
uint8_t getFirmwarePATCHL()
Returns the Firmware P A T C H LOW.
Definition: SI4735.h:1777
uint8_t getFirmwareFWMAJOR()
Returns the Firmware F W M A J O R.
Definition: SI4735.h:1744
uint8_t getFirmwareCHIPREV()
RESP8 - Returns the Chip Revision (ASCII)
Definition: SI4735.h:1810
void setMaxDelayPowerUp(uint16_t ms)
Set the Max Delay Power Up.
Definition: SI4735.h:2697
void reset(void)
Reset the SI473X.
Definition: SI4735.cpp:302
void getFirmware(void)
Gets firmware information.
Definition: SI4735.cpp:481
void radioPowerUp(void)
Powerup the Si47XX.
Definition: SI4735.cpp:409
void analogPowerUp(void)
You have to call setPowerUp method before.
Definition: SI4735.cpp:444
void setRefClock(uint16_t refclk)
Sets the frequency of the REFCLK from the output of the prescaler.
Definition: SI4735.cpp:524
void 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.
Definition: SI4735.cpp:351
void setup(uint8_t resetPin, uint8_t defaultFunction)
Starts the Si473X device.
Definition: SI4735.cpp:619
void powerDown(void)
Moves the device from powerup to powerdown mode.
Definition: SI4735.cpp:459
void 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.
Definition: SI4735.cpp:553
void 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.
Definition: SI4735.cpp:579
bool getCurrentRssiDetectLow()
Checks if RSSI detected is LOW.
Definition: SI4735.h:1562
uint8_t getStatusMULT()
Get the Status the M U L T.
Definition: SI4735.h:1357
bool getCurrentPilot()
Checks the current pilot.
Definition: SI4735.h:1656
bool getCurrentSnrDetectLow()
Checks if SNR detect is low.
Definition: SI4735.h:1584
bool getCurrentBlendDetectInterrupt()
Gets the Current Blend Detect Interrupt.
Definition: SI4735.h:1716
void setAMSoftMuteSlop(uint8_t parameter)
Sets the AM attenuation slope during soft mute.
Definition: SI4735.h:2009
bool getBandLimit()
Returns true if a seek hit the band limit.
Definition: SI4735.h:1306
void seekStationDown()
Search the previous station.
Definition: SI4735.h:2326
void setAGC(uint8_t AGCDIS, uint8_t AGCIDX)
Automatic Gain Control setup (alternative name for setAutomaticGainControl )
Definition: SI4735.h:1525
void setAutomaticGainControl(uint8_t AGCDIS, uint8_t AGCIDX)
Automatic Gain Control setup.
Definition: SI4735.cpp:1053
uint8_t getCurrentSignedFrequencyOffset()
Gets the Signed frequency offset (kHz).
Definition: SI4735.h:1680
bool getTuneCompleteTriggered()
Get the Tune Complete status.
Definition: SI4735.h:1263
void setFMDeEmphasis(uint8_t parameter)
Sets the FM Receive de-emphasis to 50 or 75 μs.
Definition: SI4735.h:1895
void seekStation(uint8_t SEEKUP, uint8_t WRAP)
Look for a station (Automatic tune)
Definition: SI4735.cpp:1183
void seekStationProgress(void(*showFunc)(uint16_t f), bool(*stopSeking)(), uint8_t up_down)
Seeks a station up or down.
Definition: SI4735.cpp:1333
void setAMSoftMuteReleaseRate(uint8_t parameter)
Sets the soft mute release rate.
Definition: SI4735.h:2050
void getStatus()
Gets the current status of the Si47XX (AM, FM or SSB)
Definition: SI4735.h:2770
void setAM(uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step)
Sets the radio to AM (LW/MW/SW) function.
Definition: SI4735.cpp:820
void setAMFrontEndAgcControl(uint8_t MIN_GAIN_INDEX, uint8_t ATTN_BACKUP)
Adjusts the AM AGC for external front-end attenuator and external front-end cascode LNA.
Definition: SI4735.h:2134
bool isCurrentTuneAM()
Returns true if the current function is AM (AM_TUNE_FREQ).
Definition: SI4735.h:2182
void setAMSoftMuteRate(uint8_t parameter)
Sets the attack and decay rates when entering or leaving soft mute.
Definition: SI4735.h:2023
uint8_t getAgcGainIndex()
Gets the current AGC gain index.
Definition: SI4735.h:1501
void setSeekFmSrnThreshold(uint16_t value)
Set the Seek Fm Srn Threshold object.
Definition: SI4735.h:2373
uint8_t getCurrentRSSI()
Get the current receive signal strength (0–127 dBμV)
Definition: SI4735.h:1540
void setTuneFrequencyFast(uint8_t FAST)
Sets the FAST Tuning.
Definition: SI4735.h:2237
void getStatus(uint8_t, uint8_t)
Gets the current status of the Si4735 (AM or FM)
Definition: SI4735.cpp:956
bool getCurrentValidChannel()
Checks if the current channel is valid.
Definition: SI4735.h:1606
void setAvcAmMaxGain(uint8_t gain=90)
Sets the maximum gain for automatic volume control.
Definition: SI4735.cpp:1093
void setSeekFmSpacing(uint16_t spacing)
Selects frequency spacingfor FM seek. Default is 100 kHz (value 10) spacing. There are only 3 valid v...
Definition: SI4735.cpp:1414
void setFrequency(uint16_t)
Set the frequency to the corrent function of the Si4735 (FM, AM or SSB)
Definition: SI4735.cpp:688
void setAMDeEmphasis(uint8_t parameter)
Sets the AM Receive de-emphasis to 50 or disable.
Definition: SI4735.h:1993
void setAMSoftMuteSnrThreshold(uint8_t parameter)
Sets the SNR threshold to engage soft mute.
Definition: SI4735.h:2037
void setFM(uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step)
Sets the radio to FM function.
Definition: SI4735.cpp:858
bool isCurrentTuneSSB()
Returns true if the current function is SSB (SSB_TUNE_FREQ).
Definition: SI4735.h:2194
bool getStatusError()
Get the Status Error.
Definition: SI4735.h:1274
void setTuneFrequencyFreze(uint8_t FREEZE)
Sets Freeze Metrics During Alternate Frequency Jum.
Definition: SI4735.h:2260
void setSeekAmLimits(uint16_t bottom, uint16_t top)
Sets the bottom frequency and top frequency of the AM band for seek. Default is 520 to 1710.
Definition: SI4735.cpp:1369
uint8_t getCurrentMultipath()
Gets the current Multipath.
Definition: SI4735.h:1669
void setSeekAmSpacing(uint16_t spacing)
Selects frequency spacingfor AM seek. Default is 10 kHz spacing.
Definition: SI4735.cpp:1400
void setAmAgcAttackRate(uint16_t parameter)
Sets the AGC attack rate.
Definition: SI4735.h:2076
void getCurrentReceivedSignalQuality(void)
Queries the status of the Received Signal Quality (RSQ) of the current channel (FM_RSQ_STATUS)
Definition: SI4735.cpp:1167
void setAM()
Sets the radio to AM function. It means: LW MW and SW.
Definition: SI4735.cpp:765
bool getCurrentSoftMuteIndicator()
Soft Mute Indicator.
Definition: SI4735.h:1630
void setFrequencyUp()
Set the FrequencyUp.
Definition: SI4735.h:2276
void setFrequencyStep(uint16_t step)
Sets the current step value.
Definition: SI4735.h:2743
uint8_t getTuneFrequecyFast()
Returns the FAST tuning status.
Definition: SI4735.h:2225
void setMaxDelaySetFrequency(uint16_t ms)
Set the Max Delay after Set Frequency.
Definition: SI4735.h:2713
uint16_t getFrequency(void)
Gets the current frequency of the Si4735 (AM or FM)
Definition: SI4735.cpp:934
void seekStationProgress(void(*showFunc)(uint16_t f), uint8_t up_down)
Seeks a station up or down.
Definition: SI4735.cpp:1278
void setSeekAmSrnThreshold(uint16_t value)
Set the Seek Am Srn Threshold object.
Definition: SI4735.h:2348
uint16_t getCurrentFrequency()
Gets the current frequency saved in memory.
Definition: SI4735.h:2759
bool getCurrentMultipathDetectHigh()
Gets the Current Multipath Detect High.
Definition: SI4735.h:1704
void setSeekAmSNRThreshold(uint16_t value)
Sets the SNR threshold for a valid AM Seek/Tune.
Definition: SI4735.h:2358
void setBandwidth(uint8_t AMCHFLT, uint8_t AMPLFLT)
Selects the bandwidth of the channel filter for AM reception.
Definition: SI4735.cpp:894
void setSeekFmSNRThreshold(uint16_t value)
Sets the SNR threshold for a valid FM Seek/Tune.
Definition: SI4735.h:2385
void frequencyDown()
Decrements the current frequency on current band/function by using the current step.
Definition: SI4735.cpp:743
uint8_t getTuneFrequecyFreeze()
Returns the FREEZE status.
Definition: SI4735.h:2248
void setSeekFmRssiThreshold(uint16_t value)
Sets the RSSI threshold for a valid FM Seek/Tune.
Definition: SI4735.cpp:1442
bool getRadioDataSystemInterrupt()
Get the Radio Data System (RDS) Interrupt status.
Definition: SI4735.h:1252
void setFrequencyDown()
Set the Frequency Down.
Definition: SI4735.h:2284
void setAMSoftMuteAttackRate(uint16_t parameter)
Sets the soft mute attack rate.
Definition: SI4735.h:2063
void getAutomaticGainControl()
Queries Automatic Gain Control STATUS.
Definition: SI4735.cpp:1005
void setTuneFrequencyAntennaCapacitor(uint16_t capacitor)
Selects the tuning capacitor value.
Definition: SI4735.cpp:648
void seekStationUp()
Search for the next station.
Definition: SI4735.h:2313
void setAmAgcReleaseRate(uint16_t parameter)
Sets the AGC release rate.
Definition: SI4735.h:2089
bool getACFIndicator()
Returns true if the AFC rails (AFC Rail Indicator).
Definition: SI4735.h:1293
void seekNextStation()
Search for the next station.
Definition: SI4735.cpp:1226
void getCurrentReceivedSignalQuality(uint8_t INTACK)
Queries the status of the Received Signal Quality (RSQ) of the current channel.
Definition: SI4735.cpp:1115
uint8_t getStatusSNR()
Gets the SNR metric when tune is complete (dB)
Definition: SI4735.h:1344
void frequencyUp()
Increments the current frequency on current band/function by using the current step.
Definition: SI4735.cpp:726
void setFmSoftMuteMaxAttenuation(uint8_t smattn=0)
Sets the Fm Soft Mute Max Attenuation.
Definition: SI4735.h:1911
uint8_t getCurrentStereoBlend()
Gets the value of the amount of stereo blend in % (100 = full stereo, 0 = full mono).
Definition: SI4735.h:1643
void setFM()
Sets the radio to FM function.
Definition: SI4735.cpp:790
bool getSignalQualityInterrupt()
Get the Signal Quality Interrupt status.
Definition: SI4735.h:1241
bool getCurrentMultipathDetectLow()
Get Multipath Detect Low.
Definition: SI4735.h:1692
void seekPreviousStation()
Search the previous station.
Definition: SI4735.cpp:1241
uint8_t getCurrentSNR()
Gets the current SNR metric (0–127 dB).
Definition: SI4735.h:1551
bool getCurrentRssiDetectHigh()
Checks if RSSI detected is high.
Definition: SI4735.h:1573
void setSeekAmRssiThreshold(uint16_t value)
Sets the RSSI threshold for a valid AM Seek/Tune.
Definition: SI4735.cpp:1428
bool isAgcEnabled()
Checks if the AGC is enabled.
Definition: SI4735.h:1490
bool getCurrentSnrDetectHigh()
Checks if SNR detect is high.
Definition: SI4735.h:1595
void setMaxSeekTime(long time_in_ms)
Sets the maximum time in milliseconds for seeking. The default value is 8000ms (8s).
Definition: SI4735.h:2300
uint8_t getReceivedSignalStrengthIndicator()
Returns the value of Received Signal Strength Indicator (dBμV).
Definition: SI4735.h:1331
void setSeekFmLimits(uint16_t bottom, uint16_t top)
Sets the bottom frequency and top frequency of the FM band for seek. Default is 8750 to 10790.
Definition: SI4735.cpp:1385
bool getStatusValid()
Gets the channel status.
Definition: SI4735.h:1320
bool getStatusCTS()
Gets the Error flag Clear to Send.
Definition: SI4735.h:1285
bool getCurrentAfcRailIndicator()
AFC Rail Indicator.
Definition: SI4735.h:1617
void setProperty(uint16_t propertyNumber, uint16_t param)
Sets a given SI47XX device property.
Definition: SI4735.h:1209
void sendCommand(uint8_t cmd, int parameter_size, const uint8_t *parameter)
Sends a given command to the SI47XX devices.
Definition: SI4735.cpp:1496
void sendProperty(uint16_t propertyNumber, uint16_t param)
Sends (sets) property to the SI47XX.
Definition: SI4735.cpp:1464
void getCommandResponse(int num_of_bytes, uint8_t *response)
Returns with the command response.
Definition: SI4735.cpp:1518
int32_t getProperty(uint16_t propertyValue)
Gets a given property from the SI47XX.
Definition: SI4735.cpp:1564
si47x_status getStatusResponse()
Gets the first byte response.
Definition: SI4735.cpp:1538
void setFmBlendMultiPathStereoThreshold(uint8_t parameter)
Sets multipath threshold for stereo blend (Full stereo below threshold, blend above threshold).
Definition: SI4735.cpp:1704
void setFmBLendRssiMonoThreshold(uint8_t parameter)
Sets RSSI threshold for mono blend (Full mono below threshold, blend above threshold).
Definition: SI4735.cpp:1656
void setFmBlendSnrStereoThreshold(uint8_t parameter)
Sets SNR threshold for stereo blend (Full stereo above threshold, blend below threshold).
Definition: SI4735.cpp:1672
void setFmStereoOn()
Turn Off Stereo operation.
Definition: SI4735.cpp:1740
void setFmStereoOff()
Turn Off Stereo operation.
Definition: SI4735.cpp:1730
void setFmBlendRssiStereoThreshold(uint8_t parameter)
Sets RSSI threshold for stereo blend. (Full stereo above threshold, blend below threshold....
Definition: SI4735.cpp:1640
void setFmBlendStereoThreshold(uint8_t parameter)
Sets RSSI threshold for stereo blend (Full stereo above threshold, blend below threshold).
Definition: SI4735.cpp:1608
void setFmBlendMultiPathMonoThreshold(uint8_t parameter)
Sets Multipath threshold for mono blend (Full mono above threshold, blend below threshold).
Definition: SI4735.cpp:1720
void setFmBlendMonoThreshold(uint8_t parameter)
Sets RSSI threshold for mono blend (Full mono below threshold, blend above threshold).
Definition: SI4735.cpp:1624
void setFmBLendSnrMonoThreshold(uint8_t parameter)
Sets SNR threshold for mono blend (Full mono below threshold, blend above threshold).
Definition: SI4735.cpp:1688
void disableFmDebug()
There is a debug feature that remains active in Si4704/05/3x-D60 firmware which can create periodic n...
Definition: SI4735.cpp:1755
void setVolumeDown()
Set the Volume Down.
Definition: SI4735.h:1841
void setAudioMute(bool off)
Sets the audio on or off.
Definition: SI4735.cpp:1849
void digitalOutputSampleRate(uint16_t DOSR)
Enables digital audio output and configures digital audio output sample rate in samples per second (s...
Definition: SI4735.cpp:1818
void volumeDown()
Set sound volume level Down.
Definition: SI4735.cpp:1890
void setVolume(uint8_t volume)
Sets volume level (0 to 63)
Definition: SI4735.cpp:1832
uint8_t getCurrentVolume()
Get the Current Volume.
Definition: SI4735.h:1826
void volumeUp()
Set sound volume level Up.
Definition: SI4735.cpp:1876
void setAmDelayNB(uint16_t value)
Sets the delay before applying impulse blanking.
Definition: SI4735.h:1873
void setAudioMode(uint8_t audioMode)
Sets the Audio Mode. See table below.
Definition: SI4735.h:1861
uint8_t getVolume()
Gets the current volume level.
Definition: SI4735.cpp:1864
void setVolumeUp()
Set the Volume Up.
Definition: SI4735.h:1834
void digitalOutputFormat(uint8_t OSIZE, uint8_t OMONO, uint8_t OMODE, uint8_t OFALL)
Configures the digital audio output format.
Definition: SI4735.cpp:1788
uint8_t getRdsFlagAB(void)
Returns the current Text Flag A/B
Definition: SI4735.cpp:2133
void resetEndIndicatorGroupB()
Resets 0xD or 0xA special characters condition (makes it false)
Definition: SI4735.h:2558
char * getRdsText0A(void)
Gets the station name and other messages.
Definition: SI4735.cpp:2260
void rdsClearFifo()
Empty FIFO.
Definition: SI4735.h:2585
void clearRdsStationInformation()
Clear RDS buffer 2B (text / Station INformation 32 bytes)
Definition: SI4735.h:1161
void clearRdsStationName()
Clear RDS buffer 0A (text / Station Name)
Definition: SI4735.h:1174
bool getEndIndicatorGroupB()
Check if 0xD or 0xA special characters were received for group B.
Definition: SI4735.h:2548
void clearRdsBuffer()
Starts the control member variables for RDS. It is an alias to RdsInit (a better name to RdsInit)
Definition: SI4735.h:2407
void resetEndIndicatorGroupA()
Resets 0xD or 0xA special characters condition (makes it false)
Definition: SI4735.h:2537
void getRdsStatus(uint8_t INTACK, uint8_t MTFIFO, uint8_t STATUSONLY)
Gets the RDS status. Store the status in currentRdsStatus member. RDS COMMAND FM_RDS_STATUS.
Definition: SI4735.cpp:2048
void rdsClearInterrupt()
Clears RDSINT.
Definition: SI4735.h:2596
char * getRdsDateTime(void)
Gets the RDS the Time and Date when the Group type is 4.
Definition: SI4735.cpp:2635
bool getRdsNewBlockA()
Get the Rds New Block A.
Definition: SI4735.h:2461
void rdsBeginQuery()
Retrieves the current RDS data to be utilized by other RDS functions.
Definition: SI4735.h:2419
bool getRdsReceived()
Get the Rds Received FIFO.
Definition: SI4735.h:2427
bool getRdsSync()
Get the Rds Sync.
Definition: SI4735.h:2483
char * getRdsText(void)
Gets the RDS Text when the message is of the Group Type 2 version A.
Definition: SI4735.cpp:2236
bool getRdsSyncFound()
Get the Rds Sync Found.
Definition: SI4735.h:2449
char * getRdsText2B(void)
Gets the Text processed for the 2B group.
Definition: SI4735.cpp:2328
uint8_t getNumRdsFifoUsed()
Get the Num Rds Fifo Used.
Definition: SI4735.h:2505
char * getRdsStationInformation(void)
Gets the Station Information.
Definition: SI4735.h:2642
bool getGroupLost()
Get the Group Lost.
Definition: SI4735.h:2494
bool getRdsDateTime(uint16_t *year, uint16_t *month, uint16_t *day, uint16_t *hour, uint16_t *minute)
Decodes the RDS time to LOCAL Julian Day and time.
Definition: SI4735.cpp:2561
void getRdsStatus()
Gets RDS Status.
Definition: SI4735.h:2574
void clearRdsProgramInformation()
Clear RDS buffer 2A (Radio Text / Program Information)
Definition: SI4735.h:1148
uint8_t getRdsGroupType(void)
Returns the Group Type (extracted from the Block B)
Definition: SI4735.cpp:2116
char * getRdsTime(void)
Gets the RDS time and date when the Group type is 4.
Definition: SI4735.cpp:2454
uint8_t getRdsTextSegmentAddress(void)
Returns the address of the text segment.
Definition: SI4735.cpp:2155
void getNext2Block(char *)
Process data received from group 2B.
Definition: SI4735.cpp:2207
void mjdConverter(uint32_t mjd, uint32_t *year, uint32_t *month, uint32_t *day)
Converts the MJD number to integers Year, month and day.
Definition: SI4735.cpp:2522
char * getRdsProgramInformation(void)
Gets the Program Information (RT - Radio Text)
Definition: SI4735.h:2633
bool getRdsAllData(char **stationName, char **stationInformation, char **programInformation, char **utcTime)
Gets Station Name, Station Information, Program Information and utcTime.
Definition: SI4735.cpp:2430
bool getRdsSyncLost()
Get the Rds Sync Lost object.
Definition: SI4735.h:2438
uint8_t getRdsProgramType(void)
Returns the Program Type (extracted from the Block B)
Definition: SI4735.cpp:2190
void clearRdsBuffer2A()
Clear RDS buffer 2A (Radio Text / Program Information)
Definition: SI4735.h:1142
char * getRdsStationName(void)
Gets the Station Name.
Definition: SI4735.h:2623
void setFifoCount(uint16_t value)
Sets the minimum number of RDS groups stored in the RDS FIFO before RDSRECV is set.
Definition: SI4735.h:2516
void setRdsConfig(uint8_t RDSEN, uint8_t BLETHA, uint8_t BLETHB, uint8_t BLETHC, uint8_t BLETHD)
Sets RDS property.
Definition: SI4735.cpp:1958
void getNext4Block(char *)
Process data received from group 2A.
Definition: SI4735.cpp:2220
bool getEndIndicatorGroupA()
Check if 0xD or 0xA special characters were received for group A.
Definition: SI4735.h:2527
void setRdsIntSource(uint8_t RDSRECV, uint8_t RDSSYNCLOST, uint8_t RDSSYNCFOUND, uint8_t RDSNEWBLOCKA, uint8_t RDSNEWBLOCKB)
Configures interrupt related to RDS.
Definition: SI4735.cpp:2004
void clearRdsBuffer0A()
Clear RDS buffer 0A (text / Station Name)
Definition: SI4735.h:1168
char * getRdsText2A(void)
Gets the Text processed for the 2A group.
Definition: SI4735.cpp:2295
void clearRdsBuffer2B()
Clear RDS buffer 2B (text / Station INformation 32 bytes)
Definition: SI4735.h:1155
uint16_t getRdsPI(void)
Returns the programa type.
Definition: SI4735.cpp:2100
uint8_t getRdsVersionCode(void)
Gets the version code (extracted from the Block B)
Definition: SI4735.cpp:2171
bool getRdsNewBlockB()
Get the Rds New Block B.
Definition: SI4735.h:2472
void RdsInit()
Starts the control member variables for RDS.
Definition: SI4735.cpp:1915
void loadCompressedPatch(const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size, uint8_t ssb_audiobw=1)
Loads the SSB compressed patch content.
Definition: SI4735.cpp:3375
void setAmSoftMuteMaxAttenuation(uint8_t smattn=0)
Sets the Am Soft Mute Max Attenuation.
Definition: SI4735.h:1441
void ssbPowerUp()
This function can be useful for debug and test.
Definition: SI4735.cpp:3160
void setSsbAgcAttackRate(uint16_t parameter)
Sets the AGC attack rate on SSB mode.
Definition: SI4735.h:2102
uint8_t getCurrentAvcAmMaxGain()
Get the current Avc Am Max Gain.
Definition: SI4735.h:1425
void setSsbIfAgcAttackRate(uint8_t param=4)
Sets the IF AGC attack rate.
Definition: SI4735.h:1479
void setSsbAgcOverrite(uint8_t SSBAGCDIS, uint8_t SSBAGCNDX, uint8_t reserved=0)
Automatic Gain Control setup.
Definition: SI4735.cpp:3058
void setSSB(uint8_t usblsb)
Set the radio to AM function.
Definition: SI4735.cpp:2950
void setAvcAmDefaultGain()
Sets the Avc Am Max Gain to default gain (0x2A80)
Definition: SI4735.h:1411
void getSsbAgcStatus()
Queries SSB Automatic Gain Control STATUS.
Definition: SI4735.cpp:3031
void setSSBBfo(int offset)
Sets the SSB Beat Frequency Offset (BFO).
Definition: SI4735.cpp:2760
void loadPatch(const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, uint8_t ssb_audiobw=1)
Loads a given SSB patch content.
Definition: SI4735.cpp:3347
uint16_t getAntennaTuningCapacitor()
Get the Antenna Tuning Capacitor value.
Definition: SI4735.h:1371
void setSsbAgcReleaseRate(uint16_t parameter)
Sets the AGC Release rate on SSB mode.
Definition: SI4735.h:2115
void setSSBAudioBandwidth(uint8_t AUDIOBW)
SSB Audio Bandwidth for SSB mode.
Definition: SI4735.cpp:2927
void setSSBDspAfc(uint8_t DSP_AFCDIS)
Sets DSP AFC disable or enable.
Definition: SI4735.cpp:2834
void setAvcAmMaxGain()
Sets the Avc Am Max Gain to maximum gain (0x7800)
Definition: SI4735.h:1391
void setSSBSidebandCutoffFilter(uint8_t SBCUTFLT)
Sets SBB Sideband Cutoff Filter for band pass and low pass filters.
Definition: SI4735.cpp:2897
si4735_eeprom_patch_header downloadPatchFromEeprom(int eeprom_i2c_address)
Transfers the content of a patch stored in an eeprom to the SI4735 device.
Definition: SI4735.cpp:3405
void setSSB(uint16_t fromFreq, uint16_t toFreq, uint16_t intialFreq, uint16_t step, uint8_t usblsb)
Definition: SI4735.cpp:2984
void setSsbSoftMuteMaxAttenuation(uint8_t smattn=0)
Sets the SSB Soft Mute Max Attenuation object.
Definition: SI4735.h:1455
void setSSBSoftMute(uint8_t SMUTESEL)
Sets SSB Soft-mute Based on RSSI or SNR Selection:
Definition: SI4735.cpp:2849
void setSSBConfig(uint8_t AUDIOBW, uint8_t SBCUTFLT, uint8_t AVC_DIVIDER, uint8_t AVCEN, uint8_t SMUTESEL, uint8_t DSP_AFCDIS)
Sets the SSB receiver mode.
Definition: SI4735.cpp:2809
void setSsbIfAgcReleaseRate(uint8_t param=140)
Sets the number of milliseconds the low IF peak detector.
Definition: SI4735.h:1467
void setSSBAutomaticVolumeControl(uint8_t AVCEN)
Sets SSB Automatic Volume Control (AVC) for SSB mode.
Definition: SI4735.cpp:2864
si47x_firmware_query_library queryLibraryId()
Query the library information of the Si47XX device.
Definition: SI4735.cpp:3103
void sendSSBModeProperty()
Just send the property SSB_MOD to the device. Internal use (privete method).
Definition: SI4735.cpp:3005
void setSBBSidebandCutoffFilter(uint8_t SBCUTFLT)
Definition: SI4735.h:2666
bool downloadCompressedPatch(const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size, const uint16_t *cmd_0x15, const int16_t cmd_0x15_size)
Deal with compressed SSB patch.
Definition: SI4735.cpp:3306
void setAvcAmMinGain()
Sets the Avc Am Max Gain to minimal gain (0x1000)
Definition: SI4735.h:1401
void patchPowerUp()
This method can be used to prepare the device to apply SSBRX patch.
Definition: SI4735.cpp:3144
void setSSBAvcDivider(uint8_t AVC_DIVIDER)
Sets AVC Divider.
Definition: SI4735.cpp:2879
bool downloadPatch(const uint8_t *ssb_patch_content, const uint16_t ssb_patch_content_size)
Transfers the content of a patch stored in a array of bytes to the SI4735 device.
Definition: SI4735.cpp:3218
void setI2CStandardMode(void)
Sets I2C bus to 100kHz.
Definition: SI4735.h:2799
void setAudioMuteMcuPin(int8_t pin)
Sets the Audio Mute Mcu Pin.
Definition: SI4735.h:2834
void convertToChar(uint16_t value, char *strValue, uint8_t len, uint8_t dot, uint8_t separator, bool remove_leading_zeros=true)
Converts a number to a char array.
Definition: SI4735.cpp:3481
void setHardwareAudioMute(bool on)
Sets the Hardware Audio Mute.
Definition: SI4735.h:2850
void setI2CFastModeCustom(long value=500000)
Sets the I2C bus to a given value. ATTENTION: use this function with caution.
Definition: SI4735.h:2819
void setI2CFastMode(void)
Sets I2C bus to 400kHz.
Definition: SI4735.h:2806
void removeUnwantedChar(char *str, int size)
Removes unwanted character from char array.
Definition: SI4735.cpp:3519
void setI2CLowSpeedMode(void)
Sets I2C bus to 10kHz.
Definition: SI4735.h:2789
void setNBFM(uint16_t fromFreq, uint16_t toFreq, uint16_t initialFreq, uint16_t step)
Definition: SI4735.cpp:3663
void setNBFM()
Set the radio to FM function.
Definition: SI4735.cpp:3632
void setFrequencyNBFM(uint16_t freq)
Set the frequency to the corrent function of the Si4735 on NBFM mode.
Definition: SI4735.cpp:3691
void patchPowerUpNBFM()
This method can be used to prepare the device to apply NBFM patch.
Definition: SI4735.cpp:3589
void loadPatchNBFM(const uint8_t *patch_content, const uint16_t patch_content_size)
Loads a given NBFM patch content.
Definition: SI4735.cpp:3608