@@ -31,13 +31,20 @@ It is primary written to understand the possibilities and the interface of the d
3131
3232The library is not tested by me with hardware yet. See future below.
3333
34- There are some newer, more capable, follow up devices like model K, L and M.
35- From these only the KT0803K is supported since 0.2.0.
36- The others are not supported (yet) although they might work as they seem backwards compatible.
34+ There are newer, more capable, follow up devices like model K, L and M.
35+ From these only the KT0803K is supported as a derived class.
36+ The L and the M versions of the device will work with the KT0803K class too
37+ as their functionality is equal or exceeds the K version.
38+ As far as investigated the L and M versions are backwards compatible.
3739
40+ Version 0.3.0 implements a few KT0803K specific functions, see section below.
41+ These will work for L and M devices too.
42+
43+ For ATTinyX5 series there exists the TinyKT0803 class which is derived from this one.
44+ It uses a different I2C implementation. See - https://github.com/RobTillaart/TinyKT0803
3845
39- #### Hardware
4046
47+ #### Hardware
4148
4249Read datasheet for details.
4350
@@ -66,17 +73,19 @@ The KT0803 is an 3.3 Volt device and cannot be connected directly to 5V MCU's.
6673The frequency range stated on the front page of the datasheet ==> 70 MHz - 108 MHz.
6774The frequency range stated in table 2 ==> 76 MHz - 108 MHz.
6875So the datasheet is at least ambiguous on this point.
69- Also keep in mind that the
76+
77+ Keep in mind that the frequency range allowed differs per country.
78+ The library does not provide this filtering, explicit responsibility of the user.
7079
7180
7281#### Differences
7382
74- The KT0803K device has far more options, which are not implemented yet except one .
75- The resolution or step-size of the frequency.
83+ The KT0803K device has far more options, which are not all implemented .
84+ There is one important, the resolution or step-size of the frequency.
7685
7786| device | step-size | Notes |
7887| :---------:| :-----------:| :--------|
79- | KT0803 | 100 KHz | in code the math is done with 50 KHz
88+ | KT0803 | 100 KHz | in code all math is done with 50 KHz
8089| KT0803K | 50 KHz |
8190
8291Backwards compatible.
@@ -111,13 +120,14 @@ Some examples:
111120#### Related
112121
113122- https://github.com/RobTillaart/KT0803
123+ - https://github.com/RobTillaart/TinyKT0803
114124- https://www.hackster.io/hesam-moshiri/stereo-digital-fm-transmitter-circuit-arduino-code-2dbd8d
115125- https://www.hackster.io/hesam-moshiri/full-digital-fm-receiver-with-arduino-and-tea5767-52be37
116126- https://www.hackerstore.nl/Artikel/388
117127- https://en.wikipedia.org/wiki/FM_broadcasting
118128
119129
120- ## Interface
130+ ## Interface KT0803
121131
122132``` cpp
123133#include " KT0803.h"
@@ -261,16 +271,37 @@ A minimal hardcoded preset sketch is in the examples.
261271
262272## Derived classes
263273
264- Since 0.2.0 the KT0803K class is created, although minimally implemented.
274+ A derived class KT0803K class is created, with some extended
275+ functions.
265276
266- The KT0803L might work as it seems backwards compatible. It has far more
267- registers in use than the KT0803/K.
268- At the moment there is no intention to implement this KT0803L version.
277+ The KT0803L will work as it is backwards compatible with KT0803K.
278+ It has far more registers in use than the KT0803/K.
269279
270- The KT0803M looks almost identical to the KT0803K (no new registers), so
280+ The KT0803M is identical to the KT0803K (no new registers), so
271281a derived class is straightforward.
272282
273283
284+ ## Interface KT0803K
285+
286+ Added functions in 0.3.0 (not tested), check datasheet.
287+
288+ #### Mono Stereo
289+
290+ - ** bool setMono()** idem
291+ - ** bool setStereo()** idem
292+ - ** bool isStereo()** idem
293+
294+ #### Bass
295+
296+ - ** bool setBass(uint8_t bass); // 0..3 = 0, 5, 11, 17 dB
297+ - ** uint8_t getBass()** idem
298+
299+ #### Misc
300+
301+ - ** bool powerOK()** idem
302+ - ** bool silenceDetected()** idem
303+
304+
274305## Future
275306
276307#### Must
@@ -282,6 +313,10 @@ a derived class is straightforward.
282313
283314#### Should
284315
316+ - update readme.md
317+ - KT0803K specific functions.
318+ - add examples for KT0803K specific functions.
319+
285320
286321#### Could
287322
@@ -291,7 +326,8 @@ a derived class is straightforward.
291326 - what is impact on settings?
292327 - call begin () again? => default
293328 - explain well doc.
294- - derived class KT0803M (== K check)
329+ - derived class KT0803M == KT0803K
330+ - derived class KT0803L >= KT0803K (compatible)
295331- improve error handling
296332- unit tests possible?
297333- extend settings upon request ** bold** are interesting, see table
@@ -300,14 +336,10 @@ a derived class is straightforward.
300336| :---------:| :-------------:| :---------------:| :--------|
301337| KT0803 | PA_CTRL | 13, bit 2 | ** WARNING in datasheet**
302338| | | | Should it be added in API?
303- | KT0803K | MONO/STEREO | 04, bit 6 | ** idem**
304339| KT0803K | PGA_LSB | 04, bit 4+5 | gain fine tuning -> see PGA_MOD
305340| KT0803K | FDEV | 04, bit 2+3 | Frequency deviation adjustment
306- | KT0803K | BASS | 04, bit 0+1 | ** Bass boost control**
307341| KT0803K | PDPA | 0B, bit 5 | Power Amplifier Power Down ?
308342| KT0803K | PA_BIAS | 0E, bit 1 | PA bias current enhancement.
309- | KT0803K | PW_OK (RO) | 0F, bit 4 | ** Power OK indicator**
310- | KT0803K | SLNCID (RO) | 0F, bit 2 | 1 when Silence is detected
311343| KT0803K | LMTLVL | 10, bit 3+4 | ** Internal audio limiter level control**
312344| KT0803K | PGAMOD | 10, bit 0 | PGA mode selection (use PGA_LSB/ not)
313345| KT0803K | SLNCDIS | 12, bit 7 | Silence detection disable
@@ -322,7 +354,6 @@ a derived class is straightforward.
322354#### Wont (for now)
323355
324356- investigate tea5767 FM receiver (Out of scope for this lib).
325- - implement KT0803L
326357- investigate efficiency of register access.
327358 - caching all (allowed) registers in ** begin()**
328359 - 3 bytes for KT0803
0 commit comments