Download Print this page

Holtek HT98R068 Manual page 8

Two-way radio mcu

Advertisement

SPI Application Example Program
The source codes are attached in the HT98R068_AppInc.inc file where the SPI
application section contains:
SPI command Macro = SPITX (macro)
SPI Write = Procedure_SPI_Tx (procedure)
SPI Read = Procedure_SPI_Rx (procedure)
 I/O Command (C[3-0]:Write/Read=8xxxx/9xxxx)
The Bit[19-16] setting differs for reading and writing. Set to "8(Dec)" for a write
command and "9(Dec)" for a read command. The audio processor will not reply with
any information during data writing. D7-D0 will be in a "Don't Care" condition during
a read command execution. A7~A0 is the register addresses. D7~D0 is the access
data.
Write I/O CMD:
Master Write:
SPI[19:16]
4'b1000
Audio processor reply:
SPI[19:16]
x (No signal)
Read I/O CMD:
Master Write:
SPI[19:16]
4'b1001
Audio processor reply:
SPI[19:16]
4'b1001
Ex: Write C3h to the I/O register "1Eh" and then read this register to confirm if it is
correctly written.
Write 1Eh Flow
Flow description:
<81E3C>: Enable the DAC2, DAC1, AMP2, AMP1, Buffer, MIC, PGA circuits. There
will be no data response after the command is transmitted.
HT98R068 Two-way Radio MCU
SPI[15:8]
Address (A7~A0)
SPI[15:8]
x (No signal)
SPI[15:8]
Address (A7~A0)
SPI[15:8]
Address (A7~A0)
8
SPI[7:0]
Data (D7~D0)
SPI[7:0]
x (No signal)
SPI[7:0]
x (Don't care)
SPI[7:0]
Data (D7~D0)

Advertisement

loading