@@ -31,13 +31,20 @@ It is primary written to understand the possibilities and the interface of the d
31
31
32
32
The library is not tested by me with hardware yet. See future below.
33
33
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.
37
39
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
38
45
39
- #### Hardware
40
46
47
+ #### Hardware
41
48
42
49
Read datasheet for details.
43
50
@@ -66,17 +73,19 @@ The KT0803 is an 3.3 Volt device and cannot be connected directly to 5V MCU's.
66
73
The frequency range stated on the front page of the datasheet ==> 70 MHz - 108 MHz.
67
74
The frequency range stated in table 2 ==> 76 MHz - 108 MHz.
68
75
So 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.
70
79
71
80
72
81
#### Differences
73
82
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.
76
85
77
86
| device | step-size | Notes |
78
87
| :---------:| :-----------:| :--------|
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
80
89
| KT0803K | 50 KHz |
81
90
82
91
Backwards compatible.
@@ -111,13 +120,14 @@ Some examples:
111
120
#### Related
112
121
113
122
- https://github.com/RobTillaart/KT0803
123
+ - https://github.com/RobTillaart/TinyKT0803
114
124
- https://www.hackster.io/hesam-moshiri/stereo-digital-fm-transmitter-circuit-arduino-code-2dbd8d
115
125
- https://www.hackster.io/hesam-moshiri/full-digital-fm-receiver-with-arduino-and-tea5767-52be37
116
126
- https://www.hackerstore.nl/Artikel/388
117
127
- https://en.wikipedia.org/wiki/FM_broadcasting
118
128
119
129
120
- ## Interface
130
+ ## Interface KT0803
121
131
122
132
``` cpp
123
133
#include " KT0803.h"
@@ -261,16 +271,37 @@ A minimal hardcoded preset sketch is in the examples.
261
271
262
272
## Derived classes
263
273
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.
265
276
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.
269
279
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
271
281
a derived class is straightforward.
272
282
273
283
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
+
274
305
## Future
275
306
276
307
#### Must
@@ -282,6 +313,10 @@ a derived class is straightforward.
282
313
283
314
#### Should
284
315
316
+ - update readme.md
317
+ - KT0803K specific functions.
318
+ - add examples for KT0803K specific functions.
319
+
285
320
286
321
#### Could
287
322
@@ -291,7 +326,8 @@ a derived class is straightforward.
291
326
- what is impact on settings?
292
327
- call begin () again? => default
293
328
- explain well doc.
294
- - derived class KT0803M (== K check)
329
+ - derived class KT0803M == KT0803K
330
+ - derived class KT0803L >= KT0803K (compatible)
295
331
- improve error handling
296
332
- unit tests possible?
297
333
- extend settings upon request ** bold** are interesting, see table
@@ -300,14 +336,10 @@ a derived class is straightforward.
300
336
| :---------:| :-------------:| :---------------:| :--------|
301
337
| KT0803 | PA_CTRL | 13, bit 2 | ** WARNING in datasheet**
302
338
| | | | Should it be added in API?
303
- | KT0803K | MONO/STEREO | 04, bit 6 | ** idem**
304
339
| KT0803K | PGA_LSB | 04, bit 4+5 | gain fine tuning -> see PGA_MOD
305
340
| KT0803K | FDEV | 04, bit 2+3 | Frequency deviation adjustment
306
- | KT0803K | BASS | 04, bit 0+1 | ** Bass boost control**
307
341
| KT0803K | PDPA | 0B, bit 5 | Power Amplifier Power Down ?
308
342
| 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
311
343
| KT0803K | LMTLVL | 10, bit 3+4 | ** Internal audio limiter level control**
312
344
| KT0803K | PGAMOD | 10, bit 0 | PGA mode selection (use PGA_LSB/ not)
313
345
| KT0803K | SLNCDIS | 12, bit 7 | Silence detection disable
@@ -322,7 +354,6 @@ a derived class is straightforward.
322
354
#### Wont (for now)
323
355
324
356
- investigate tea5767 FM receiver (Out of scope for this lib).
325
- - implement KT0803L
326
357
- investigate efficiency of register access.
327
358
- caching all (allowed) registers in ** begin()**
328
359
- 3 bytes for KT0803
0 commit comments