Ir Remote Controller (Remc3) - Epson S1C31D01 Software Manual

Cmos 32-bit single chip microcontroller peripheral circuit sample software manual
Table of Contents

Advertisement

3.12 IR Remote Controller (REMC3)

The REMC3 circuit generates infrared remote control output signals.
This example programs the REMC3 to generate various IR pulses.
Hardware Setup
This sample program is for the S5U1C31D01T1 evaluation board. For information on a connection refer to the
"S5U1C31D01T1 manual".
Operations
This example software uses the NEC format for output.
1. REMC3 determines the data waveform using two parameters: APLEN (data signal duty) and DBLEN (data
signal cycle). Each of APLEN and DBLEN defines the waveform with 34 frame signals and 2 repeat signals.
APLEN and DBLEN pair allocates the leader, customer code, and repeat signals at initialization time. Those
signals are common to different scenarios when switches SW2 to SW3 are pushed. Data may vary according
to selection of the SW2 to SW3. Data is allocated when a switch interrupt occurs.
2. Further initialization consists of configuration of switches SW2 to SW3, allocation ports for REMO, and
initialization of T16 Ch.0. Then CPU enters into the halt mode to wait for interrupts caused by pushing
switches SW2 to SW3.
3. When an interrupt occurs allocate data's APLEN and DBLEN values. Since REMC3 uses a buffer mode,
REMC3 should be activated after initialization. Also, activate T16 Ch.0 and generate a T16 Ch.0 interrupt
after about 108ms.
4. When a compare DB interrupt occurs in REMC3, write the following APLEN and DBLEN data into register.
When writing last but one data element, change REMC3 to a one-shot mode to prevent the whisker-like
signal output. After last data element, stop the REMC3 operation.
5. When a T16 Ch.0 interrupt occurred, check whether the same switch SW2 to SW3 was pushed. If the same
switch was pushed, set the register values of REMC3 so that a repeat waveform is generated, initialize
REMC3 before activation, and activate REMC3. Otherwise, stop the T16 Ch.0 operation.
S1C31D01 Peripheral Circuit
Sample Software Manual (Rev.3.00)
Seiko Epson Corporation
47

Advertisement

Table of Contents
loading

Table of Contents