Timer Demo; Uart Demo - NEC 78K0/Fx2 User Manual

Table of Contents

Advertisement

78K0/Fx2 – CAN it!

14.5 Timer demo

This sample program demonstrates a real time clock. After the program is started the watch timer is
initialized to generate an exact clock reference, based on the 32.768 kHz sub-clock. The actual time is
displayed using the LCD module. By pressing button SW2 / SW3 the time can be adjusted.

14.6 UART demo

This sample program
realizes a temperature meter with serial communication channel. The sample program
does a cyclic measurement of the input voltage of ANI2 analogue input, equal to port P82 of 78K0/FF2
device, connected to the temperature sensor KTY13-5. The temperature is calculated and the result is
transferred via UART60 to a terminal program running on the host machine. The data transfer speed is set
to 115200 bps per default. Additionally the temperature i
m
easurement is started the calibration of the temperature sensor has to be done, by adjusting the
temperature offset via button SW2 and SW3.
P
lease note, by using the On-Board debug mode serial communication via UART60 is not possible because
th
e USB/UART communication channel is used for debugging purpose.
Used Internal Peripherals
Timer00
Timer01
WatchTimer
Used Internal Peripherals
Timer00
A/D
converter
UART60
Used External Parts
Character LC display
Button SW2
Button SW3
LED's D1- D4
s displayed on the LCD. Before the temperature
Used External Parts
Character LC display
Te perature sensor KTY1
m
Button SW2
Button SW3
LED's D1- D4
3-5
79

Advertisement

Table of Contents
loading

Table of Contents