English
Language : 

M16C26A-RCT Datasheet, PDF (4/18 Pages) Renesas Technology Corp – Sample Program (Remote Control Transmission/Reception)
ç
M16C/26A Group
Sample Program (Remote Control Transmission/Reception)
5. Operational Outline
<Remote control transmission>
Each time a switch is depressed, the buzzer is sounded and remote control code is transmitted from the infrared LED.
<Remote control reception>
The transmitted code is received in the remote control photodetector, and the received data is shown on liquid crystal display.
Liquid crystal display (LCD)
*353"/
3$7
Infrared LED
Remote control
photodetector
M16C26A
Code: 00H
Liquid crystal display (LCD)
*353"/
3$7
M16C26A
Remote control transmission
Remote control reception
The operation described above is accomplished using the following microcomputer facilities:
• Timer A0 (timer mode, main 2 ms cycle)
This timer counts 2 milliseconds using the main clock of the microcomputer as the count source.
It is used as the basic timer of RSK_LIB.
Time management, key scan and LCD display management are performed using this timer.
• Timer A4 (timer mode, carrier output)
This timer counts 26 microseconds using the main clock of the microcomputer as the count source.
It generates a carrier (frequency 38.46 kHz) that is output during transmission.
• Timer B0 (timer mode, remote control transmission “500 µs”)
This timer counts 500 microseconds using the main clock of the microcomputer as the count source.
It turns carrier output on and off in a 500 microsecond cycle to generate a remote control transmission waveform.
• Timer B2 (timer mode, remote control reception “250 µs”)
This timer counts 250 microseconds using the main clock of the microcomputer as the count source.
It generates remote control receive data from the port input level in a 250 microsecond cycle.
• Timer A1 (pulse modulation mode, buzzer output)
This timer outputs a waveform with different high and low pulse widths using the main clock of the microcomputer as the count source.
It is used to sound a buzzer each time a key is touched.
REJ05B0814-0110 Rev.1.10
2007.12
Page 4 of 18