PU2CLR QN8066 Arduino Library 1.3.0
Arduino Library for QN8066Devices - By Ricardo Lima Caratti
|
Functions | |
uint8_t | QN8066::getRegister (uint8_t registerNumber) |
Gets register information. | |
void | QN8066::setRegister (uint8_t registerNumber, uint8_t value) |
Stores a velue to a given register. | |
qn8066_status1 | QN8066::getStatus1 () |
Gets the current device Status stored in STATUS1 register. | |
qn8066_status2 | QN8066::getStatus2 () |
Gets the current device Status stored in STATUS2 register. | |
qn8066_status3 | QN8066::getStatus3 () |
Gets the current device Status stored in STATUS3 register. | |
void | QN8066::begin () |
Device initial configuration. | |
void | QN8066::setTxMode (uint8_t value) |
Set transmission request. | |
void | QN8066::stopTransmitting () |
Stops transmitting. | |
void | QN8066::startTransmitting () |
Starts transmitting. | |
void | QN8066::setup (uint16_t xtalDiv=1000, bool mono=false, bool rds=false, uint8_t PreEmphasis=0, uint8_t xtalInj=0, uint8_t imageRejection=1, uint8_t txSoftClipThreshold=0, uint8_t oneMinutOff=3, uint8_t gainTxPLT=9, uint8_t txFreqDev=125, uint8_t rdsLineIn=0, uint8_t rdsFreqDev=60, uint8_t inImpedance=1, uint8_t txAgcDig=0, uint8_t txAgcBuffer=1, uint8_t txSoftClip=0) |
QN8066 initial configuration. | |
void | QN8066::setXtal (uint16_t divider, uint8_t xtalInj, uint8_t imageRejection) |
QN8066 initial configuration of the of reference clock source. | |
uint8_t QN8066::getRegister | ( | uint8_t | registerNumber | ) |
Gets register information.
8066 commands. It provides a means to run commands that are not currently supported by the standard API.
registerNumber |
void QN8066::setRegister | ( | uint8_t | registerNumber, |
uint8_t | value | ||
) |
Stores a velue to a given register.
8066 commands. It provides a means to run commands that are not currently supported by the standard API.
registerNumber | |
value |
qn8066_status1 QN8066::getStatus1 | ( | ) |
Gets the current device Status stored in STATUS1 register.
Example
qn8066_status2 QN8066::getStatus2 | ( | ) |
Gets the current device Status stored in STATUS2 register.
Example
qn8066_status3 QN8066::getStatus3 | ( | ) |
Gets the current device Status stored in STATUS3 register.
Example
Referenced by QN8066::getAudioPeakValue(), and QN8066::rdsGetTxUpdated().
void QN8066::begin | ( | ) |
|
inline |
Set transmission request.
This function enable or disable transmission
value | - 0 = disable; 1 = enable |
void QN8066::stopTransmitting | ( | ) |
Stops transmitting.
void QN8066::startTransmitting | ( | ) |
Starts transmitting.
void QN8066::setup | ( | uint16_t | xtalDiv = 1000 , |
bool | mono = false , |
||
bool | rds = false , |
||
uint8_t | PreEmphasis = 0 , |
||
uint8_t | xtalInj = 0 , |
||
uint8_t | imageRejection = 1 , |
||
uint8_t | txSoftClipThreshold = 0 , |
||
uint8_t | oneMinutOff = 3 , |
||
uint8_t | gainTxPLT = 9 , |
||
uint8_t | txFreqDev = 125 , |
||
uint8_t | rdsLineIn = 0 , |
||
uint8_t | rdsFreqDev = 60 , |
||
uint8_t | inImpedance = 1 , |
||
uint8_t | txAgcDig = 0 , |
||
uint8_t | txAgcBuffer = 1 , |
||
uint8_t | txSoftClip = 0 |
||
) |
QN8066 initial configuration.
This function can be called without arguments (parameters). In this case, the default value will be assumed. See the following list of parameters.
xtalDiv | - Divider based on frequency select of reference clock source. Default 1000 (see Datasheet pag. 18 and 23). |
mono | - If false, the TX will start stereo mode. Default false. |
rds | - if true, TX will start with RDS on. Default false. |
PreEmphasis | - Valid values: 0 or 1 (0=50us; 1=75us). Default 0. |
xtalInj | - type of the reference clock source (0 = Inject sine-wave clock; 1 = Inject digital clock). |
imageRejection | - Image Rejection (0=LO<RF, image is in lower side; 1=LO>RF, image is in upper side). |
txSoftClipThreshold | - TX soft clip threshold. Default 0. See Datasheet page 34. |
oneMinutOff | - Selection of 1 minute time for PA off when no audio (3 = Infinity (never); 2=59s; 1=58s; 0=57s). |
gainTxPLT | - Gain of TX pilot to adjust pilot frequency deviation. See Datasheet page 34. |
txFreqDev | - Specify total TX frequency deviation. TX frequency deviation = 0.69KHz*TX_FEDV. Default 125. |
rdsLineIn | - Audio Line-in enable control. Default 0 |
rdsFreqDev | - RDS frequency deviation. RDS frequency deviation = 0.35KHz*RDSFDEV in normal mode. Default 60 |
inImpedance | - TX mode input impedance for both L/R channels (Default 1 => 20K ) |
txAgcDig | - TX digital gain (Default 0) |
txAgcBuffer | - TX input buffer gain (Default 1) |
txSoftClip | - TX soft clipping enable (Default 0 - Disable) |
Example
void QN8066::setXtal | ( | uint16_t | divider, |
uint8_t | xtalInj, | ||
uint8_t | imageRejection | ||
) |
QN8066 initial configuration of the of reference clock source.
Reference clock source based on the active crystal or signal generator you are using.
The table below shows some tested sources (active crystal or signal generator) and divider values
Source (kHz) | Divider |
---|---|
32.768 | 1 |
< 1,310.720 | did not work |
1,310.720 | 40 |
1,638.400 | 50 |
3,276.800 | 100 |
13,107.200 | 400 |
16,384.000 | 500 |
32,768,000 | 1000 |
xtalDiv | - Divider based on frequency select of reference clock source. Default 1000 (see Datasheet pag. 18 and 23). |
xtalInj | - type of the reference clock source (0 = Inject sine-wave clock; 1 = Inject digital clock). |
imageRejection | - Image Rejection (0=LO<RF, image is in lower side; 1=LO>RF, image is in upper side). |
Example