|
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
|
▷ |