TMP92CZ26A
92CZ26A-507
immediately. At the same time, the read and write pointers of the FIFO, the data in
the output shift register and the clock generator are all cleared. (However, when
I2SnCTL<CNTEn>=1, the clock generator is not cleared. To clear the clock generator,
I2SnCTL<CNTEn> must be set to “0”). Therefore, if transmission is stopped and then
resumed, no data will be output.
The WS signal stops at Low level and the CK signal stops at Low level when the
rising edge is selected and at High level when the falling edge is selected.
3) I2SnCTL<CNTEn>
I2SnCTL<CNTEn> is used to control the clock generator (8-bit counter, 6-bit
counter) for generating the I2SnCKO and I2SnWSOsignals.
Setting I2SnCTL<CNTEn> to “1” starts the counters, and setting this bit to “0”
stops the counters. Normally, I
2
S data transmission is executed by setting both
I2SnCTL<TXEn> and <CNTEn> to “1”. When transmission is stopped by setting
I2SnCTL<TXEn> to “0” with I2SnCTL<CNTEn>=1, the clock generator is not cleared.
To clear the clock generator, I2SnCTL<CNTEn> must be set to “0”.
4) FIFO buffer
The I
2
S unit is provided with a 128-byte FIFO. Although it is not necessary to use all
128 bytes in the FIFO, data should basically be written in units of 64 bytes using an
INTI2Sn interrupt as a trigger. If data is written to the FIFO without waiting for an
INTI2Sn interrupt or in units other than 64 bytes, interrupts cannot be generated
properly.
If the last set of data, for which an interrupt is not needed, contains less than 64
bytes, set I2SnCTL<TXEn> to “0” to stop the transmission after writing the data, then
checking that the <TEMPn> flag is set to “1”, and waiting for two I2SWS periods (i.e.,
after all the data has been transmitted). In case monaural setting, make sure that the
FIFO is empty by checking the I2SnCTL<TEMPn> flag. Then, after waiting for four
periods of the I2SWS signal (after all the data has been transmitted), set <TXEn> to
“0”.
5) I2SnBUF
When writing data to the I2SnBUF register, be sure to use long-word data load
instructions. Word data load or byte data load instructions cannot be used.
Examples)
ld (I2SnBUF), xwa; OK
ld (I2SnBUF), wa; NG
ld (I2SnBUF), a; NG