Voice Control Function - Holtek Semiconductor Inc.
Voice Control Function - Holtek Semiconductor Inc.
Voice Control Function - Holtek Semiconductor Inc.
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
HT98R068-1 Two-way Radio OTP MCU<br />
HT98R068-1 Two-way Radio OTP MCU<br />
D/N: HA0305E<br />
Introduction<br />
The <strong>Holtek</strong> HT98R068-1 is an ASSP OTP (One-Time Programmable) MCU specifically<br />
designed for two-way radio communication applications. The internal in-band tone/sub-tone<br />
processor supports functions, such as emphasis/de-emphasis, CTCSS/DCS encoder/<br />
decoder, DTMF encoder/decoder, scramble/descramble, VOX…etc., transmitted to the<br />
other port by a radio frequency carrier. Using the code to mark the product extended series,<br />
but it’s still avalible in this text such as the HT98R068-1.<br />
Operating Principles<br />
� Sub-tone<br />
� CTCSS encode/decode<br />
� DCS encode/decode<br />
� In-band tone processor<br />
� DTMF encode/decode<br />
� Selective call tone (EEA standard)<br />
� In band tone(user define)<br />
� Other signals<br />
� DCS turn-off tone<br />
� Advanced audio processor<br />
� Scrambling<br />
� Companding<br />
� Emphasis/De-emphasis<br />
� Digital filter: 12.5k / 25k / HPF(300) filter<br />
� In-band signal level adjustment function<br />
� <strong>Voice</strong> <strong>Control</strong>(VOX)<br />
� MIC AGC<br />
1
Block Diagram<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Hardware Block <strong>Function</strong> Decription<br />
� Audio processor unit: A signal process unit, responsible for the audio and signal<br />
processing.<br />
� Input unit: The input source selection including MIC OPA, multiplexer and PGA.<br />
Multiplexer provides selectable audio and modulation signal input such as MICO, AUX,<br />
BEEP1 and DEMI.<br />
� Output unit – MOD/SMOD: The signal output port includes MODO for the in-band<br />
signal output and SMODO for the sub-tone signal output (can use this port if you want<br />
to decode sub-tone).<br />
� Output unit – Audio: The audio output port with selective DAC1 and BEEP0 multiplexer<br />
outputs.<br />
� MCU unit: The MCU control unit is applied to control the user program code for I/O<br />
control, flow control etc.<br />
2
Application Circuit<br />
The application circuit is divided into three main parts.<br />
HT98R068-1 Two-way Radio OTP MCU<br />
� Clock/PLL circuit: Y1, R7, C16 and C17 are from the PLL external clock source where<br />
Y1 is a 32,768 KHz crystal to lock the PLL so as to the set frequency. R6, C14 and C15<br />
are the PLL filter circuits. Refer to the component values for correct circuit designing.<br />
� MIC/AUX/DEMOD – The microphone/secondary audio/in-band input port: The MIC<br />
section includes an internal OPA with a gain value = R2<br />
� . The R2 value can be altered<br />
R1<br />
according to actual application requirments. If the internal AGC function is to be used,<br />
please refer to the AGC section to select this resistance. DEMOD is the in-band signal<br />
input port after RF demodulation. AUX: This external audio input supports external<br />
audio applications. In principle, the input signal must be limited in: {signal * PGA<br />
amplification ratio ≦ VDD*0.7(AD maximum)}.<br />
� MOD/SMOD/AUDO – In-band/sub-tone/audio output port: The MOD output can<br />
generate in-band signals connected to the RF input port. The SMOD generates<br />
sub-tone signals to be applied in applications requiring sub-tones. AUDO: The audio<br />
signals after demodulation can generate tones through a LPF circuit connected to the<br />
speaker drive circuit (ex: HT82V739). The output signals showing likes a ladder which<br />
is applied in describing the precise relation of the adjacent channel power and tone<br />
quality, but it must be followed with a LPF circuit.<br />
� Power circuit: The power consumption is so much (25mA@3.3V) at the moment<br />
turning on the audio processor. Hence, note that the VCC changement effection. Where,<br />
C11 is the tantalum capacitor for compensation. Considering the mutual interference of<br />
anolog and digtal signals, it’s recommended that seperate VCC and GND into two<br />
parts. The power supply and ground portion then are connected respectively by BEAD.<br />
3
System Clock Switches<br />
HT98R068-1 Two-way Radio OTP MCU<br />
In the system setup preliminary stage, the operating frequency controlled by two groups of<br />
registers, CTRL2 [7-5, 3-0] and CTRL0 [0] is firstly selected. The description is as follows:<br />
System <strong>Control</strong> Register 2 (CTRL2)<br />
Bit 7 6 5 4 3 2 1 0<br />
CTRL2 M1 M0 PLLD2 AUPRST PLLEN PLLD1 PLLD0 LXTEN<br />
POR 0 0 1 0 0 1 1 0<br />
CTRL2 [3]: ON/OFF PLL mode 1. This bit controls the PLL on/off. The CTRL2 [7-6] bits<br />
select the PLL ascending frequency which has four system frequencies to meet different<br />
application requirmennts. The CTRL2 [5] bit selects the PLL divider ratio of the audio<br />
processor with one and two times provided. The CTRL2 [2-1] bits is the MCU PLL<br />
divider/multiplier select bits with 1, 2, 4 ratio selections. The CTRL2 [0] bit is LXT low<br />
speed selection bit, which can request the system to enter the IDLE mode when used<br />
together with HALT instruction.<br />
System <strong>Control</strong> Register 0 (CTRL0)<br />
Bit 7 6 5 4 3 2 1 0<br />
CTRL0 PCFG PFDCS - - - PFDC LXTLP CLKMOD<br />
POR 0 0 - - - 0 0 1<br />
The CTRL0 [0] bit selects the MCU high speed mode. If CTRL0 [0] =1, the MCU operates<br />
in the low speed mode (32,768kHz). If CTRL0 [0] = 0, the MCU operates in the PLL mode.<br />
When using the PLL mode, it is important to note that when the PLL is enabled the PLL<br />
ascending frequency ratio, MCU and audio processor divider ratio must be first selected<br />
after which a delay of 10ms (PLL stabilising time) mus be implemented before allowing it<br />
to be a device clock source. When the MCU is on by using the CTRL0 [0] bit and the<br />
audio processor is turned on by using the CTRL2 [4] bit, the MCU operates in the PLL<br />
mode, it is not recommended that change the PLL divider setting.<br />
PLLEN M1,M0<br />
PLL<br />
Speed<br />
MCU<br />
PLLD1 , PLLD0<br />
0,1 (÷1) 1,0 (÷2) 1,1 (0,0)<br />
Audio Processor<br />
PLLD2<br />
0 (÷1) 1 (÷2)<br />
0 X 32.768K 32.768K 32.768K<br />
1 00 8.192M 8.192M 4.096M 2.048M 8.192M 4.096M<br />
1 01 10.24M 10.24M 5.12M 2.56M 10.24M 5.12M<br />
1 10 12.288M 12.288M 6.144M 3.072M 12.288M 6.144M<br />
1 11 16.384M 16.384M 8.192M 4.096M 16.384M 8.192M<br />
X: Don’t care<br />
MCU & Audio Procrssor PLL Divider Table<br />
4
PLL <strong>Control</strong> Flow - for MCU<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: Setup the PLL divider and PLL enable.<br />
: Delay 10ms which is to wait the PLL to stabilise.<br />
: Set the MCU to be in the PLL mode.<br />
<strong>Control</strong>ling Audio Processor<br />
Audio Processor Reset<br />
After the PLL is setup, the next step is to enable the audio processor by setting the<br />
CTRL2 [4] bit, which is the audio processor reset signal control bit. Use a 1 � 0 � 1<br />
sequence, which drives POR=0. Also do not set CTRL[4]= 1 when configuring the PLL.<br />
After a reset, it is necessary to wait for 200ms~300ms (fSYS_Audo=16MHz (Note) ) before<br />
sending the control command. This waiting perios is for the audio processor internal<br />
initialisation, including RAM initialisation, ADC, DAC ...etc. Any SPI commands during<br />
this period will be invalid as shown below:<br />
5
Audio Processor Reset Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: This is the audio processor reset bit. The correct reset sequence is 1 � 0<br />
� 1, with two nope instructions in between.<br />
: This is the audio processor initial time. Any SPI data transmitted during this<br />
period may be overwritten by the audio processor and become invalid , which may waste<br />
250ms~300ms.<br />
Audio Processor Turn on Timing<br />
Note: fSYS_Audo is audio processor fSYS.<br />
Audio processor Turn on Timing<br />
6
SPI Command<br />
HT98R068-1 Two-way Radio OTP MCU<br />
The audio processor uses the SPI interface as the communication interface with two methods<br />
of communicating through the internal (SPICR [7] =1) SPI circuit or the external (SPICR [7] =0)<br />
pin-shared I/Os (the following unit will describe). The internal communication can control the<br />
practical circuit by using the control bit as the following table shows:<br />
SPI <strong>Control</strong> Register(SPICR)<br />
Bit 7 6 5 4 3 2 1 0<br />
SPICR IEMC - ERAM SPISS SPICK MOSI MISO SPIRQ<br />
POR 1 - 0 1 0 0 x x<br />
SPICK MOSI MISO SPISS SPIRQ<br />
SPICR[7]=1 SPICR[3] SPICR[2] SPICR[1] SPICR[4] SPICR[0]<br />
SPICR[7]=0 PC6 PC4 PA5 PC7 PC5<br />
SPI <strong>Control</strong> Signal Table<br />
One complete data transmission is 20 bits long, starting from MSB to the 20 th bit LSB. The<br />
data includes a 4-bit group command and a 16-bit data. The group is divided into two<br />
categories, I/O and CLI. Their maximum SPI pulse frequencies are 16MHz and 150kHz.<br />
When designing, it’s recommended that the frequency should be less than 150kHz that<br />
the SPI receive and transmit program can be shared. The I/O command is applied in<br />
some application areas, such as for circuit control, sharing data etc, marked as I/O<br />
CMD-NNh in this document. The CLI (<strong>Control</strong> layer interface) command can access the<br />
audio processor related parameters, such as the threshold parameters, modulation,<br />
advanced application control and so on. Its usage is different from the I/O group and<br />
requires three commands to write a command completely. Reading data requires two<br />
commands. These are marked as CLI CMD–NNNNh in this document. See the following<br />
for details:<br />
SPISS<br />
SPICK<br />
MOSI<br />
MISO<br />
SPIRQ<br />
C3 C2 C1 C0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0<br />
C3 C2 C1 C0 D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0<br />
HT98R068-1 SPI Communication Format<br />
7
SPI Application Example Program<br />
HT98R068-1 Two-way Radio OTP MCU<br />
The source codes are attached in the HT98R068-1_App<strong>Inc</strong>.inc file where the SPI<br />
application section contains:<br />
� SPI command Macro = SPITX (macro)<br />
� SPI Write = Procedure_SPI_Tx (procedure)<br />
� SPI Read = Procedure_SPI_Rx (procedure)<br />
� I/O Command (C[3-0]:Write/Read=8xxxx/9xxxx)<br />
The [19-16] bits are setting differs for reading and writing. Set to “8(Dec)” for a write<br />
command and “9(Dec)” for a read command. The audio processor will not reply with any<br />
information during data writing. D7-D0 will be in a “Don’t Care” condition during a read<br />
command execution. A7~A0 are the register addresses. D7~D0 are the access datas.<br />
Write I/O CMD:<br />
Master write:<br />
SPI[19:16] SPI[15:8] SPI[7:0]<br />
4’b1000 Address(A7~A0) Data(D7~D0)<br />
Audio processor reply:<br />
SPI[19:16] SPI[15:8] SPI[7:0]<br />
x (No signal) x (No signal) x (No signal)<br />
Read I/O CMD:<br />
Master Write:<br />
SPI[19:16] SPI[15:8] SPI[7:0]<br />
4’b1001 Address(A7~A0) x (Don’t care)<br />
Audio processor reply:<br />
SPI[19:16] SPI[15:8] SPI[7:0]<br />
4’b1001 Address(A7~A0) Data(D7~D0)<br />
Ex: Write C3h to the I/O register “1Eh” and then read this register to confirm if it is<br />
correctly written.<br />
� Write 1Eh Flow<br />
Flow description:<br />
: Enable the DAC2, DAC1, AMP2, AMP1, Buffer, MIC and PGA circuits.<br />
There will be no data response after the command is transmitted.<br />
8
� Read 1Eh Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: Read the 1Eh register. A data response will be sent to 1Eh after this<br />
command is transmitted.<br />
CLI Command<br />
This interface protocol is different from the I/O command. For the write mode it must<br />
contain three bytes of 20-bit SPI data and two for the read mode. To excute the CLI<br />
command, the first byte is ID code, then the 16-bit address and finally the 16-bit data.<br />
Reading data will have no data byte. The ID code of the read/write mode is different.<br />
IDcode >> Read/Write: 14181/14082, must be correct so that the audio processor will<br />
continue to receive successive data. When the data is written, the audio processor will<br />
reply with 14000 which means that the data is correctly written, otherwise it means no<br />
data written.<br />
� Write CLI CMD<br />
� Master Write<br />
CLI_CMD Major Minor Multi Length<br />
4’b0001 4’b0100 4’b0000 4’b1000 4’b0010<br />
4’b0001 Address[15:0]<br />
4’b0001 Data[15:0]<br />
� Audio processor reply<br />
CLI_CMD Major Minor Multi Length<br />
4’b0001 4’b0100 4’b0000 4’b0000 4’b0000<br />
� Read CLI CMD<br />
� Master Write<br />
CLI_CMD Major Minor Multi Length<br />
4’b0001 4’b0100 4’b0001 4’b1000 4’b0001<br />
4’b0001 Address[15:0]<br />
� Audio processor reply<br />
CLI_CMD Major Minor Multi Length<br />
4’b0001 4’b0100 4’b0001 4’b1000 4’b0001<br />
4’b0001 Data[15:0]<br />
9
HT98R068-1 Two-way Radio OTP MCU<br />
Ex: Write FFFFh (with MOD and SMOD outputs at the maximum modulation) to the CLI<br />
register "04CBh" and then read this register.<br />
� Write 04CBh Flow<br />
Flow description:<br />
: The CLI writeS ID code. To execute a write operation with the CLI Command,<br />
it is necessary to execute this command first. No data response will be provided.<br />
: Select the 04CB register. Set as a write register. No data response will be<br />
provided.<br />
: Set the data: FFFFh. Write data to the register. A data response of 14000<br />
means that it is correctly written, otherwise it means that no data has been correctly<br />
written.<br />
� Read 04CBh Flow:<br />
Flow description:<br />
: The CLI read ID code. To execute a read operation with the CLI command,<br />
it is necessary to execute this command first. No data response will be provided.<br />
: Select the 04CB register. Set the read register. After the command, it will<br />
reply with 14181 firstly, then responses the read data 1FFFFh (the 04CBh data is<br />
FFFFh). There are two bytes of data in all.<br />
10
External <strong>Control</strong><br />
HT98R068-1 Two-way Radio OTP MCU<br />
For different audio processing control requirements, in addition to the internal MCU<br />
connections, external SPI control is also supported. However, before using the external<br />
control, some relevant initialisation must be executed which includes the PLL, reset and<br />
SPI path. After the PLL is setup and the audio processor is reset (the flow is the same<br />
with the previous unit), set SPICR [7] (IEMC) =0 to switch the SPI path to be an external<br />
pin-shared port so that the external SPI command can be excuted. The five occupied I/O<br />
ports cannot be applied for other functions at this time.<br />
SPICK MOSI MISO SPISS SPIRQ<br />
SPICR[7]=1 SPICR[3] SPICR[2] SPICR[1] SPICR[4] SPICR[0]<br />
SPICR[7]=0 PC6 PC4 PA5 PC7 PC5<br />
SPI <strong>Control</strong> Signal Table<br />
Points to note when using external control<br />
� when required to reduce the PLL frequency or entering the sleep mode<br />
� when the SPI is returned to the internal MCU control<br />
� Usable pins decrease<br />
When 1 or 2 problems of those described above occurs, it’s recommended that use<br />
master slave control signal in the SPI external control unit and internal MCU or establish<br />
a control protocol, for the objective of internal register control for frequency adjustment or<br />
audio processor control.This will reduce the loading on the master MCU (external MCU)<br />
for calculations and flow control. See the following for description:<br />
External MCU Connection Diagram<br />
11
� Use External <strong>Control</strong> Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: Enable and set the PLL.<br />
: Reset the audio processor.<br />
: Check the control signal status and select the SPI path to be<br />
external or internal.<br />
: Excute the MCU SPI external/internal control bit configuration.<br />
: Excute the external/internal MCU system flow.<br />
IDLE/SLOW/TX/RX Mode Select Setting<br />
When applied in a radio walkie talkie application, the ON/OFF circuit and function for<br />
different modes are different, as well as the ON/OFF timing. Switch to the correct input or<br />
output source and disable any unnecessary circuits so as to save power and eliminate<br />
interference among signals (Note that turning on the circuit needs a stable time<br />
(according to the circuit, it is usually about 250ms) except that the system enters the<br />
sleep mode to wait). This control is designed in the I/O command group.This part is in the<br />
I/O command making signal control easier and empty the unnecessary processing<br />
resources.The following describes the three mode setups (see SLOW Mode in VOX):<br />
12
IDLE M ode<br />
HT98R068-1 Two-way Radio OTP MCU<br />
When the audio processor is not processing data, entering this mode can save power,<br />
however the quantity depends on the actual practical situation. The device provides many<br />
ways to enter the idle mode (see to the datasheet). Here we use the simplest method.<br />
The I/O CMD-51h can control the audio processor operation-stop/operate: FAh/F8h. Note<br />
that it must be separated into two parts of commands. Stop the audio processor by using<br />
an F8h � FAh � DAh sequence while operating by using DAh � FAh � F8h. Disable<br />
the audio processor clock when no event is happening, then use the MCU to detect the<br />
external signals, and enable the audio processor after the signal is identified as shown<br />
below.<br />
� IDLE Mode Setup Flow<br />
Flow description:<br />
When there is no output or input signal are waiting to be processed, the audio<br />
processor can be disabled. After it’s enabled, operating can be restarted without<br />
needing re-initialise.<br />
: Enable the audio circuit power supply or select to enable the needed circuit<br />
only.<br />
: Enable the audio processor pulse frequency first stage switch.<br />
: Enable the audio processor pulse frequency second stage switch.<br />
//<br />
: Disable the audio circuit power supply to lower or turn down unnecessary<br />
power consumption.<br />
: Set the input/output line input/output path as common-mode bias voltage to<br />
reduce misunderstanding and reset the receive status.<br />
: Disable the audio processor pulse frequency first stage switch.<br />
: Disable the audio processor pulse frequency second stage switch.<br />
13
TX Mode<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Entering the TX mode depens on the input data trigger, such as pressing PTT, audio<br />
signal (VOX)…etc.The mode switches, input source selection, circuit disabling etc will be<br />
generally executed in this mode. As for the audio buffer input source, it is recommended<br />
to switch to bias voltage to reduce noise, or disable the buffer (I/O CMD-1Eh [3]), or even<br />
choose both. During TX/RX switching, it is recommended to execute circuit ON/OFF �<br />
path select � mode switch so as to decrease the generation of error signals. The<br />
following illustrates the PTT processing:<br />
Ex: Setup the TX mode, Input = MIC, Output = MOD, No Sub-tone.<br />
� Tx Mode Setup Flow<br />
Flow description:<br />
: Enable the DDAC1, AMP1, MIC and PGA circuits. Setup the circuit switch<br />
first. DAC1, AMP1 on-enable the MOD output. MIC on-enable the microphone circuit,<br />
PGA on- enable the PGA input source.<br />
: Select the input PGA and audio input source paths. Select the PGA input<br />
source to be MIC and the audio output to be DAC common-mode bias voltage to<br />
reduce noise.<br />
: Enter the TX mode. Select the TX mode as the final step to enter the TX<br />
processing flow.<br />
14
RX Mode<br />
HT98R068-1 Two-way Radio OTP MCU<br />
This mode is mainly applied for in-band signal demodulation. Although it is acceptable to<br />
wait for the RF signal in this mode, it is recommended that the MCU should verify the<br />
RSSI (Receive signal strength indicator) signal before switching the input source to the<br />
DEMOD path and then enable the audio processor for management. In this way, power<br />
can be saved and in the meantime avoid erroneous signal judgments. The modes<br />
switching, paths selection, circuit ON/OFF and the SPI command settings are as follows:<br />
Ex: RX mode, Input = DEMOD, Output = AUDO (source = DAC1), No Sub-tone.<br />
� RX Mode Setup Flow<br />
Flow description:<br />
: Confirm if the RF signal is OK.<br />
: Enable the DAC1, buffer and PGA circuits. Setup the circuit switches first.<br />
DAC1 on-enable DAC1 output, AUDO output buffer on- enable the audio output circuit,<br />
PGA on- enable the PGA input source.<br />
: Select the PGA and audio input source paths. Select the PGA input source<br />
to be DEMOD, the audio output to be DAC1 and then switch the DAC1 pin source path<br />
to the internal common-mode bias voltage in order to prevent the audio leaking from<br />
MOD.<br />
: Enter the RX mode. Select the RX mode as the final step to enter the RX<br />
processing flow.<br />
15
Audio Processor IRQ<br />
HT98R068-1 Two-way Radio OTP MCU<br />
When an audio process event occurs, the audio processor will use this signal as an<br />
interrupt request, during which time the master should send a SPI signal to read the<br />
20-bit data, transmitting 100h as the first 12 bits data with the last data corresponding to<br />
the I/O CMD-23h, the last byte data bit will generate an interrupt if there is a status<br />
changing event (0 � 1 or 1 � 0). Hence, read the I/O CMD-23h command again to<br />
acknowledge the event is OK or end. The I/O CMD-22h is the interrupt mask selection,<br />
and is used as an interrupt request. The main interrupt source must be enabled (I/O<br />
CMD-22h [6] =1). This application does not need to use a polling method. Managing after<br />
the interrupt generation makes the MCU more efficient. The format description is as<br />
follows:<br />
Event Interrupt Mask - 22h Address<br />
Bit 7 6 5 4 3 2 1 0<br />
Name — IRQ<br />
DTMF<br />
INT<br />
Selective<br />
call INT<br />
CTCSS<br />
INT<br />
DCS<br />
INT<br />
Audio Processor IRQ Event Masking <strong>Control</strong> Register<br />
Off_Tone<br />
INT<br />
Event VOX DCS CTCSS SelCal_Tone DTMF Off_Tone<br />
IRQ SPI Data 10001h 10004h 10008h 10010h 10020h 10002h<br />
Polling I/O<br />
Command 23h<br />
01h 04h 08h 10h 20h 02h<br />
Polling I/O<br />
Command 30h<br />
— — 01h — — —<br />
IRQ & Polling Comparision Table (when generating an active signal)<br />
Ex: Detect the CTCSS tone.<br />
� CTCSS Interrupt Flow<br />
Step 1: Enable CTCSS INT.<br />
16<br />
VOX<br />
INT
Step 2: Rx AUP ISR.<br />
Step 3: Rx 23h detection flow.<br />
Flow description (1):<br />
HT98R068-1 Two-way Radio OTP MCU<br />
: Set the interrupt enabled selection. Select the CTCSS interrupt, enable the<br />
interrupt source.<br />
Flow description (2):<br />
: Confirm this interrupt signal is CTCSS event.<br />
: Poll event status.<br />
Flow description (3):<br />
: Confirm this interrupt signal is approved by CTCSS (92308) or<br />
don’t decode CTCSS (92300) correctly.<br />
17
Audio Processor Status Reset<br />
HT98R068-1 Two-way Radio OTP MCU<br />
When decoding normally, the audio processor processes depending on the signal data<br />
code, frequency and amplitude. Its status (I/O CMD-23h, 30h) will change if the<br />
communication flow meets with that RF ok � signal ok � signal fail � RF fail. When the<br />
audio status changes by a sequence 0 � 1 � 0, it can decode again in the next<br />
communication setup. However, sometimes due to using of various combinations, there<br />
is no way to get the audio processor decoding again and it remains the false status.<br />
Hence, we need a mechanism to make it back to the decoding stage to decode again.<br />
There are two ways:<br />
� Reset using command (I/O CMD: 10000), but note that this command will make the<br />
original data wrote to the CLI automatically overwritten.<br />
� Reset basing on signal. Set the PGA source to be VAG and increase the de-response<br />
delay time to make the audio processor return to none decoding automatically, the<br />
status register will be changed to 0, then switched to the Rx mode to detect the signal<br />
again. But the disadvantage is that it must consum time to delay.<br />
The other situation is sub-audio tail-tone detection status, CTCSS anti-tone (I/O<br />
CMD-30h [0] =1) or DCS off-tone (I/O CMD-23h [1] =1). When decoding a CTCSS<br />
off-tone, the I/O CMD-30h[0]=1, this status will be remained(because it is belong to<br />
respective decode), so we must load I/O CMD: 12000 and make it reset sub-audio<br />
tail-tone decoding detection, set I/O CMD-30h[0]=0 or I/O CMD-23h[1]=0. Hence, take it<br />
to consider that at the moment decoding the tail-tone it excutes the command<br />
immediately when designing.<br />
Internal Audio <strong>Function</strong><br />
In the open public radio system (such as aviation communication), when someone wants<br />
to select to call some users or resist to receive irrelevant information, the selective call<br />
function is always applicated in specifying the person to communicate with. When calling<br />
someone, the tranimitter will firstly transmit the specification information of 2 or 5 tones<br />
audio (selective call), then send the sound signal. Each receiver of the same frequency<br />
will receive this radio signal then decodes the data of 2 or 5 tones at the same time and<br />
compare them. If the decoded selective call code is the same with the receiver’s, the<br />
process end will open the speaker to make it heared to complete the communication<br />
information transmission of the ends. Besides, the signals such as DTMF are applied in<br />
keys triggle, can be used in transmitting the data input by the user to the other end to<br />
decode or application of the same selective call use. This product provides two audio<br />
selection, selective call and DTMF, which include transmit encoder and receive decoder<br />
as the following shows.<br />
18
Selective Call Setting<br />
19<br />
HT98R068-1 Two-way Radio OTP MCU<br />
It’s a sine wave frequency anolog signal, has 16 groups of signals. It meets with the<br />
standard international specification (EIA, EEA, CCIR, ZVEI 1, ZVEI 2…etc), also, the<br />
user can define the frequency channel to applicate flexibly. It can be achieved from<br />
300Hz to 3000Hz. Set this function by using I/O CMD-11h [4-2] = b’010. Select the TX<br />
encode channel by using I/O CMD-2Ah [3-0]. Each channel data is separately stored in<br />
the two proximate CLI CMD registers. For example, the channel 0 data is located in CLI<br />
CMD-04E0 and 04E1. It can generate required frequency by application program. In the<br />
Rx mode, the process unit will detect the incoming signal frequency and compare the<br />
datas in the channel list (CLI CMD-04E0~04FF). If the comparision is successful, locate<br />
the decoding frequency channel number in I/O CMD-2Eh [3-0] and set the status bit I/O<br />
CMD-23h [4]. In addition, note that the threshold setting when decoding, the generally<br />
accepted threshold is CLI CMD-0324 and the published threshold is CLI CMD-0325.<br />
They respectively control the decoding low value and the non-decoding high value which<br />
are described as the following.<br />
Ex: TX mode, Output = MOD, Selective call tone = 00h.<br />
� Set the Selective Call TX Mode Flow<br />
Flow description:<br />
: Select selective call channel. Select zeroth group frenquency channel (default<br />
EEA: 1981Hz).<br />
: Enable DAC1 and AMP1 circuit. DAC1, AMP1 on- enable MOD output.<br />
: Select input PGA and audio input source paths. Select PGA input source as<br />
VAG, the audio output as DAC common-mode bias voltage to reduce noise. The DAO1<br />
input source is DAC1.<br />
: Enter the TX mode. Select the TX mode and turn on the in-band audio =<br />
selective call function.
Ex: RX mode, Input = DEMOD, Output =null, Non sub-tone.<br />
� Set Selective Call RX Mode Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: Acknowledge the RF signal is OK.<br />
: Enable the PGA circuit, PGA on – enable the input source PGA.<br />
: Select input PGA and audio input source paths. Select the PGA input source<br />
as DEMOD, the audio output as DAC common-mode bias voltage to reduce noise. DAO1<br />
and DAO2 are DAC common-mode bias voltage.<br />
: Enter Rx mode. Select RX mode and enable in-band audio = selective call<br />
function.<br />
: Acknowledge that the signal a steady frenquency in the selective<br />
call frequency channel list.<br />
: Read the selective call detection data. Read the frenquency channel of this<br />
selective call detection data.<br />
: Store the number after detection. Store this number data<br />
temporarily. After finishing the complete byte data receiving, use it to the application.<br />
: Enter the IDLE mode. Before the RSSI signal is ok, enter the waiting<br />
mode firstly.<br />
20
DTMF Setting<br />
HT98R068-1 Two-way Radio OTP MCU<br />
DTMF is a dual tone multiple frequency anolog signal, which includes high frequency<br />
tone and low frequency tone. There are 16 groups signals (0~D), common in telephone<br />
system dialing or keypad tone. Set I/O CMD-11h [4-2] = b’100. Select the TX encode<br />
channel by using the I/O CMD-2Dh [3-0] bits and select the frequencies in the list. In the<br />
Rx mode, the process unit will detect the incoming signal and compare the 16 groups of<br />
frequencies. If the comparision is successful, locate the decoding frequency channel<br />
number in the I/O CMD-2Fh [3-0] and set the status bit I/O CMD-23h [5]. In addition, there<br />
is a power threshold (CLI CMD-01C4). It selects the minimum amplitude one of the two<br />
frequencies as the measurement standard, which is described in the following note.<br />
Ex: RX mode, Input = MOD, DTMF tone= 00h.<br />
� Set DTMF TX Mode Flow<br />
Flow description:<br />
: Select DTMF channel. Select DTMF zeroth group frenquency channel.<br />
: Enable DAC1 and AMP1 circuit. DAC1, AMP1 on- enable MOD output.<br />
: Select input PGA and audio input source paths. Select PGA input source to be<br />
VAG, the audio output to be DAC common-mode bias voltage to reduce noise. The DAO1<br />
input source is DAC1.<br />
: Enter the Tx mode. Select the TX mode and enable the in-band audio = DTMF<br />
function.<br />
21
Ex: RX mode, Input = DEMOD, Output = null, Non sub-tone.<br />
� Set the DTMF RX Mode Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: Acknowledge the RF signal is OK.<br />
: Enable the PGA circuit, PGA on – enable the input source PGA.<br />
: Select input PGA and audio input source path. Select the PGA input source to<br />
be DEMOD, the audio output to be DAC common-mode bias voltage to reduce noise.<br />
DAO1 and DAO2 are DAC common-mode bias voltage.<br />
: Enter the TX mode. Select the TX mode and enable the in-band audio = DTMF<br />
function<br />
: Acknowledge that the signal a steady frenquency in the DTM<br />
frequency channel list.<br />
: Read the DTMF detection data. Read the frenquency channel of this DTMF<br />
detection data.<br />
: Store the number after detection. Store this number data<br />
temporarily. After finishing the complete byte data receiving, use it to the application.<br />
Mode>: Enter the IDLE mode. Before the RSSI signal is ok, enter the<br />
waiting mode firstly.<br />
22
Sub-tone <strong>Function</strong><br />
HT98R068-1 Two-way Radio OTP MCU<br />
For the open systems such as walkie-talkies, under conditions of limited frequency<br />
channels, a sub-tone method can be applied to increase the same frequency channel<br />
numbers and to receive the required signals. Users at the receiving port should select the<br />
correct sub-tone type and channel so as to decode the data properly and reduce<br />
unnecessary signals. This will help to reduce the problems of mutual interference and<br />
frequency bands. The device provides two main sub-tone options described as follows.<br />
CTCSS Setting<br />
This produces analog signals of sinusoidal frequency from 62.5Hz~254.1Hz and contains<br />
51 groups of standard channel selections which meet the relevant specifications. An<br />
additional user-defined channel is provided to increase the flexibility of data protection.<br />
The channel is selected by using I/O CMD-2Bh sharing with DCS. For the audio<br />
processor, there are still two registers in which data changes should be noted when being<br />
used. In the Rx mode, it is acceptable to use polling (I/O CMD-23h [3]) or interrupt (10008<br />
I/O CMD-23h [3]) methods to detect whether it is the same as the setup channel. The<br />
table below provides relevant table and design descriptions.<br />
Tone CTCSS Tone CTCSS Tone CTCSS<br />
number freq.(Hz) number freq.(Hz) number freq.(Hz)<br />
01h 67 12h 123 23h 225.7<br />
02h 71.9 13h 127.3 24h 233.6<br />
03h 74.4 14h 131.8 25h 241.8<br />
04h 77 15h 136.5 26h 250.3<br />
05h 79.7 16h 141.3 27h 69.3<br />
06h 82.5 17h 146.2 28h 62.5<br />
07h 85.4 18h 151.4 29h 159.8<br />
08h 88.5 19h 156.7 2Ah 165.5<br />
09h 91.5 1Ah 162.2 2Bh 171.3<br />
0Ah 94.8 1Bh 167.9 2Ch 177.3<br />
0Bh 97.4 1Ch 173.8 2Dh 183.5<br />
0Ch 100 1Dh 179.9 2Eh 189.9<br />
0Dh 103.5 1Eh 186.2 2Fh 196.6<br />
0Eh 107.2 1Fh 192.8 30h 199.5<br />
0Fh 110.9 20h 203.5 31h 206.5<br />
10h 114.8 21h 210.7 32h 229.1<br />
11h 118.8 22h 218.1 33h 254.1<br />
CTCSS Frequency and Tone Numbers Table<br />
The device supports coded mark inversion designing of 180° and 120°. The Tx mode is<br />
controlled by the I/O CMD-31h [0] bit. It will generate a reversion signal by 1 � 0 or 0 � 1.<br />
The Rx mode detection is selected by the I/O CMD-31h [1] bit. If detecting a phase<br />
chaing, the I/O CMD-30h [0] bit will change to 1{note: this bit must clear to 0 automatically<br />
(see the Audio Processor Status Reset section)}. And the interrupt SPI data is sharing<br />
with (it is 10008h too). Hence, when using the CTCSS anti-tone detection function, you<br />
must check the I/O CMD-23h [3] and I/O CMD-30h [0] bits. The table below provides<br />
relevant table and design descriptions.<br />
23
Event 2 <strong>Control</strong> - 31h Address<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Bit 7 6 5 4 3 2 1 0<br />
Name — — — — — —<br />
Event 2 Status - 30h Address<br />
Event 2 <strong>Control</strong> Register<br />
En_CTC<br />
Rx_Anti-tone<br />
Bit 7 6 5 4 3 2 1 0<br />
Name — — — — — — —<br />
Event 2 Status Register<br />
En_CTC<br />
Tx_Anti-tone<br />
CTC Anti-<br />
Tone Event<br />
Ex: TX mode, Input = MIC, Output = MOD & SMOD, Sub-tone = CTCSS, CTCSS tone<br />
=01h.<br />
� CTCSS Tx Mode Setup Flow<br />
Flow description:<br />
: Setup the sub-tone channel by selecting the first group of the CTCSS channel.<br />
: Enable the DAC1, DAC2, AMP1, AMP2, MIC and PGA circuits. DAC1, AMP1<br />
on- enable the MOD output. DAC2, AMP2 on- enable the SMOD output, MIC on–enable<br />
the microphone circuit. PGA on–enable the PGA input source.<br />
: Select the PGA and audio input source locations. Select the PGA input source<br />
to be MIC and audio out to be DAC common-mode bias to reduce noise.<br />
: Enter the TX mode. Select the TX mode and enable the Sub-tone = CTCSS<br />
function.<br />
24
HT98R068-1 Two-way Radio OTP MCU<br />
Ex: RX mode, Input = DEMOD, Output = AUDO (sources = DAC1), Sub-tone = CTCSS,<br />
CTCSS tone = 01h<br />
� CTCSS RX Mode Setup Flow<br />
Flow description:<br />
: Confirm the RF signal is OK.<br />
: Enable the PGA circuit. PGA on and enable the PGA input source.<br />
: Select the PGA and audio input source path. Select the PGA input source to be<br />
DEMOD with audio out to be DAC common-mode bias to reduce noise.<br />
: Enter the RX mode. Select the RX mode and enable the Sub-tone = CTCSS<br />
function.<br />
: To be confirmed that the signal has the CTCSS sub-tone of the same<br />
channel.<br />
: Enable the DAC1, buffer and PGA circuits. DAC1 on and enable the DAC1<br />
output. AUDO output buffer on and enable the audio output circuit. PGA on and enable<br />
the PGA input source.<br />
: Select the PGA and audio input source paths. Select the PGA input source to<br />
be DEMOD, audio out sources to be DAC1 and switch the DAC1 pin source paths to the<br />
internal common-mode bias voltage in order to prevent the audio leaking from MOD.<br />
25
DCS Setting<br />
HT98R068-1 Two-way Radio OTP MCU<br />
DCS is a data waveform formed by a digital carrier signals using “0” and “1” data. The<br />
23-bit data signal includes the checksum and data codes. It provides a choice of 83x2<br />
(reverse codes included) standard channels and one user-defined channel. Set this<br />
function by using I/O CMD-11h[1-0] = b’01. The TX encode channel is selected by I/O<br />
CMD-2B h [6-0] (sharing with CTCSS). The encoding data is located in CLI CMD-04DC<br />
(DCS code bit0~bit15) and CLI CMD-04DD (DCS code bit16~bit22). When the<br />
communication is to be end, it will transmit an end signal (usually about 200ms~300ms),<br />
which is set by the channel selecting I/O CMD-82B [3-0] = h’7F. User can set CLI<br />
CMD-04DC, CLI CMD-04DD and set I/O CMD-2Bh [6-0] = h’00 to encode. But two points<br />
must be noted that the data can be recovered and it is transmitted starting from MSB. For<br />
example, set the DCS code to be 1BF1C8h, but it’s observed for 763813h by the<br />
waveform (right to left).<br />
� 1BF1C8h = 001, 1011, 1111, 0001, 1100, 1000<br />
� After resevering= 110, 0100, 0000, 1110, 0011, 0111<br />
� Oscilloscope observation(left to right,read from LSB) = (first) 1110, 1100, 0111, 0000,<br />
0010, 011<br />
7 6 3 8 1 3<br />
In the RX mode, detecting the incoming DCS code depends on the I/O CMD-2Bh<br />
pre-defined value. When detecting a correct code, the DCS event will sense that by<br />
polling (I/O CMD-23h [2]) or the interrupt (10004 � I/O CMD-23h [2]) with the DCS<br />
turn-off tone (I/O CMD-23h [1]) event checking it up which can indicate the end of DCS<br />
information (some systems provide this function to disable the audio output). The related<br />
configuration is shown in the table below:<br />
Tone DCS Tone DCS Tone DCS Tone DCS Code Tone DCS Code Tone DCS Code<br />
Number Code Number Code Number Code Number Inverted Number Inverted Number Inverted<br />
01h 023 1Dh 174 39h 445 81h 023 9Dh 174 B9h 445<br />
02h 025 1Eh 205 3Ah 464 82h 025 9Eh 205 BAh 464<br />
03h 026 1Fh 223 3Bh 465 83h 026 9Fh 223 BBh 465<br />
04h 031 20h 226 3Ch 466 84h 031 A0h 226 BCh 466<br />
05h 032 21h 243 3Dh 503 85h 032 A1h 243 BDh 503<br />
06h 043 22h 244 3Eh 506 86h 043 A2h 244 BEh 506<br />
07h 047 23h 245 3Fh 516 87h 047 A3h 245 BFh 516<br />
08h 051 24h 251 40h 532 88h 051 A4h 251 C0h 532<br />
09h 054 25h 261 41h 546 89h 054 A5h 261 C1h 546<br />
0Ah 065 26h 263 42h 565 8Ah 065 A6h 263 C2h 565<br />
0Bh 071 27h 265 43h 606 8Bh 071 A7h 265 C3h 606<br />
0Ch 072 28h 271 44h 612 8Ch 072 A8h 271 C4h 612<br />
0Dh 073 29h 306 45h 624 8Dh 073 A9h 306 C5h 624<br />
0Eh 074 2Ah 311 46h 627 8Eh 074 AAh 311 C6h 627<br />
0Fh 114 2Bh 315 47h 631 8Fh 114 ABh 315 C7h 631<br />
10h 115 2Ch 331 48h 632 90h 115 ACh 331 C8h 632<br />
11h 116 2Dh 343 49h 654 91h 116 ADh 343 C9h 654<br />
12h 125 2Eh 346 4Ah 662 92h 125 AEh 346 CAh 662<br />
13h 131 2Fh 351 4Bh 664 93h 131 AFh 351 CBh 664<br />
14h 132 30h 364 4Ch 703 94h 132 B0h 364 CCh 703<br />
15h 134 31h 365 4Dh 712 95h 134 B1h 365 CDh 712<br />
16h 143 32h 371 4Eh 723 96h 143 B2h 371 CEh 723<br />
17h 152 33h 411 4Fh 731 97h 152 B3h 411 CFh 731<br />
18h 155 34h 412 50h 732 98h 155 B4h 412 D0h 732<br />
19h 156 35h 413 51h 734 99h 156 B5h 413 D1h 734<br />
1Ah 162 36h 423 52h 743 9Ah 162 B6h 423 D2h 743<br />
1Bh 165 37h 431 53h 754 9Bh 165 B7h 431 D3h 754<br />
1Ch 172 38h 432 9Ch 172 B8h 432<br />
DCS Code and Tone Numbers Table<br />
26
HT98R068-1 Two-way Radio OTP MCU<br />
Ex: TX mode, Input = AUX, Output = MOD & SMOD, Sub-tone = DCS, DCS tone = 01h<br />
� DCS TX Mode Setup Flow<br />
(1)Tx DCS Signal<br />
(2) Transmit an off_tone signal at the end of the signal<br />
Flow description (1):<br />
: Setup the sub-tone channel by selecting the first DCS channel group.<br />
: Enable the DAC1, DAC2, AMP1, AMP2 and PGA circuits. DAC1、AMP1<br />
on-enable the MOD output. DAC2、AMP2 on- enable the SMOD output. PGA on–enable<br />
the PGA input source.<br />
: Select the PGA and audio input source paths. Select the PGA input source to<br />
be AUX with the audio out to be DAC common-mode bias voltage to reduce noise.<br />
: Enter the TX mode. Select the TX mode and enable the sub-tone = DCS<br />
function.<br />
27
HT98R068-1 Two-way Radio OTP MCU<br />
* * * After the DCS signal is transmitted * * *<br />
Flow description (2):<br />
: Select the OFF-tone to produce 134Hz signals.<br />
: Return to the idle mode. Complete the DCS and return to the standby status.<br />
Ex: RX mode, No audio tone signal, DCS sub-tone, AUDO sources = DAC1, DAC2 off,<br />
MIC off, DCS tone = 01h. All are implemented using interrupts (IRQs) in this example.<br />
When a DCS event interrupt is received, add an additional command to read the I/O<br />
CMD-23h for event status judgment:<br />
� DCS RX Mode Setup Flow<br />
(1) RF Signal Detection<br />
(2) Audio Processor IRQ Management<br />
28
(3) Enable and output the Audio_out signal<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description (1):<br />
: Confirm the RF signal is OK.<br />
: Enable the PGA circuit, PGA on - enable the PGA input source.<br />
: Select the PGA and Audio input source paths. Select the PGA input source to<br />
be DEMOD and audio out to be DAC common-mode bias voltage to reduce noise.<br />
: Enter the RX mode. Select the RX mode and enable the Sub-tone = DCS<br />
function.<br />
Flow description (2):<br />
: Confirm the interrupt is the DCS sub-tone signal of the same channel.<br />
: Check again the event status. Confirm the DCS status is 1 or 0.<br />
Flow description (3):<br />
: To be confirmed that the signal contains a DCS sub-tone of same<br />
channel.<br />
: Enable the DAC1, Buffer, PGA circuits. DAC1 on - enable the DAC1 output,<br />
AUDO output buffer on–enable the audio output circuit. PGA on–enable the PGA input<br />
source.<br />
: Select the PGA and audio input source paths. Select the PGA input source to<br />
be DEMOD, audio out sources to be DAC1 and switch the DAC1 pin source path to the<br />
internal common-mode bias voltage in order to prevent the audio leaking from MOD.<br />
29
Audio Advanced <strong>Function</strong><br />
HT98R068-1 Two-way Radio OTP MCU<br />
The device provides multiple audio processors, including scrambler, compandor,<br />
emphasis, HPF, LPF…etc. for a wide range of applications. The function switches are<br />
located in I/O CMD-2Ch [7-2]. As the audio processor operating frequencies are different,<br />
there are some restrictions in enabling the function groups and for using the TX/RX. See<br />
the appendix for reference:<br />
Audio <strong>Control</strong> - 2Ch Address<br />
Bit 7 6 5 4 3 2 1 0<br />
Name EN_Scram EN_Comp EN_Emp EN_NBW EN_WBW EN_HPF300 EN_VOX EN_AGC<br />
Advanced Audio Process <strong>Control</strong> Register<br />
Audio – Low Pass Filter/High Pass Filter <strong>Function</strong> Set<br />
In a communication system, signal interference and noise from adjacent channels will<br />
destroy the data to be transmitted or received. Suitable filtering can improve this problem.<br />
The device provides a 3.0kHz broad band and a 2.55kHz narrow band for a low pass filter<br />
as well as a 300Hz high pass filter to filte the sub-tones and signals outside the channel.<br />
The control bit I/O CMD-2Ch [4-2] is setup as follows.<br />
� 12.5k LPF & 300 HPF Enable Flow<br />
Flow description:<br />
: Setup data: 14h. 2Ch [4] = 1 enables 12.5k LPF. 2Ch [2] = 1 enables 300Hz<br />
HPF.<br />
30
HT98R068-1 Two-way Radio OTP MCU<br />
Audio – Pre-emphasis/de-emphasis Funtction Set<br />
The Emphasis function is used to modulate the high/low frequencies of the power<br />
spectrum so as to obtain a more average power spectrum density and a better S/N ratio.<br />
The high frequency power spectrum of a typical signal tends to reduce while noise will<br />
increase rapidly as the frequency rises. This is quite opposite to the signals and will<br />
cause a bad S/N ratio, so emphasis will be used to improve this unbalanced situation.<br />
The control bit I/O CMD-2Ch [5] is setup as follows:<br />
� Emphasis Enabe Flow<br />
Flow description:<br />
: Setup data: 220h. 2Ch [5] = 1 enables the Emphasis.<br />
31
HT98R068-1 Two-way Radio OTP MCU<br />
Audio – Scrambler/De-scrambler <strong>Function</strong> Setting<br />
Scrambling implements reversion signal processing which is an encryption method for<br />
the transmitted signals. In the TX mode, signals transmitted through a scrambler will<br />
become meaningless and impossible to use. Likewise, when in the RX mode, after the<br />
descrambler is used, the scrambled signals will be returned back to their original signals.<br />
The device provides eight reversion frequencies selection (CLI CMD-013A, 013B).<br />
Disable the scrambler before changing the frequency setting, and set the reversion<br />
frequency to be changed, enable the scrambler function to complete the frequency<br />
change. This function is controlled by the I/O CMD-2Ch [7] bit by using the following<br />
setup.<br />
� Scrambler Enable Flow<br />
Flow description:<br />
: Setup data: 80h. 2Ch [7] = 1 enables the scrambler.<br />
32
HT98R068-1 Two-way Radio OTP MCU<br />
� Change Scrambling Code Inversion Frequency (3200Hz) Flow<br />
Flow description:<br />
: Setup data: 00h. 2Ch [7] = 0 disable the scrambler.<br />
: The CLI wrote ID code. To execute a write operation with the CLI Command,<br />
it is necessary to execute this command first. No data response will be provided.<br />
: Select the 013A register. Setup it as a write register. No data response will<br />
be provided.<br />
: Setup data: 9873h. Write data to the register. A data response of 14000<br />
means that it is correctly written; otherwise it means that no data has been correctly<br />
written.<br />
: The CLI wrote ID code. To execute a write operation with the CLI Command,<br />
it is necessary to execute this command first. No data response will be provided.<br />
: Select the 013B register. Setup it as a write register. No data response will<br />
be provided.<br />
: Setup data: 4B3Eh. Write data to the register. A data response of 14000<br />
means that it is correctly written; otherwise it means that no data has been correctly<br />
written.<br />
: Setup data: 80h. 2Ch [7] = 1 enable the srambler.<br />
33
Audio – Compandor <strong>Function</strong> Setting<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Companding is applied to lower the dynamic range by compressing or expanding the<br />
signals. Dynamic range: 60dB, output 30dB, value = 0.5 (subject: MIC in). In a radio<br />
transmission process, the RF signals will include noise after reception. Therefore, before<br />
the signals are transmitted, the data is compressed by a certain setup ratio. When the<br />
original signals are retrieved by the descrambler expanded with the same ratio, most of<br />
RF noise that does not belong to the original signals will be eliminated after the expansion<br />
and will thus greatly reduce the noise in the output. Set the companding amplitude turning<br />
point by CLI CMD-012A in the TX mode and CLI CMD-012B in the RX mode. It’s<br />
important to note that the TX/RX setting value is different in the same turning point. For<br />
example, in the turning point of 100mV, the 1V signal in the TX mode will be measured to<br />
be 550mV by MOD but in the Rx mode it is 1900mV. Note that if the signal exceeds the<br />
limiter by companding. <strong>Control</strong> for this is setup using the I/O CMD-2Ch [6] bit as follows:<br />
� Compandor <strong>Function</strong> Enable Flow<br />
Flow description:<br />
: Setup data: 40h. 2Ch [6] = 1 enables the compandor.<br />
34
In-band Signal Level Adjustment <strong>Function</strong><br />
HT98R068-1 Two-way Radio OTP MCU<br />
The output modulation differs between different system applications. The device provides<br />
multi-level modulating settings for different paths and also provides a mixer. The<br />
modulation diagram and description are as follows:<br />
Modulation Path Block Diagram<br />
� VR1: The internal audio generator modulation level select (I/O CMD-11h [4-2: b’010]),<br />
256 levels. Default: 00h.<br />
� VR2: Sub-tone modulation level select, 256 levels. Defaul: 00h.<br />
� VR3: Mixer modulation option/setting. When VR3=0, it means no MIX function, 256<br />
levels. Default: 00h.<br />
� VR4: The MOD (pin) in-band output modulation select, 1024 levels. Default: 3FFh.<br />
� VR5: The SMOD (pin) sub-tone output modulation select, 1024 levels. Default: 3FFh.<br />
The MOD output depends on the VR1 setting (if a tone generator is used), VR4 and the<br />
system operating voltages. The SMOD output depends on VR2, VR5 and the system<br />
operating voltages. However, there may be some distortion in the actual output (RC<br />
filter etc.). For example, in a 3V system, MOD Output (max) ~= 2780mv, SMOD Output<br />
(max) ~= 1920mv due to the default value of the audio processor. Users must enable or<br />
change the path modulation level for their application.<br />
In the high frequency modulation mechanism TX mode, CTCSS and DCS always<br />
seperate the signals to access so that the digital signal of the DCS high and low fast<br />
changing can be processed efficiently. The device ouput by using the same SMOD pin, so<br />
the mixer mechanism is designed specially for output the DCS to be modulated by the<br />
MOD signal. The generic method is that the CTCSS sub-audio is output by SMOD and<br />
VR3 is disabled (CLI CMD-04D2h=0000h). The CTCSS signal is determined by VR2 and<br />
VR5. However, the DCS signal is output by MOD mixed with the audio signal. VR3 is<br />
enabled and has a numerical value to scale while VR5 is diabled (CLI CMD-04D5=0000h)<br />
or it’s OK to disable the DAC2 output. At this time, the DCS is determined by VR2 and<br />
VR3. All are aiming at taking advantages of the TX DCS function. Note that: Whether the<br />
system can applicate in this way or not is depending on the actual condition.<br />
Ex: Operating voltage = 3V, setup and enable the maximum modulation of the sub-audio<br />
path, VR5 = default (3FFh):<br />
35
� Sub-audio Path Modulating Flow<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description:<br />
: The CLI wrote ID code.<br />
: Select the register: 04CB<br />
: Setup data: 00FFh. VR2 = FFh enables the maximum VR2 level.<br />
: The audio processor writes an acknowledge reply.<br />
36
<strong>Voice</strong> <strong>Control</strong> <strong>Function</strong> -- VOX<br />
HT98R068-1 Two-way Radio OTP MCU<br />
The VOX function is often applied in some special applications. From the VOX high level<br />
threshold (CLI CMD-04CD) and low level threshold (CLI CMD-04CE) which are related to<br />
the MIC voice volume, the input source can be determined whether it is above the<br />
threshold (I/O CMD-29[1-0]=02h) or below the threshold (I/O CMD-29[1-0]=01h). The<br />
control bit is I/O CMD-2Ch [1].<br />
Audio <strong>Control</strong> - 2Ch Address<br />
Bit 7 6 5 4 3 2 1 0<br />
Name EN_Scram EN_Comp EN_Emp EN_NBW EN_WBW EN_HPF300 EN_VOX EN_AGC<br />
VOX Selection Register<br />
VOX Detection Status Chart<br />
In this mode, setup the slow mode, then lower the audio processor operating frequency<br />
(16MHz 4MHz) and disable any unused circuits (output related components) to meet the<br />
minimum power consumption (16mA - 10mA @3.3V). When the signal is acknowledged,<br />
enter the TX mode to continue with signal transmission. The control flow is shown below:<br />
� VOX Enable Flow<br />
(1) VOX and Slow Mode Setting<br />
37
(2) VOX Signal Status Detection<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Flow description (1):<br />
: Enable the MIC and PGA circuits. MIC on–enable the microphone circuit, PGA<br />
on–enable the PGA input source.<br />
: Select the PGA and Audio input source paths. Select the PGA input source to<br />
be MIC and the audio out to be DAC common-mode bias voltage to reduce the noise.<br />
: Setup to slow mode.<br />
& : Set the audio processor to the lowest<br />
frequency - 4MHz.<br />
: Setup data: 02h. 2Ch [1] = 1 enable the VOX function.<br />
Flow description (2):<br />
: To be confirmed it is a VOX event.<br />
: The VOX high/low threshold status. Read the VOX threshold status. 29h [1-0] =<br />
b’10, above the high threshold = a VOX event. 29h [1-0] = b’01, below the low threshold =<br />
end a VOX event.<br />
: Go back to the slow mode and wait.<br />
& : Set the audio processor to the maximum<br />
frequency - 16MHz (assumed to be the original setup value.)<br />
: Enter the Tx control flow.<br />
38
Auto Gain <strong>Control</strong> -- AGC<br />
HT98R068-1 Two-way Radio OTP MCU<br />
The audio input magnitude to microphones usually varies influencing the quality of the<br />
audio output. This problem is usually resolved by the addition of an AGC circuit which<br />
requires less circuit space but incurs a cost increase. This device includes an internal<br />
AGC function which can fully implement an automatic gain control mechanism when<br />
accompanied with its internal microphone amplifier (with a fixed gain of 5) and digital<br />
control. The range is selected by using the control bit I/O CMD-2Ch [0].<br />
Audio <strong>Control</strong> - 2Ch Address<br />
Bit 7 6 5 4 3 2 1 0<br />
Name EN_Scra<br />
m<br />
� AGC Enable Flow<br />
EN_Comp EN_Emp EN_NBW EN_WBW EN_HPF300 EN_VOX EN_AG<br />
C<br />
AGC Selection Register<br />
Flow description:<br />
: Setup data: 01h. 2Ch [0] = 1 enable the AGC function.<br />
Ex: With 3.3V voltage, try to select OPA ratio (standard MIC=16rms)<br />
Sol:<br />
� Step 1: The maximum AD range: 3.3 * 0.7 = 2310mV<br />
� Step2: Input source: 16rms * (2/√2) = 45.3mV<br />
� Step3: Specification→ 2310 ≧ 45.3 * 8 * C (8 = PGA max ratio, C = Amplification ratio)<br />
→ C = 6.37<br />
� Step4: Carry out the OPA resistance: R2 / R1 = 6.37<br />
→ if R1 = 10K → R2 = 62K.<br />
AGC Application Circuit @3.3V :<br />
39
Parameter Setting<br />
HT98R068-1 Two-way Radio OTP MCU<br />
The audio processor frequency generation, threshold detection, variation values, drop<br />
time and limiting values can be modified according to actual requirements and generate<br />
the required setting parameters using the application program in the appendix:<br />
� Use the program HT98R068-1_AppProg_Vxx.exe to generate the required<br />
parameters.<br />
� For details, see the HT98R068-1_AppProgNote_Vxx.pdf.<br />
Tool Development Considerations<br />
� Use the development tool specifically for the HT98R068-1. Real ICE: MEV (Lot<br />
No.:M1001C) DEV (Lot No.: D1044A) or the update version).<br />
� To meet with the stabilish requirement, it’s recommended that be used by connecting<br />
with power externally to provide correct detection voltage (See e-ICE manual).<br />
� Some modifications should be made to the ICE circuit by adding a PLL Clock Sources<br />
(32.768 rystal) and a filter (PLLC Circuit). Check the figure below (Please note the pin<br />
name and the circuit. The pin name is the ICE defined pin.):<br />
ICE Gain Circuit:<br />
40
Real<br />
Chip<br />
Pin<br />
Real Chip<br />
Pin Name<br />
ICE pin assignment of the 64LQFP real chip:<br />
J5 J5<br />
Real Chip<br />
Pin Name<br />
Real<br />
Chip Pin<br />
Real<br />
Chip<br />
Pin<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Real Chip<br />
Pin Name<br />
J6 J6<br />
Real Chip<br />
Pin Name<br />
VSS 46 45 VSS VSS 46 45 VSS<br />
Real Chip<br />
Pin<br />
37 PA2 44 43 PA3 38 39 PC0 44 43 PC1 40<br />
35 PA0 42 41 PA1 36 41 PC2 42 41 PC3 42<br />
33 PB6 40 39 PB7 34 43 PD4 40 39 PD5 44<br />
NC 38 37 NC 45 PD6 38 37 PD7 46<br />
NC 36 35 NC NC 36 35 NC<br />
NC 34 33 NC NC 34 33 PA7/RESB 50<br />
NC 32 31 NC 51 PA6 32 31 PA5 52<br />
NC 30 29 NC 53 PA4 30 29 PC4 54<br />
NC 28 27 NC 55 PC5 28 27 PC6 56<br />
NC 26 25 VDD 27/28/29 57 PC7 26 25 PD0 58<br />
24 XOUT 24 23 VSS 25/26 59 PD1 24 23 NC<br />
22 PLLC 22 21 XIN 23 NC 22 21 VSS 60/61<br />
20 PB4 20 19 PB5 21 NC 20 19 NC<br />
18 PD2 18 17 PD3 19 NC 18 17 NC<br />
16 PB2 16 15 PB3 17 63 MIC_O 16 15 MIC_I 64<br />
14 PB0 14 13 PB1 15 1 DEMOD 14 13 VAG 2<br />
NC 12 11 NC 3 VAGREF 12 11 VCCA1 4<br />
NC 10 9 NC 5 AUX 10 9 PE1 6<br />
NC 8 7 NC 7 PE0 8 7 SMOD 8<br />
NC 6 5 NC 9 MOD 6 5 AUDO 10<br />
NC 4 3 NC 11 VCCA2 4 3 VSS 12<br />
VDD 2 1 VDD VEXT 2 1 VEXT<br />
41
Real<br />
Chip<br />
Pin<br />
Real Chip<br />
Pin Name<br />
ICE pin assignment of the 48LQFP real chip:<br />
J5 J5<br />
Real Chip<br />
Pin Name<br />
Real<br />
Chip<br />
Pin<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Real<br />
Chip<br />
Pin<br />
Real<br />
Chip<br />
Pin Name<br />
J6 J6<br />
Real Chip<br />
Pin Name<br />
VSS 46 45 VSS VSS 46 45 VSS<br />
30 PA2 44 43 PA3 31 32 PC0 44 43 PC1 33<br />
28 PA0 42 41 PA1 29 34 PC2 42 41 PC3 35<br />
26 PB6 40 39 PB7 27 PD4 40 39 PD5<br />
NC 38 37 NC PD6 38 37 PD7<br />
NC 36 35 NC NC 36 35 NC<br />
NC 34 33 NC NC 34 33 PA7/RESB 36<br />
NC 32 31 NC 37 PA6 32 31 PA5 38<br />
NC 30 29 NC 39 PA4 30 29 PC4 40<br />
NC 28 27 NC 41 PC5 28 27 PC6 42<br />
NC 26 25 VDD 25 43 PC7 26 25 PD0 44<br />
23 XOUT 24 23 VSS 24 45 PD1 24 23 NC<br />
21 PLLC 22 21 XIN 22 NC 22 21 VSS 46<br />
19 PB4 20 19 PB5 20 NC 20 19 NC<br />
17 PD2 18 17 PD3 18 NC 18 17 NC<br />
15 PB2 16 15 PB3 16 47 MIC_O 16 15 MIC_I 48<br />
13 PB0 14 13 PB1 14 1 DEMOD 14 13 VAG 2<br />
NC 12 11 NC 3 VAGREF 12 11 VCCA1 4<br />
NC 10 9 NC 5 AUX 10 9 PE1 6<br />
NC 8 7 NC 7 PE0 8 7 SMOD 8<br />
NC 6 5 NC 9 MOD 6 5 AUDO 10<br />
NC 4 3 NC 11 VCCA2 4 3 VSS 12<br />
VDD 2 1 VDD VEXT 2 1 VEXT<br />
42<br />
Real<br />
Chip<br />
Pin
Appendix<br />
HT98R068-1 Two-way Radio OTP MCU<br />
In the different functional groups, the audio processor system clock speed table.<br />
Sub-audio Audio Scrambler Compandor Emphasis LPF HPF fSYS_Audo<br />
None<br />
CTCSS<br />
DCS<br />
None<br />
DTMF<br />
Audio<br />
Band<br />
None<br />
DTMF<br />
None<br />
DTMF<br />
ˇ ˇ 8M<br />
ˇ ˇ ˇ 8M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
VOX 4M<br />
Rx <strong>Function</strong>al Combination Capability Table<br />
“fSYS_Audo”: Audio processor fSYS.<br />
43
44<br />
HT98R068-1 Two-way Radio OTP MCU<br />
Sub-audio Audio Scrambler Compandor Emphasis LPF HPF Fsys_Audo<br />
None<br />
CTCSS<br />
DCS<br />
None<br />
DTMF / Audio<br />
Band tone<br />
None<br />
DTMF / Audio<br />
Band tone<br />
None<br />
DTMF / Audio<br />
Band tone<br />
ˇ ˇ 8M<br />
ˇ ˇ ˇ 8M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ 12M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 12M<br />
ˇ ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ ˇ ˇ 16M<br />
Tx <strong>Function</strong>al Combination Capability Table<br />
ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M<br />
ˇ ˇ ˇ 16M