DEMOKIT-LG2 Renesas Electronics America, DEMOKIT-LG2 Datasheet - Page 60

no-image

DEMOKIT-LG2

Manufacturer Part Number
DEMOKIT-LG2
Description
KIT DEMO 78K0 LG2 UPD78F0397
Manufacturer
Renesas Electronics America
Datasheet

Specifications of DEMOKIT-LG2

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
DemoKit-LG2 User’s Manual
9. Sample Project
9.1 Real-Time Clock
9.2 Temperature Measurement
9.3 Light Incidence Measurement
9.4 Buzzer Output Example
9.5 Menu Selection
54
The DemoKit-LG2 sample program resides in a single directory called main-directory, which contains
all of the output files for NEC Electronics’ integrated development environment (IDE).
The main directory contains the workspace and project files. All source files and associated files are
located in the directory. The workspace file is named DemoKit-LG2.prw is provided to demonstrate
the 78K0/LG2 MCU’s functionality.
This part of the sample project realizes a real-time clock. After the program initializes, the watch timer
generates an exact clock reference based on the 32.768 kHz subclock and the LCD displays the time in
either 24-hour or AM/PM clock format, depending on the setting selected.
Temperature is measured using the dual-slope method to convert the temperature sensor’s resistor value
into a digital counter-value. To do this, the MCU 16-bit timer/event counter 00 measures the charging
time of the C
variable resistor (R
sensor, and consequently the temperature, can be calculated by comparing the two measured times and
the known R
Fahrenheit, depending on the setting selected. Additionally, the temperature is transferred via UART6 at
the default data transfer speed of 115200 bits per second to a terminal program running on the host
computer.
This part of the sample project measures light incidence. The MCU’s A/D converter (channel 0) is used
to measure a voltage cycle at the phototransistor and the result is converted into a percent value and
displayed on the LCD.
This demonstration drives the buzzer by using the 16-bit timer/event counter 01. The timer is
configured to generate a rectangular waveform. By changing the output frequency of the timer, the
buzzer can generate different tones. For demonstration purposes, a simple melody is played.
To shift between the different operating modes of the sample project, follow the menu configuration
shown in Figure 64. The first column shows the main menus and the second the sub-menus. Move SW3
up or down to switch from one menu to another and from left to right to switch between sub-menus.
REF
18
capacitor. The first charging slope uses a reference resistor (R
reference resistor. The LCD displays the temperature in degrees Celsius or degrees
VAR
= R
5
+ R
T
), which should be determined. The variable resistor of the temperature
REF
= R
6
) and the second a

Related parts for DEMOKIT-LG2