Hitachi SH7760 Solution Engine2 Overview page 106

Table of Contents

Advertisement

6.10.8 Infrared Remote Control Data Structure
The following shows the relation between the infrared remote control data and repeat codes. In addition, it
shows a structure of remote control data in the NEC format.
Remote control
data
Repeat code
Example) NEC format remote control data
[Infrared Remote Control Operation Procedure]
[Initial setting]
(1) Two kinds of formats are set by selecting the FORMAT bit of the IRRCR register.
(2) The START bit of the IRRCR register is set to "1" to start infrared remote control and infrared signal reception
(3) To enable an interrupt at the time of receiving a frame of the signal, the IRRIF bit is set to "1."
(4) To enable an interrupt at the time of transmitting a frame of the signal, the TDIE bit is set to "1."
[For infrared signal reception]
(1) When a frame of data has been received (RDI=1), the IRRIF bit of the RTKISR register is set to "1."
(2) When an interrupt at completion of signal reception has been enabled (RDIE=1), an interrupt occurs when a
frame of data is stored in the IRRRFDE register.
(3) To obtain the received data, the receiving FIFO data register (IRRRFDR) is read. The IRRRFDR register
contains a data count (that indicates the number of items of one frame of data received) and the received data
itself. If this register is read, the data count and data itself are output in this order.
(4) The size of received data is set in the received data count register (IRRRDNR). When two frames have been
received, the total data count and the two frames of data are set in the received data count register (IRRRDNR).
[For infrared signal transmission]
(1) When transmission data is transmitted, it is written to the transmitting FIFO data register. The data count for
one frame of transmission data and the data itself are written to this data register. In addition, this transmission
data count is not counted as transmission data.
(2) The count for data not transmitted is set in the transmission data count register (IRRSDNR).
(3) Data can be written to the transmission data IRRSFDR until the count for data not transmitted (IRRSDNR)
reaches 255.
(4) When a frame of data has been transmitted (TDI=1), the IRRIF bit of the RTKISR register is set to "1." An
interrupt for transmission completion occurs so long as it is enabled.
[Notes]
(1) To change the type of format, the FORMAT value of the same register must be set before the START bit of the
IRRCR register is set to "1."
(2) When the START bit of the IRRCR register is "0," transmission/reception is not guaranteed.
(3) When the specified size is larger than the IRRRDNR value during a read operation, "FF" is set for excessive read
data.
(4) Only the custom code and data code are specified for transmission data, and the leader, stop bit, frame space, and
trailer are automatically added.
(5) When the number of write data items is larger than that of the remaining transmission data (255–byte
transmission data count register IRRSDNR), a data length error occurs.
(6) When the IRRFDR register has become full during a read operation, the buffer full error bit is set to "1," and the
data received later is discarded.
(7) The RIRRIF bit of the TKISR register is cleared when "0" is written with the IRRIF bit set to "1."
LEN
DATA1
0x00
0x04
Custom 1
DATA2
···········
Custom 2
Data 1
103
DATAn
Data 2

Advertisement

Table of Contents
loading

Table of Contents