PU2CLR KT0915 Arduino Library  1.0.1
This is an Arduino Library to control the KT0915 device
Union, Structure and Defined Data Types


More...

Classes

union  kt09xx_chip_id
 3.10.1. CHIP ID (Address 0x01) More...
 
union  kt09xx_seek
 3.10.2. SEEK (Address 0x02) More...
 
struct  kt09xx_seek.refinied
 
union  kt09xx_tune
 3.10.3. TUNE (Address 0x03) More...
 
struct  kt09xx_tune.refined
 
union  kt09xx_volume
 3.10.4. VOLUME (Address 0x04) More...
 
struct  kt09xx_volume.refined
 
union  kt09xx_dspcfga
 3.10.5. DSPCFGA (Address 0x05) More...
 
struct  kt09xx_dspcfga.refined
 
union  kt09xx_locfga
 3.10.6. LOCFGA (Address 0x0A) More...
 
struct  kt09xx_locfga.refined
 
union  kt09xx_locfgc
 3.10.7. LOCFGC (Address 0x0C) More...
 
struct  kt09xx_locfgc.refined
 
union  kt09xx_rxcfg
 3.10.8. RXCFG (Address 0x0F) More...
 
struct  kt09xx_rxcfg.refined
 
union  kt09xx_statusa
 3.10.19. STATUSA (Address 0x12) More...
 
struct  kt09xx_statusa.refined
 
union  kt09xx_statusb
 3.10.10. STATUSB (Address 0x13) More...
 
struct  kt09xx_statusb.refined
 
union  kt09xx_statusc
 3.10.11. STATUSC (Address 0x14) More...
 
struct  kt09xx_statusc.refined
 
union  kt09xx_amsyscfg
 3.10.12. AMSYSCFG (Address 0x16) More...
 
struct  kt09xx_amsyscfg.refined
 
union  kt09xx_amchan
 3.10.13. AMCHAN (Address 0x17) More...
 
struct  kt09xx_amchan.refined
 
union  kt09xx_amcali
 3.10.14. AMCALI (Address 0x18) More...
 
struct  kt09xx_amcali.refined
 
union  kt09xx_gpiocfg
 3.10.15. GPIOCFG (Address 0x1D) More...
 
struct  kt09xx_gpiocfg.refined
 
union  kt09xx_amdsp
 3.10.16. AMDSP (Address 0x22) More...
 
struct  kt09xx_amdsp.refined
 
union  kt09xx_amdstatusa
 3.10.17. AMSTATUSA (Address 0x24) More...
 
struct  kt09xx_amdstatusa.refined
 
union  kt09xx_amdstatusb
 3.10.18. AMSTATUSB (Address 0x25) More...
 
struct  kt09xx_amdstatusb.refined
 
union  kt09xx_softmute
 3.10.19. SOFTMUTE (Address 0x2Eh) More...
 
struct  kt09xx_softmute.refined
 
union  kt09xx_userstartch
 3.10.20. USERSTARTCH (Address 0x2F) More...
 
struct  kt09xx_userstartch.refined
 
union  kt09xx_userguard
 3.10.21. USERGUARD (Address 0x30) More...
 
struct  kt09xx_userguard.refined
 
union  kt09xx_userchannum
 3.10.22. USERCHANNUM (Address 0x31) More...
 
struct  kt09xx_userchannum.refined
 
union  kt09xx_amcfg
 3.10.23. AMCFG (Address 0x33) More...
 
union  kt09xx_amcfg2
 3.10.24. AMCFG2 (Address 0x34h) More...
 
struct  kt09xx_amcfg2.refined
 
struct  kt09xx_amcfg.refined
 
union  kt09xx_afc
 3.10.25. AFC (Address 0x3Ch) More...
 
struct  kt09xx_afc.refined
 
union  word16_to_bytes
 Converts 16 bits word to two bytes. More...
 
struct  word16_to_bytes.refined
 
class  KT0915
 KT0915 Class. More...
 

Detailed Description


KT0915 Defined Data Types

Defined Data Types is a way to represent the AKC695X registers information

Some information appears to be inaccurate due to translation problems from Chinese to English.

The information shown here was extracted from Datasheet:

AKC6955 stereo FM / TV / MW / SW / LW digital tuning radio documentation.

Other information seems incomplete even in the original Chinese Datasheet.

For example: Reg 10 (0x0A). There is no information about it. The Reg11 and 12 seem wrong


Class Documentation

◆ kt09xx_chip_id

union kt09xx_chip_id

3.10.1. CHIP ID (Address 0x01)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 15.

Definition at line 87 of file KT0915.h.

Class Members
uint16_t chip_id
char chip_id_ascii[2]

◆ kt09xx_seek

union kt09xx_seek

3.10.2. SEEK (Address 0x02)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 15.

Definition at line 97 of file KT0915.h.

Class Members
struct kt09xx_seek refinied
uint16_t raw

◆ kt09xx_seek.refinied

struct kt09xx_seek.refinied

Definition at line 98 of file KT0915.h.

Class Members
uint8_t DMUTEL: 1 Left Channel Mute Control; 0 = Left channel mute enable; 1 = Left channel mute disable.
uint8_t DMUTER: 1 Right Channel Mute Control; 0 = Left channel mute enable; 1 = Left channel mute disable.
uint8_t FMSPACE: 2 FM Channel Spacing; 00 = 200KHz; 01 = 100KHz; 10 = 50KHz.
uint16_t RESERVED: 11 Reserved.

◆ kt09xx_tune

union kt09xx_tune

3.10.3. TUNE (Address 0x03)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 15.

Definition at line 113 of file KT0915.h.

Class Members
struct kt09xx_tune refined
uint16_t raw

◆ kt09xx_tune.refined

struct kt09xx_tune.refined

Definition at line 114 of file KT0915.h.

Class Members
uint16_t FMCHAN: 12 FM Channel Setting FMCHAN<11:0>=Frequency (KHz) / 50KHz. For example, if desired channel is 86MHz, then the FMCHAN<11:0> should be 0x06B8.
uint8_t RESERVED: 3 Reserved.
uint8_t FMTUNE: 1 FM Tune Enable; 0 = Normal operation 1 = Start to tune to desired FM channel.

◆ kt09xx_volume

union kt09xx_volume

3.10.4. VOLUME (Address 0x04)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 15/16.

Definition at line 128 of file KT0915.h.

Class Members
struct kt09xx_volume refined
uint16_t raw

◆ kt09xx_volume.refined

struct kt09xx_volume.refined

Definition at line 129 of file KT0915.h.

Class Members
uint8_t RESERVED1: 4 Reserved.
uint8_t POP: 2 Audio DAC Anti - pop Configuration00 : 100uF AC - coupling capacitor 01 : 10 : 11 : Reserved 60uF AC - coupling capacitor 20uF AC - coupling capacitor 10uF AC - coupling capacitor.
uint8_t RESERVED2: 2 Reserved.
uint8_t BASS: 2 Bass Boost Effect Mode Selection; 00 = Disable; 01 = Low ; 10 = Med; 11 = High.
uint8_t RESERVED3: 3 Reserved.
uint8_t DMUTE: 1 Mute Disable; 0 = Mute enable; 1 = Mute disable.
uint8_t AMDSMUTE: 1 AM Softmute Disable; 0 = AM softmute enable; 1 = AM softmute disable.
uint8_t FMDSMUTE: 1 AM Softmute Disable; 0 = FM softmute enable; 1 = FM softmute disable.

◆ kt09xx_dspcfga

union kt09xx_dspcfga

3.10.5. DSPCFGA (Address 0x05)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 16/17.

Definition at line 148 of file KT0915.h.

Class Members
struct kt09xx_dspcfga refined
uint16_t raw

◆ kt09xx_dspcfga.refined

struct kt09xx_dspcfga.refined

Definition at line 149 of file KT0915.h.

Class Members
uint8_t RESERVED1: 5 Reserved.
uint8_t DBLND: 1 Blend disable; 0 = Blend enable; 1 = Blend disable.
uint8_t RESERVED2: 2 Reserved.
uint8_t BLNDADJ: 2
uint8_t RESERVED3: 1 Stereo/Mono Blend; Level Adjustment 00 = High; 01 = Highest 10; = Lowest 11 = Low.

Reserved

uint8_t DE: 1 De-emphasis Time Constant Selection. 0 = 75us; 1 = 50us.
uint8_t RESERVED4: 3 Reserved.
uint8_t MONO: 1 Mono Select; 0 = Stereo; 1 = Force mono.

◆ kt09xx_locfga

union kt09xx_locfga

3.10.6. LOCFGA (Address 0x0A)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 17.

Definition at line 168 of file KT0915.h.

Class Members
struct kt09xx_locfga refined
uint16_t raw

◆ kt09xx_locfga.refined

struct kt09xx_locfga.refined

Definition at line 169 of file KT0915.h.

Class Members
uint8_t RESERVED1: 8 Reserved.
uint8_t FMAFCD: 1 AFC Disable Control Bit; 0 = AFC enable; 1 = AFC disable.
uint8_t RESERVED2: 7 Reserved.

◆ kt09xx_locfgc

union kt09xx_locfgc

3.10.7. LOCFGC (Address 0x0C)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 17.

Definition at line 183 of file KT0915.h.

Class Members
struct kt09xx_locfgc refined
uint16_t raw

◆ kt09xx_locfgc.refined

struct kt09xx_locfgc.refined

Definition at line 184 of file KT0915.h.

Class Members
uint8_t RESERVED1: 3 Reserved.
uint8_t CAMPUSBAND_EN: 1 Campus FM Band Enable; 0 = User can only use 64MHz ~110MHz; 1 = User can extend the FM band down to 32MHz.
uint16_t RESERVED2: 12 Reserved.

◆ kt09xx_rxcfg

union kt09xx_rxcfg

3.10.8. RXCFG (Address 0x0F)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 17.

Definition at line 198 of file KT0915.h.

Class Members
struct kt09xx_rxcfg refined
uint16_t raw

◆ kt09xx_rxcfg.refined

struct kt09xx_rxcfg.refined

Definition at line 199 of file KT0915.h.

Class Members
uint8_t VOLUME: 5 Volume Control 11111 = 0dB 11110 = -2dB 11101 = -4dB .... 00010 = -58dB 00001 = -60dB 00000 = Mute.
uint8_t RESERVED1: 7 Campus FM Band Enable; 0 = User can only use 64MHz ~110MHz; 1 = User can extend the FM band down to 32MHz.
uint8_t STDBY: 1 Standby Mode Enable. 0 = Disable; 1 = Enable.
uint8_t RESERVED2: 3 Reserved.

◆ kt09xx_statusa

union kt09xx_statusa

3.10.19. STATUSA (Address 0x12)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 18.

Definition at line 214 of file KT0915.h.

Class Members
struct kt09xx_statusa refined
uint16_t raw

◆ kt09xx_statusa.refined

struct kt09xx_statusa.refined

Definition at line 215 of file KT0915.h.

Class Members
uint8_t RESERVED1: 3 Reserved.
uint8_t FMRSSI: 5 FM RSSI Value Indicator; RSSI starts from -100dBm and step is 3dB namely; RSSI(dBm) = -100 + FMRSSI<4:0> *3dB.
uint8_t ST: 2 Stereo Indicator; 11 = Stereo state; Other = Mono state.
uint8_t LO_LOCK: 1 LO Synthesizer Ready Indicator; 0 = Not ready; 1 = Ready.
uint8_t PLL_LOCK: 1 System PLL Ready Indicator; 0 = Not ready; 1 = System PLL ready.
uint8_t RESERVED2: 2 Reserved.
uint8_t STC: 1 Seek/Tune Complete; 0 = Not Complete; 1 = Complete; Every time the Seek/tune process begins, the STC bit will clear to zero by hardware.
uint8_t XTAL_OK: 1 Crystal ready indictor; 0 = Not ready; 1 = Crystal is ok.

◆ kt09xx_statusb

union kt09xx_statusb

3.10.10. STATUSB (Address 0x13)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 18.

Definition at line 234 of file KT0915.h.

Class Members
struct kt09xx_statusb refined
uint16_t raw

◆ kt09xx_statusb.refined

struct kt09xx_statusb.refined

Definition at line 235 of file KT0915.h.

Class Members
uint8_t RESERVED1: 1 Reserved.
uint16_t RDCHAN: 15 Current Channel Indicator.

◆ kt09xx_statusc

union kt09xx_statusc

3.10.11. STATUSC (Address 0x14)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 18/19.

Definition at line 248 of file KT0915.h.

Class Members
struct kt09xx_statusc refined
uint16_t raw

◆ kt09xx_statusc.refined

struct kt09xx_statusc.refined

Definition at line 249 of file KT0915.h.

Class Members
uint8_t RESERVED1: 6 Reserved.
uint8_t FMSNR: 7 Channel SNR value is FM mode.; 0000000 = Minimum SNR; 1111111 = Maximum SNR.
uint8_t CHIPRDY: 1 Chip Ready Indicator; 0 = Chip is not ready; 1 = Chip is ready, calibration done.
uint8_t RESERVED2: 1 Reserved.
uint8_t PWSTATUS: 1 Power Status Indicator; 0 = Power not ready; 1 = Power ready.

◆ kt09xx_amsyscfg

union kt09xx_amsyscfg

3.10.12. AMSYSCFG (Address 0x16)

The table below shows REFCLK possibvle values

Crystal type table

Dec binary Description defined constant
0 0000 32.768KHz OSCILLATOR_32KHZ
1 0001 6.5MHz OSCILLATOR_6_5MHZ
2 0010 7.6MHz OSCILLATOR_7_6MHZ
3 0011 12MHz OSCILLATOR_12MHZ
4 0100 13MHz OSCILLATOR_13MHZ
5 0101 15.2MHz OSCILLATOR_15_2MHZ
6 0110 19.2MHz OSCILLATOR_19_2MHZ
7 0111 24MHz OSCILLATOR_24MHZ
8 1000 26MHz OSCILLATOR_26MHZ
9 1001 ?? 38KHz ?? OSCILLATOR_38KHz
See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 19.

Definition at line 282 of file KT0915.h.

Class Members
struct kt09xx_amsyscfg refined
uint16_t raw

◆ kt09xx_amsyscfg.refined

struct kt09xx_amsyscfg.refined

Definition at line 283 of file KT0915.h.

Class Members
uint8_t AMAFCD: 1 AFC Disable Control in AM Mode; 0 = Enable; 1 = Disable.
uint8_t RESERVED1: 5 Reserved.
uint8_t AU_GAIN: 2 Audio Gain Selection; 01 = 6dB; 00 = 3dB; 11 = 0dB; 10 = -3dB.
uint8_t REFCLK: 4 See Crystal type table.
uint8_t RCLK_EN: 1 Reference Clock Enable; 0 = Crystal; 1 = Reference clock.
uint8_t RESERVED2: 1 Reserved.
uint8_t USERBAND: 1 User Definition Band Enable; 0 = Use internal defined band; 1 = Use user-defined band which is specified in USER_START_CHAN<14:0>, USER_GUARD<8:0> and USER_CHAN_NUM<11:0>
uint8_t AM_FM: 1 AM/FM Mode Control; 0 = FM mode; 1 = AM mode.

◆ kt09xx_amchan

union kt09xx_amchan

3.10.13. AMCHAN (Address 0x17)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 20.

Definition at line 302 of file KT0915.h.

Class Members
struct kt09xx_amchan refined
uint16_t raw

◆ kt09xx_amchan.refined

struct kt09xx_amchan.refined

Definition at line 303 of file KT0915.h.

Class Members
uint16_t AMCHAN: 15 AM Channel Setting; AMCHAN<14:0> = Frequency(in KHz)
uint8_t AMTUNE: 1 AM Tune Enable.

◆ kt09xx_amcali

union kt09xx_amcali

3.10.14. AMCALI (Address 0x18)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 20.

Definition at line 316 of file KT0915.h.

Class Members
struct kt09xx_amcali refined
uint16_t raw

◆ kt09xx_amcali.refined

struct kt09xx_amcali.refined

Definition at line 317 of file KT0915.h.

Class Members
uint16_t CAP_INDEX: 14 On Chip Capacitor for AM Antenna Calibration; 0x0000 = Minimum capacitor; 0x3FFF = Maximum capacitor.
uint8_t RESERVED1: 2 Reserved.

◆ kt09xx_gpiocfg

union kt09xx_gpiocfg

3.10.15. GPIOCFG (Address 0x1D)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 20.

Definition at line 330 of file KT0915.h.

Class Members
struct kt09xx_gpiocfg refined
uint16_t raw

◆ kt09xx_gpiocfg.refined

struct kt09xx_gpiocfg.refined

Definition at line 331 of file KT0915.h.

Class Members
uint8_t GPIO1: 2 CH Pin Mode Selection; 00 = High Z; 01 = Key controlled channel increase / decrease; 10 = Dial controlled channel increase / decrease; 11 = Reserved.
uint8_t GPIO2: 2 VOL Pin Mode Selection; 00 = High Z; 01 = Key controlled volume increase/decrease; 10 = Dial controlled volume increase/decrease; 11 = Reserved.
uint16_t RESERVED: 12 Reserved

◆ kt09xx_amdsp

union kt09xx_amdsp

3.10.16. AMDSP (Address 0x22)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); pages 20 and 21.

Definition at line 345 of file KT0915.h.

Class Members
struct kt09xx_amdsp refined
uint16_t raw

◆ kt09xx_amdsp.refined

struct kt09xx_amdsp.refined

Definition at line 346 of file KT0915.h.

Class Members
uint8_t RESERVED1: 3 Reserved.
uint8_t INV_LEFT_AUDIO: 1 Left channel inverse control; 0 = Normal operation; 1 = Inversing the left channel audio signal.
uint8_t RESERVED2: 2 Reserved.
uint8_t AM_BW: 2 AM Channel Bandwidth Selection; 00 = 2KHz; 01 = 2KHz; 10 = 4KHz; 11 = 6KHz.
uint8_t RESERVED3: 8 Reserved.

◆ kt09xx_amdstatusa

union kt09xx_amdstatusa

3.10.17. AMSTATUSA (Address 0x24)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 21.

Definition at line 362 of file KT0915.h.

Class Members
struct kt09xx_amdstatusa refined
uint16_t raw

◆ kt09xx_amdstatusa.refined

struct kt09xx_amdstatusa.refined

Definition at line 363 of file KT0915.h.

Class Members
uint8_t RESERVED1: 8 Reserved.
uint8_t AMRSSI: 5 AM Channel RSSI; AM RSSI starts from -90dBm and step is 3dB, namely AMRSSI(dBm) = -90 + AMRSSI<4:0> *3dB.
uint8_t RESERVED2: 3 Reserved.

◆ kt09xx_amdstatusb

union kt09xx_amdstatusb

3.10.18. AMSTATUSB (Address 0x25)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 21.

Definition at line 378 of file KT0915.h.

Class Members
struct kt09xx_amdstatusb refined
uint16_t raw

◆ kt09xx_amdstatusb.refined

struct kt09xx_amdstatusb.refined

Definition at line 379 of file KT0915.h.

Class Members
uint8_t AM_AFCDELTAF: 8 Signed binary, max 16KHz , min -16KHz, step is 128Hz.
uint8_t RESERVED: 8 Reserved.

◆ kt09xx_softmute

union kt09xx_softmute

3.10.19. SOFTMUTE (Address 0x2Eh)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 21.

Definition at line 392 of file KT0915.h.

Class Members
struct kt09xx_softmute refined
uint16_t raw

◆ kt09xx_softmute.refined

struct kt09xx_softmute.refined

Definition at line 393 of file KT0915.h.

Class Members
uint8_t FM_SMTH: 3 FM Softmute Start Threshold; 000 = Lowest ... 111 = Highest.
uint8_t SMMD: 1 Softmute Mode Selection; 0 = RSSI mode; 1 = SNR mode (only effective in FM mode)
uint8_t VOLUMET: 5 Softmute target Volume. 0 = RSSI; 1 = SNR mode (only effective in FM mode)
uint8_t AM_SMTH: 3 AM Softmute Start Level. 000 = Lowest ... 111 = Highest.
uint8_t SMUTER: 2 Softmute Attack/Recover Rate; 00 = Slowest; 01 = Fastest (RSSI mode only); 10 = Fast; 11 = Slow.
uint8_t SMUTEA: 2 Softmute Attenuation; 00 = Strong; 01 = Strongest; 10 = Weak; 11 = Weakest.

◆ kt09xx_userstartch

union kt09xx_userstartch

3.10.20. USERSTARTCH (Address 0x2F)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 22.

Definition at line 410 of file KT0915.h.

Class Members
struct kt09xx_userstartch refined
uint16_t raw

◆ kt09xx_userstartch.refined

struct kt09xx_userstartch.refined

Definition at line 411 of file KT0915.h.

Class Members
uint16_t USER_START_CHAN: 15 User band start channel, only effect when USERBAND=1. See section 3.7.3. of the Datasheet.
uint8_t RESERVED: 1 Reserved.

◆ kt09xx_userguard

union kt09xx_userguard

3.10.21. USERGUARD (Address 0x30)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio on a Chip(TM); page 22.

Definition at line 424 of file KT0915.h.

Class Members
struct kt09xx_userguard refined
uint16_t raw

◆ kt09xx_userguard.refined

struct kt09xx_userguard.refined

Definition at line 425 of file KT0915.h.

Class Members
uint16_t USER_GUARD: 9 User band guard number, only effective when USERBAND=1. See section 3.7.2.
uint8_t RESERVED: 7 Reserved.

◆ kt09xx_userchannum

union kt09xx_userchannum

3.10.22. USERCHANNUM (Address 0x31)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio-on-a-Chip(TM); page 22.

Definition at line 438 of file KT0915.h.

Class Members
struct kt09xx_userchannum refined
uint16_t raw

◆ kt09xx_userchannum.refined

struct kt09xx_userchannum.refined

Definition at line 439 of file KT0915.h.

Class Members
uint16_t USER_CHAN_NUM: 12 User band channel number, only effective when USERBAND=1. See section 3.7.3.
uint8_t RESERVED: 4 Reserved.

◆ kt09xx_amcfg

union kt09xx_amcfg

3.10.23. AMCFG (Address 0x33)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio-on-a-Chip(TM); page 23.

Definition at line 452 of file KT0915.h.

Class Members
struct kt09xx_amcfg refined
uint16_t raw

◆ kt09xx_amcfg2

union kt09xx_amcfg2

3.10.24. AMCFG2 (Address 0x34h)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio-on-a-Chip(TM); page 23.

Definition at line 468 of file KT0915.h.

Class Members
struct kt09xx_amcfg2 refined
uint16_t raw

◆ kt09xx_amcfg2.refined

struct kt09xx_amcfg2.refined

Definition at line 469 of file KT0915.h.

Class Members
uint8_t RESERVED1: 1 Reserved.
uint8_t TIME2: 3 000 = Fastest...... 111 = Slowest
uint8_t TIME1: 2 00 = Shortest...... 11 = Longest
uint16_t RESERVED2: 10 Reserved.

◆ kt09xx_amcfg.refined

struct kt09xx_amcfg.refined

Definition at line 453 of file KT0915.h.

Class Members
uint8_t RESERVED1: 5 Reserved.
uint8_t KEY_MODE: 2 Working mode selection when key mode is selected. 00 = Working mode A; 01 = Working mode B Others = Reserved; For detailed information about working mode A and working mode B, please refer to section 3.7.1.
uint8_t RESERVED2: 7 Reserved.
uint8_t AMSPACE: 2 AM Channel Space Selection; 00 = 1KHz; 01 = 9KHz; 10 = 10KHz; 11 = 10KHz.

◆ kt09xx_afc

union kt09xx_afc

3.10.25. AFC (Address 0x3Ch)

See also
KT0915; Monolithic Digital FM/MW/SW/LW Receiver Radio-on-a-Chip(TM); page 23.

Definition at line 484 of file KT0915.h.

Class Members
struct kt09xx_afc refined
uint16_t raw

◆ kt09xx_afc.refined

struct kt09xx_afc.refined

Definition at line 485 of file KT0915.h.

Class Members
uint8_t FM_AFC_DELTAF: 8 Frequency difference between CHAN and received signal, calculated by AFC block in two’s complement format. Range is - 127 to +127. Unit is KHz. This register is valid when STC=1.
uint8_t RESERVED1: 8 Reserved.

◆ word16_to_bytes

union word16_to_bytes

Converts 16 bits word to two bytes.

Definition at line 497 of file KT0915.h.

Class Members
struct word16_to_bytes refined
uint16_t raw

◆ word16_to_bytes.refined

struct word16_to_bytes.refined

Definition at line 498 of file KT0915.h.

Class Members
uint8_t lowByte
uint8_t highByte

◆ KT0915

class KT0915

KT0915 Class.


This class implements all functions that will help you to control the KT0915 devices.

Author
PU2CLR - Ricardo Lima Caratti

Definition at line 513 of file KT0915.h.

Public Member Functions

void setRegister (uint8_t reg, uint16_t parameter)
 Sets the a value to a given KT09XX register. More...
 
uint16_t getRegister (uint8_t reg)
 Gets a given KT09XX register content. More...
 
uint16_t getDeviceId ()
 Gets the Device Id. More...
 
void enable (uint8_t on_off)
 Sets the enable pin (9) of the KT0915 high or low. More...
 
void setI2CBusAddress (int deviceAddress)
 Set I2C bus address. More...
 
void setReferenceClockType (uint8_t crystal, uint8_t ref_clock=0)
 Sets the Crystal Type. More...
 
bool isCrystalReady ()
 Gets the Crystal Status information. More...
 
void setup (int enable_pin, uint8_t oscillator_type=OSCILLATOR_32KHZ, uint8_t ref_clock=REF_CLOCK_DISABLE)
 Receiver startup. More...
 
void setTuneDialModeOn (uint32_t minimu_frequency, uint32_t maximum_frequency)
 Sets Tune Dial Mode Interface On
More...
 
void setTuneDialModeOff ()
 Turns the Tune Dial Mode interface Off. More...
 
void setVolumeDialModeOn ()
 Sets Volume Dial Mode Interface On. More...
 
void setVolumeDialModeOff ()
 Turns the Volume Dial Mode interface Off. More...
 
void setVolume (uint8_t value)
 Sets the audio volume level. More...
 
void setVolumeUp ()
 
void setVolumeDown ()
 
void setDeEmphasis (uint8_t value)
 Sets the De-emphasis Time Constant Selection. More...
 
void setMono (bool on_off)
 Sets the receiver Stereo or Mono. More...
 
void setFM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step)
 Sets the receiver to FM mode. More...
 
void setAM (uint32_t minimum_frequency, uint32_t maximum_frequency, uint32_t default_frequency, uint16_t step)
 Sets the receiver to AM mode. More...
 
void setFrequency (uint32_t frequency)
 Sets the current frequency. More...
 
void setStep (uint16_t step)
 Sets the frequency step. More...
 
void frequencyUp ()
 Increments the frequency one step. More...
 
void frequencyDown ()
 Decrements the frequency one step. More...
 
uint32_t getFrequency ()
 Gets the current frequency. More...
 
void setAntennaTuneCapacitor (uint16_t capacitor)
 Set AM the Antenna Tune Capacitor. More...
 
uint8_t getCurrentMode ()
 

Protected Attributes

int deviceAddress = KT0915_I2C_ADDRESS
 
int enablePin = -1
 
uint8_t volume
 Stores the current volume. More...
 
uint16_t currentStep
 Stores the current step. More...
 
uint32_t currentFrequency
 Stores the current frequency. More...
 
uint32_t minimumFrequency
 Stores the minimum frequency for the current band. More...
 
uint32_t maximumFrequency
 Stores the maximum frequency for the current band. More...
 
uint8_t currentMode
 Stores the current mode. More...
 
uint8_t currentRefClockType = OSCILLATOR_32KHZ
 Stores the crystal type. More...
 
uint8_t currentRefClockEnabled = REF_CLOCK_DISABLE
 Strores 0 = Crystal; 1 = Reference clock. More...
 
uint8_t currentDialMode = DIAL_MODE_OFF
 Stores the default Dial Mode (OFF) More...
 
uint16_t deviceId
 
uint8_t currentVolume
 

Member Function Documentation

◆ isCrystalReady()

bool KT0915::isCrystalReady ( )

Gets the Crystal Status information.

Returns
true
false

Definition at line 94 of file KT0915.cpp.

◆ setVolume()

void KT0915::setVolume ( uint8_t  volume)

Sets the audio volume level.

This method is used to control the audio volume level. The value 0 mutes the device and 31 sets the device to the maximum volume.

Parameters
volumebetween 0 and 31.

Definition at line 258 of file KT0915.cpp.

◆ setVolumeUp()

void KT0915::setVolumeUp ( )

Definition at line 267 of file KT0915.cpp.

◆ setVolumeDown()

void KT0915::setVolumeDown ( )

Definition at line 272 of file KT0915.cpp.

◆ getCurrentMode()

uint8_t KT0915::getCurrentMode ( )
inline

Definition at line 563 of file KT0915.h.

Member Data Documentation

◆ deviceAddress

int KT0915::deviceAddress = KT0915_I2C_ADDRESS
protected

Definition at line 516 of file KT0915.h.

Referenced by setI2CBusAddress().

◆ enablePin

int KT0915::enablePin = -1
protected

Definition at line 517 of file KT0915.h.

Referenced by enable(), and setup().

◆ volume

uint8_t KT0915::volume
protected

Stores the current volume.

Definition at line 519 of file KT0915.h.

◆ currentStep

uint16_t KT0915::currentStep
protected

Stores the current step.

Definition at line 520 of file KT0915.h.

◆ currentFrequency

uint32_t KT0915::currentFrequency
protected

Stores the current frequency.

Definition at line 521 of file KT0915.h.

◆ minimumFrequency

uint32_t KT0915::minimumFrequency
protected

Stores the minimum frequency for the current band.

Definition at line 522 of file KT0915.h.

◆ maximumFrequency

uint32_t KT0915::maximumFrequency
protected

Stores the maximum frequency for the current band.

Definition at line 523 of file KT0915.h.

◆ currentMode

uint8_t KT0915::currentMode
protected

Stores the current mode.

Definition at line 524 of file KT0915.h.

◆ currentRefClockType

uint8_t KT0915::currentRefClockType = OSCILLATOR_32KHZ
protected

Stores the crystal type.

Definition at line 525 of file KT0915.h.

◆ currentRefClockEnabled

uint8_t KT0915::currentRefClockEnabled = REF_CLOCK_DISABLE
protected

Strores 0 = Crystal; 1 = Reference clock.

Definition at line 526 of file KT0915.h.

◆ currentDialMode

uint8_t KT0915::currentDialMode = DIAL_MODE_OFF
protected

Stores the default Dial Mode (OFF)

Definition at line 527 of file KT0915.h.

◆ deviceId

uint16_t KT0915::deviceId
protected

Definition at line 528 of file KT0915.h.

◆ currentVolume

uint8_t KT0915::currentVolume
protected

Definition at line 529 of file KT0915.h.