English
Language : 

M16C26A-LM Datasheet, PDF (2/16 Pages) Renesas Technology Corp – Sample Program (Lux Meter)
ç
3. Port Arrangement
Luxmeter
10MHz
M16C/26A Group
Sample Program (Lux Meter)
P100
P91 LCD E
P90 LCD RS
-$%
P63 LCD D7
P62 LCD D6
Lç Iç Gç Hç Tç
P61 LCD D5
LEVEL
0
Xin
P60 LCD D4
M30260F8AGP
4. Operational Outline
Illuminance levels (−4 to 4) are shown on liquid crystal display by using an illuminance sensor.
Determine the criterion for brightness in 5 seconds after the pressing the reset switch.
Then, when light is impinged on the illuminance sensor to increase brightness, the illuminance level displayed on LCD changes from 0 to 1,
2, 3 and 4.
Conversely, when brightness is reduced, the illuminance level displayed on LCD changes from 0 to 1, 2, 3 and 4.
Illuminance sensor Liquid crystal display
5seconds elapsed
Reset switch
depressed
M16C26A
Liquid crystal display
-*()5
-&7&-
M16C26A
When light is impinged on illuminance
sensor, illuminance level increases.
• 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, LCD display management and AD input are performed using this timer.
• AD0 (single-shot mode, illuminance input measurement)
Analog voltages are converted to digital data using the main clock of the microcomputer as a conversion clock.
More specifically, the analog voltages output from the illuminance sensor are A/D converted.
REJ05B0811_0110 Rev.1.10
2007.11
Page 2 of 16