PU2CLR QN8066 Arduino Library 1.3.0
Arduino Library for QN8066Devices - By Ricardo Lima Caratti
|
Functions | |
void | QN8066::resetAudioPeak () |
TX Audio peak clear signal. | |
void | QN8066::setTX (uint16_t frequency) |
Sets the TX mode. | |
void | QN8066::setTxStereo (bool value=true) |
Set TX Stereo or Mono. | |
void | QN8066::setTxMono (uint8_t value=0) |
Set TX Stereo or Mono (Same setTxStereo ) | |
uint8_t | QN8066::getTxMono () |
Gets TX Stereo or Mono setup. | |
void | QN8066::setTxPreEmphasis (uint8_t value=75) |
Pre-emphasis and de-emphasis time constant. | |
void | QN8066::setPreEmphasis (uint8_t value=1) |
Pre-emphasis and de-emphasis time constant - Same setTxPreEmphasis. | |
void | QN8066::setTxPilotGain (uint8_t value) |
Gain of TX pilot to adjust pilot frequency deviation. | |
void | QN8066::setTxSoftClipThreshold (uint8_t value) |
TX soft clip threshold. | |
void | QN8066::setTxOffAfterOneMinuteNoAudio (bool value) |
Set of 1 minute time for PA off when no audio. | |
void | QN8066::setTxOffAfterOneMinute (uint8_t value) |
Sets PA Off after 1 minute time when no audio. | |
void | QN8066::setAudioAnalogGain (uint8_t value) |
Sets volume control gain of analog portion. | |
void | QN8066::setAudioDigitalGain (uint8_t value) |
Sets set digital volume gain. | |
void | QN8066::setAudioDacHold (bool value) |
DAC output control. | |
void | QN8066::setAudioTxDiff (bool value) |
Tx audio input mode selection. | |
void | QN8066::setTxInputImpedance (uint8_t value) |
TX mode input impedance for both L/R channels. | |
void | QN8066::setTxDigitalGain (uint8_t value) |
TX digital gain. | |
void | QN8066::setTxInputBufferGain (uint8_t value) |
TX input buffer gain. | |
void | QN8066::setTxSoftClippingEnable (bool value) |
TX soft clipping enable. | |
void | QN8066::setTxFrequencyDerivation (uint8_t value) |
Specify total TX frequency deviation. | |
void | QN8066::setPAC (uint8_t PA_TRGT) |
PA output power target control. | |
void | QN8066::updateTxSetup () |
Reset the system kepping the TX current STATUS. | |
void | QN8066::setToggleTxPdClear () |
TX Audio peak clear signal. | |
int | QN8066::getAudioPeakValue () |
Audio peak value at ADC input. | |
The functions defined in this group are responsible for controlling the transmitting of the QN8066.
|
inline |
TX Audio peak clear signal.
Same setToggleTxPdClear (synonym)
Audio peak value is max-hold and stored in aud_pk (see STATUS register). Once TXPD_CLR is toggled, the aud_pk value is cleared and restarted again
Example
References QN8066::setToggleTxPdClear().
void QN8066::setTX | ( | uint16_t | frequency | ) |
Sets the TX mode.
To avoid working with the float data type, the frequency parameter must be the desired frequency multiplied by 10.
For example, if the user wants to tune to 106.9 MHz, the parameter to be sent is 1067.
This approach reduces the size of the final code (binary) as well as avoids the inaccuracies of floating-point mathematical operations.
frequency | - Frequency to be set |
Example
void QN8066::setTxStereo | ( | bool | value = true | ) |
Set TX Stereo or Mono.
value | (true = stereo; false = mono) |
Example
void QN8066::setTxMono | ( | uint8_t | value = 0 | ) |
Set TX Stereo or Mono (Same setTxStereo )
value | (1 = Mono, 0 = Stereo ) |
Example
uint8_t QN8066::getTxMono | ( | ) |
Gets TX Stereo or Mono setup.
Example
void QN8066::setTxPreEmphasis | ( | uint8_t | value = 75 | ) |
Pre-emphasis and de-emphasis time constant.
The valid values are 50 and 75. Any value not equal to 75 sets the Pre-emphasis to 50.
value | (valids values: 50 or 75); |
Example
void QN8066::setPreEmphasis | ( | uint8_t | value = 1 | ) |
Pre-emphasis and de-emphasis time constant - Same setTxPreEmphasis.
The valid values are 0 and 1.
value | (valids values: 0 = 50us or 1 = 75us ); |
Example
void QN8066::setTxPilotGain | ( | uint8_t | value | ) |
Gain of TX pilot to adjust pilot frequency deviation.
Refers to peak frequency deviation of MPX signal when audio input is full scale. Valid values: between 7 and 10.
the frequency deviation is value (%) * 75 kHz.
value |
Example
void QN8066::setTxSoftClipThreshold | ( | uint8_t | value | ) |
TX soft clip threshold.
See table below.
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) |
value |
Example
void QN8066::setTxOffAfterOneMinuteNoAudio | ( | bool | value | ) |
Set of 1 minute time for PA off when no audio.
value | (true = Infinity (never turn it off); false = turn it ofafter about 1 minue ) |
Example
void QN8066::setTxOffAfterOneMinute | ( | uint8_t | value | ) |
Sets PA Off after 1 minute time when no audio.
do almost the same setTxOffAfterOneMinuteNoAudio
value | (3 = Infinity (never turn it off); 2 = off after 59s; 1 = off after 58s; 0 = off after 57s ) |
Example
void QN8066::setAudioAnalogGain | ( | uint8_t | value | ) |
Sets volume control gain of analog portion.
Valid values are 0 to 7.
value |
Example
void QN8066::setAudioDigitalGain | ( | uint8_t | value | ) |
Sets set digital volume gain.
Valid values are 0 to 5.
value |
Example
void QN8066::setAudioDacHold | ( | bool | value | ) |
DAC output control.
If value is 0 (false), then "Normal operation"; if true, Hold DAC output to a fixed voltage.
value | (true or false) |
Example
void QN8066::setAudioTxDiff | ( | bool | value | ) |
Tx audio input mode selection.
If value is 0 (false), then "Single ended"; if true, Differential
value | (true or false) |
Example
void QN8066::setTxInputImpedance | ( | uint8_t | value | ) |
TX mode input impedance for both L/R channels.
Sets the imput impedance Left and Rihgt channels
RIN Value | Input impedance (k) |
---|---|
00 (0) | 10 |
01 (1) | 20 |
10 (2) | 40 |
11 (3) | 80 |
value | (true or false) |
Example
void QN8066::setTxDigitalGain | ( | uint8_t | value | ) |
TX digital gain.
TX digital gain
TXAGC_GDB | Digital gain |
---|---|
00 (0) | 0 dB |
01 (1) | 1 dB |
10 (2) | 2 dB |
11 (3) | Reserved |
value |
Example
void QN8066::setTxInputBufferGain | ( | uint8_t | value | ) |
TX input buffer gain.
Sets TX input buffer gain
TXAGC_GVGA | Attenuation 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 |
value |
Example
void QN8066::setTxSoftClippingEnable | ( | bool | value | ) |
TX soft clipping enable.
value | (true = enabled; false = disabled) |
Example
void QN8066::setTxFrequencyDerivation | ( | uint8_t | value | ) |
Specify total TX frequency deviation.
TX frequency deviation = 0.69KHz*TX_FEDV. The default value is 108 (Binary: 01101100)
value |
Example
void QN8066::setPAC | ( | uint8_t | PA_TRGT | ) |
PA output power target control.
PA output power target is 0.91*PA_TRGT+70.2dBu. .
pacValue |
Example
void QN8066::updateTxSetup | ( | ) |
Reset the system kepping the TX current STATUS.
Some functions do not affect the system when the TX mode is on. In this case, you must use these functions after configuring certain parameters.
void QN8066::setToggleTxPdClear | ( | ) |
TX Audio peak clear signal.
Audio peak value is max-hold and stored in aud_pk (see STATUS register). Once TXPD_CLR is toggled, the aud_pk value is cleared and restarted again
Example
Referenced by QN8066::resetAudioPeak().
int QN8066::getAudioPeakValue | ( | ) |
Audio peak value at ADC input.
Audio peak value at ADC input is aud_pk * 45mV. See STATUS3 register.
Example
References QN8066::getStatus3().