PU2CLR QN8066 Arduino Library 1.3.0
Arduino Library for QN8066Devices - By Ricardo Lima Caratti
|
QN8066 data representation. More...
Classes | |
union | qn8066_system1 |
System1 - Sets device modes (Address: 00h) More... | |
union | qn8066_system2 |
System2 - Sets device modes (Address: 01h) More... | |
union | qn8066_cca |
CCA - Sets CCA parameters ( Address: 02h) More... | |
union | qn8066_snr |
SRN - Estimate RF input CNR value( Address: 03h - Read Only) More... | |
union | qn8066_rssisig |
RSSISIG - In-band signal RSSI (Received signal strength indicator) dBuV value. dBuV=RSSI-49( Address: 04h - Read Only) More... | |
union | qn8066_cid1 |
CID1 - Device ID numbers ( Address: 05h - Read Only) More... | |
union | qn8066_cid2 |
CID2 - Device ID numbers ( Address: 06h - Read Only) More... | |
union | qn8066_xtal_div0 |
XTAL_DIV0 - Frequency select of reference clock source (Lower bits - Address: 07h - Write Only) More... | |
union | qn8066_xtal_div1 |
XTAL_DIV1 - Frequency select of reference clock source (Lower bits - Address: 08h - Write Only) More... | |
union | qn8066_xtal_div2 |
XTAL_DIV2 - Frequency select of reference clock source (Lower bits - Address: 09h - Write Only) More... | |
union | qn8066_status1 |
STATUS1 - System status ( Address: 0Ah - Read Only) More... | |
union | qn8066_rx_ch |
RX_CH - Lower 8 bit of 10-bit receiver channel index (Address: 0Bh - Write Only) More... | |
union | qn8066_ch_start |
CH_START - Lower 8 bits of 10-bit CCA(channel scan) start channel index (Address: 0Ch - Write Only) More... | |
union | qn8066_ch_stop |
CH_STOP - Lower 8 bits of 10-bit channel scan stop channel index (Address: 0Dh - Write Only) More... | |
union | qn8066_ch_step |
CH_STEP - Channel scan frequency step (Address: 0Eh - Write Only) More... | |
union | qn8066_rx_rds |
RDS - RDS data byte 0 to byte 7 (Address: 0Fh to 16h - Read Only) More... | |
union | qn8066_status2 |
STATUS2 - Receiver RDS status indicators (Address: 17h - Read Only) More... | |
union | qn8066_vol_ctl |
VOL_CT - Audio volume control (Address: 18h - Write Only) More... | |
union | qn8066_int_ctrl |
INT_CTRL - Receiver RDS control (Address: 19h - Write Only) More... | |
union | qn8066_status3 |
STATUS3 - Receiver audio peak level and AGC status (Address: 1Ah - Read Only) More... | |
union | qn8066_txch |
TXCH - Lower 8 bit of 10-bit transmitter channel index (Address: 1Bh - Read and Write) More... | |
union | qn8066_tx_rds |
RDS - RDS tx data from byte 0 to byte 7 (Address: 1Ch to 23h - Write Only) More... | |
union | qn8066_pac |
PAC - PA output power target control (Address: 24h - Write Only) More... | |
union | qn8066_fdev |
FDEV - Specify total TX frequency deviation (Address: 25h - Write Only) More... | |
union | qn8066_rds |
RDS - Specify transmit RDS frequency deviation (Address: 26h - Write Only) More... | |
union | qn8066_gplt |
GPLT - Transmitter soft chip threshold, gain of TX pilot (Address: 27h. More... | |
union | qn8066_reg_vga |
REG_VGA - X AGC gain (Address: 28h - Read and Write) More... | |
union | RDS_BLOCK1 |
RDS - First block (RDS_BLOCK1 datatype) More... | |
union | RDS_BLOCK2 |
Block 2 (RDS_BLOCK2 data type) More... | |
union | RDS_BLOCK3 |
Block 3 (RDS_BLOCK3 data type) More... | |
union | RDS_BLOCK4 |
Block 4 (RDS_BLOCK4 data type) More... | |
struct | qn8066_system1.arg |
struct | qn8066_system2.arg |
struct | qn8066_cca.arg |
struct | qn8066_cid1.arg |
struct | qn8066_cid2.arg |
struct | qn8066_xtal_div1.arg |
struct | qn8066_status1.arg |
struct | qn8066_ch_step.arg |
struct | qn8066_rx_rds.arg |
struct | qn8066_status2.arg |
struct | qn8066_vol_ctl.arg |
struct | qn8066_int_ctrl.arg |
struct | qn8066_status3.arg |
struct | qn8066_tx_rds.arg |
struct | qn8066_pac.arg |
struct | qn8066_rds.arg |
struct | qn8066_gplt.arg |
struct | qn8066_reg_vga.arg |
struct | RDS_BLOCK1.field |
struct | RDS_BLOCK2.commonFields |
struct | RDS_BLOCK2.group0Field |
struct | RDS_BLOCK2.group2Field |
struct | RDS_BLOCK4.utc |
QN8066 data representation.
union qn8066_system1 |
System1 - Sets device modes (Address: 00h)
Class Members | ||
---|---|---|
struct qn8066_system1.arg | arg | |
uint8_t | raw |
union qn8066_system2 |
System2 - Sets device modes (Address: 01h)
Class Members | ||
---|---|---|
struct qn8066_system2.arg | arg | |
uint8_t | raw |
union qn8066_cca |
CCA - Sets CCA parameters ( Address: 02h)
Class Members | ||
---|---|---|
struct qn8066_cca.arg | arg | |
uint8_t | raw |
union qn8066_snr |
SRN - Estimate RF input CNR value( Address: 03h - Read Only)
Estimated RF input SNR.
Class Members | ||
---|---|---|
uint8_t | SNRDB | |
uint8_t | raw |
union qn8066_rssisig |
RSSISIG - In-band signal RSSI (Received signal strength indicator) dBuV value. dBuV=RSSI-49( Address: 04h - Read Only)
Class Members | ||
---|---|---|
uint8_t | RSSISIG | |
uint8_t | raw |
union qn8066_cid1 |
CID1 - Device ID numbers ( Address: 05h - Read Only)
Class Members | ||
---|---|---|
struct qn8066_cid1.arg | arg | |
uint8_t | raw |
union qn8066_cid2 |
CID2 - Device ID numbers ( Address: 06h - Read Only)
Class Members | ||
---|---|---|
struct qn8066_cid2.arg | arg | |
uint8_t | raw |
union qn8066_xtal_div0 |
XTAL_DIV0 - Frequency select of reference clock source (Lower bits - Address: 07h - Write Only)
Class Members | ||
---|---|---|
uint8_t | xtal_div | |
uint8_t | raw |
union qn8066_xtal_div1 |
XTAL_DIV1 - Frequency select of reference clock source (Lower bits - Address: 08h - Write Only)
Class Members | ||
---|---|---|
struct qn8066_xtal_div1.arg | arg | |
uint8_t | raw |
union qn8066_xtal_div2 |
XTAL_DIV2 - Frequency select of reference clock source (Lower bits - Address: 09h - Write Only)
Class Members | ||
---|---|---|
uint8_t | pll_dlt | |
uint8_t | raw |
union qn8066_status1 |
STATUS1 - System status ( Address: 0Ah - Read Only)
FSM Status | Description |
---|---|
0 - 0000 | STBY |
1 - 0001 | RESET |
2 - 0010 | CALI |
3 - 0011 | IDLE |
4 - 0100 | CALIPLL |
5 - 0101 | Reserved |
6 - 0110 | Reserved |
7 - 0111 | TXPLLC |
8 - 1000 | TX_RSTB |
9 - 1001 | PACAL |
10 - 1010 | TRANSMIT |
11 - 1011 | TXCCA |
Others | Reserved |
Class Members | ||
---|---|---|
struct qn8066_status1.arg | arg | |
uint8_t | raw |
union qn8066_rx_ch |
RX_CH - Lower 8 bit of 10-bit receiver channel index (Address: 0Bh - Write Only)
Channel used for RX have two origins, one is from RXCH register (REG0EH[1:0]+REG0BH)
which can be written by the user, another is from CCA. CCA selected channel is stored in an internal register, which is
physically a different register with CH register, but it can be read out through register CH and be used for RX when
CCA_CH_DIS(REG0[0])=0.
FM channel: (60+RXCH*0.05)MHz
Class Members | ||
---|---|---|
uint8_t | RXCH | |
uint8_t | raw |
union qn8066_ch_start |
CH_START - Lower 8 bits of 10-bit CCA(channel scan) start channel index (Address: 0Ch - Write Only)
Class Members | ||
---|---|---|
uint8_t | CH_START | |
uint8_t | raw |
union qn8066_ch_stop |
CH_STOP - Lower 8 bits of 10-bit channel scan stop channel index (Address: 0Dh - Write Only)
Class Members | ||
---|---|---|
uint8_t | CH_STOP | |
uint8_t | raw |
union qn8066_ch_step |
CH_STEP - Channel scan frequency step (Address: 0Eh - Write Only)
Class Members | ||
---|---|---|
struct qn8066_ch_step.arg | arg | |
uint8_t | raw |
union qn8066_rx_rds |
RDS - RDS data byte 0 to byte 7 (Address: 0Fh to 16h - Read Only)
Class Members | ||
---|---|---|
struct qn8066_rx_rds.arg | arg | |
uint8_t | data[8] |
union qn8066_status2 |
STATUS2 - Receiver RDS status indicators (Address: 17h - Read Only)
RDS_RXUPD - RDS RX: RDS received group updated. Each time a new group is received, this bit will be toggled.
If RDS_INT_EN=1, then at the same time this bit is toggled, interrupt output will out put a 4.5 ms low pulse
0->1 or 1->0 -> A new set (8 Byte) of data is received
0->0 or 1->1 -> New data is in receiving
Class Members | ||
---|---|---|
struct qn8066_status2.arg | arg | |
uint8_t | raw |
union qn8066_vol_ctl |
VOL_CT - Audio volume control (Address: 18h - Write Only)
Class Members | ||
---|---|---|
struct qn8066_vol_ctl.arg | arg | |
uint8_t | raw |
union qn8066_int_ctrl |
INT_CTRL - Receiver RDS control (Address: 19h - Write Only)
Class Members | ||
---|---|---|
struct qn8066_int_ctrl.arg | arg | |
uint8_t | raw |
union qn8066_status3 |
STATUS3 - Receiver audio peak level and AGC status (Address: 1Ah - Read Only)
Class Members | ||
---|---|---|
struct qn8066_status3.arg | arg | |
uint8_t | raw |
union qn8066_txch |
TXCH - Lower 8 bit of 10-bit transmitter channel index (Address: 1Bh - Read and Write)
Lower 8 bits of 10-bit Channel index. Channel used for TX have two origins, one is from TXCH register (REG19H[1:0]+REG1BH) which can be written by the user,
another is from CCS. CCS selected channel is stored in an internal register, which is physically a different register with TXCH register, but it can be read out through
register TXCH and be used for TX when CCS_CH_DIS(REG0[0])=0. FM channel: (60+TXCH*0.05)MHz
Class Members | ||
---|---|---|
uint8_t | TXCH | |
uint8_t | raw |
union qn8066_tx_rds |
RDS - RDS tx data from byte 0 to byte 7 (Address: 1Ch to 23h - Write Only)
Class Members | ||
---|---|---|
struct qn8066_tx_rds.arg | arg | |
uint8_t | data[8] |
union qn8066_pac |
PAC - PA output power target control (Address: 24h - Write Only)
PA_TRGT - PA output power target is 0.91*PA_TRGT+70.2dBu. Valid values are 24-56.
TXPD_CLR - TX aud_pk clear signal. Audio peak value is max-hold and stored in aud_pk[3:0]. Once TXPD_CLR is toggled, the aud_pk value is cleared and restarted again.
Class Members | ||
---|---|---|
struct qn8066_pac.arg | arg | |
uint8_t | raw |
union qn8066_fdev |
FDEV - Specify total TX frequency deviation (Address: 25h - Write Only)
Specify total TX frequency deviation. TX frequency deviation = 0.69KHz*TX_FEDV. From 0 to 255
Class Members | ||
---|---|---|
uint8_t | TX_FDEV |
Specify total TX frequency deviation. TX frequency deviation = 0.69KHz*TX_FEDV. From 0 to 255 |
uint8_t | raw |
union qn8066_rds |
RDS - Specify transmit RDS frequency deviation (Address: 26h - Write Only)
RDSFDEV - RDS frequency deviation = 0.35KHz*RDSFDEV in normal mode. RDS frequency deviation = 0.207KHz*RDSFDEV in 4k mode and private mode. Values = from 0 to 127
Class Members | ||
---|---|---|
struct qn8066_rds.arg | arg | |
uint8_t | raw |
union qn8066_gplt |
GPLT - Transmitter soft chip threshold, gain of TX pilot (Address: 27h.
GAIN_TXPLT | value |
---|---|
7 - 0111 | 7% * 75KHz |
8 - 1000 | 8% * 75KHz |
9 - 1001 | 9% * 75KHz |
10 - 1010 | 10% * 75KHz |
t1m_sel | value |
---|---|
0 - 00 | 57s |
1 - 01 | 58s |
2 - 10 | 59s |
3 - 11 | Infinity (Never) |
tx_sftclpth | value |
---|---|
0 - 00 | 12’d2051 (3db back off from 0.5v) |
1 - 01 | 12’d1725 (4.5db back off from 0.5v) |
2 - 10 | 12’d1452 (6db back off from 0.5v) |
3 - 11 | 12’d1028 (9db back off from 0.5v) |
Class Members | ||
---|---|---|
struct qn8066_gplt.arg | arg | |
uint8_t | raw |
union qn8066_reg_vga |
REG_VGA - X AGC gain (Address: 28h - Read and Write)
Attenuation/Gain depending on RIN - 0, 1, 2 AND 3 RESPECTIVELY. See tables below.
RIN | Input impedance (K Ohoms) |
---|---|
0 - 00 | 10 |
1 - 01 | 20 |
2 - 10 | 40 |
3 - 11 | 80 |
TXAGC_GDB | TX digital gain |
---|---|
0 - 00 | 0 dB |
1 - 01 | 1 dB |
2 - 10 | 2 dB |
3 - 11 | Reserved |
TXAGC_GVGA | Attenuation/Gain depending on RIN - 0, 1, 2 AND 3 RESPECTIVELY |
---|---|
0 - 000 | 3; -3; -9; -15 |
1 - 001 | 6; 0; -6; -12 |
2 - 010 | 9; 3; -3; -9 |
3 - 011 | 12; 6; 0; -6 |
4 - 100 | 15; 9; 3; -3 |
5 - 101 | 18; 12; 6; 0 |
Others | Reserved |
Class Members | ||
---|---|---|
struct qn8066_reg_vga.arg | arg | |
uint8_t | raw |
union RDS_BLOCK1 |
RDS - First block (RDS_BLOCK1 datatype)
PI Code Function: Identifies the radio station. This code is essential
for allowing receivers to identify the source of the radio signal.
Class Members | ||
---|---|---|
struct RDS_BLOCK1.field | field | |
unsigned char | byteContent[2] | |
uint16_t | pi |
union RDS_BLOCK2 |
Block 2 (RDS_BLOCK2 data type)
Specifies the type of data being transmitted and includes information such as
program type (e.g., news, music) and whether the station transmits traffic information.
The table below show some program types you can use to check your transmitter.
PTY Code | Program Type |
---|---|
0 | No PTY (undefined) |
1 | News |
3 | Information |
4 | Sport |
5 | Education |
7 | Culture |
8 | Science |
10 | Pop Music |
11 | Rock Music |
15 | Other Music |
16 | Weather |
17 | Finance |
18 | Children's Programs |
20 | Religion |
24 | Jazz Music |
25 | Country Music |
26 | National Music |
27 | Oldies Music |
28 | Folk Music |
29 | Documentary |
31 | Alarm |
For GCC on System-V ABI on 386-compatible (32-bit processors), the following stands: 1) Bit-fields are allocated from right to left (least to most significant). 2) A bit-field must entirely reside in a storage unit appropriate for its declared type. Thus a bit-field never crosses its unit boundary. 3) Bit-fields may share a storage unit with other struct/union members, including members that are not bit-fields. Of course, struct members occupy different parts of the storage unit. 4) Unnamed bit-fields' types do not affect the alignment of a structure or union, although individual bit-fields' member offsets obey the alignment constraints.
Class Members | ||
---|---|---|
struct RDS_BLOCK2.commonFields | commonFields | |
struct RDS_BLOCK2.group0Field | group0Field | |
struct RDS_BLOCK2.group2Field | group2Field | |
unsigned char | byteContent[2] | |
uint16_t | raw | Raw 16-bit representation. |
union RDS_BLOCK3 |
Block 3 (RDS_BLOCK3 data type)
Class Members | ||
---|---|---|
unsigned char | byteContent[2] | |
uint16_t | raw |
union RDS_BLOCK4 |
Block 4 (RDS_BLOCK4 data type)
Class Members | ||
---|---|---|
unsigned char | byteContent[2] | |
struct RDS_BLOCK4.utc | utc | |
uint16_t | raw |
struct qn8066_system1.arg |
struct qn8066_system2.arg |
struct qn8066_cca.arg |
struct qn8066_cid1.arg |
struct qn8066_cid2.arg |
Class Members | ||
---|---|---|
uint8_t | CID4: 2 | Sequency integer values from 0 to 4. |
uint8_t | CID3: 6 | Chip ID for product ID. 001101 = Transceiver – QN8066; Others = Reserved unkown. |
struct qn8066_xtal_div1.arg |
struct qn8066_status1.arg |
struct qn8066_ch_step.arg |
struct qn8066_rx_rds.arg |
struct qn8066_status2.arg |
struct qn8066_vol_ctl.arg |
struct qn8066_int_ctrl.arg |
struct qn8066_status3.arg |
struct qn8066_tx_rds.arg |
struct qn8066_pac.arg |
struct qn8066_rds.arg |
struct qn8066_gplt.arg |
struct qn8066_reg_vga.arg |
struct RDS_BLOCK1.field |
struct RDS_BLOCK2.commonFields |
struct RDS_BLOCK2.group0Field |
struct RDS_BLOCK2.group2Field |