English
Language : 

M16C26A-EDC Datasheet, PDF (3/18 Pages) Renesas Technology Corp – Sample Program (Electronic Desktop Calculator)
ç
M16C/26A Group
Sample Program (Electronic Desktop Calculator)
4. Operational Outline
Calculation results are shown on liquid crystal display.
The display shows the result of operation when calculation results are within 7 digits (from −9999999 to 9999999) or “E” when
calculation results are equal to or more than 8 digits. For example, when you enter “1234  5678 =,” the display will show “6912.” Or
when you enter “1234567  8901234,” the display will show “E.”
When a key is depressed, the buzzer sounds.
Note: In this program, pressing two or more switches at the same time has no effect (i.e., ignored).
This function is materialized 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 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.
REJ05B0812-0120 Rev.1.20
2007.11
Page 3 of 18