Flow Charts - NEC 78K0S/K 1+ Series Application Note

External event counter
Hide thumbs Also See for 78K0S/K 1+ Series:
Table of Contents

Advertisement

3.4

Flow Charts

The flow charts for the sample program are shown below.
Initial settings
Note Referencing the option byte is automatically performed by the microcontroller after reset release. In this
sample program, the following contents are set by referencing the option byte.
• Using the high-speed internal oscillation clock (8 MHz (TYP.)) as the system clock source
• The low-speed internal oscillator can be stopped by using software
• Using the P34/RESET pin as the RESET pin
8
CHAPTER 3 SOFTWARE
<Processing after reset release>
Reset start
Referencing the option byte
Stack pointer setting
Stopping watchdog timer
operation
Setting the CPU clock
frequency to 2 MHz
LVI reset
Reset source
Reset other than by LVI
= 4.3 V ±0.2 V
Setting V
LVI
μ
200 s wait
No
≥ V
V
?
DD
LVI
Yes
Setting so that an internal reset
signal is generated when
V
< V
DD
LVI
Setting the CPU clock
frequency to 8 MHz
I/O port setting
16-bit timer/event counter 00
setting
• Setting the operation mode of
CR000 as a compare register
• Setting the external event
counter compare value to
CR000
• Setting the count clock as
the valid edge (falling edge)
of the TI000 pin
Starting 16-bit timer/event
counter 00 operation (clearing
& starting the timer count upon
a match between TM00 and
CR000)
Enabling interrupt
Infinite loop
Application Note U18888EJ1V0AN
<Vector interrupt INTTM000>
Vector interrupt INTTM000
start
Note
Reversing the LED output
Return

Advertisement

Table of Contents
loading

This manual is also suitable for:

78k0s/ka1+78k0s/kb1+78k0s/ku1+78k0s/ky1+

Table of Contents