w78l812a Winbond Electronics Corp America, w78l812a Datasheet - Page 7
![no-image](/images/no-image-200.jpg)
w78l812a
Manufacturer Part Number
w78l812a
Description
8-bit Mcu Series 80c51-based
Manufacturer
Winbond Electronics Corp America
Datasheet
1.W78L812A.pdf
(31 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Part Number:
w78l812a24DL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Company:
Part Number:
w78l812a24FL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78l812a24FL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
Company:
Part Number:
w78l812a24PL
Manufacturer:
Nuvoton Technology Corporation of America
Quantity:
10 000
Part Number:
w78l812a24PL
Manufacturer:
WINBOND/华邦
Quantity:
20 000
5. FUNCTIONAL DESCRIPTION
The W78L812 architecture consists of a core controller surrounded by various registers, five general
purpose I/O ports, 256 bytes of RAM, three timer/counters, and a serial port. The processor supports
111 different opcodes and references both a 64K program address space and a 64K data storage
space.
5.1
Timers 0, 1, and 2 each consist of two 8-bit data registers. These are called TL0 and TH0 for Timer 0,
TL1 and TH1 for Timer 1, TL2 and TH2 for Timer 2. The TCON and TMOD registers provide control
functions for timers 0 and 1. The T2CON register provides control functions for Timer 2. RCAP2H and
RCAP2L are used as reload/capture registers for Timer 2. The operations of Timer 0 and Timer 1 are
the same as in the W78C51. Timer 2 is a special feature of the W78L812: it is a 16-bit up/down
counter that is configured and controlled by the T2CON and T2MOD registers. Like Timers 0 and 1,
Timer 2 can operate as either an external event counter or as an internal timer, depending on the
setting of bit C/T2 in T2CON. Timer 2 has three operating modes: capture, auto-reload, and baud rate
generator. The clock speed at capture or auto-reload mode is the same as that of Timers 0 and 1. In
the auto-reload mode, Timer 2 performs a up counter which is similar with standard 8052. When
counting up, an overflow in Timer 2 will cause a reload from RCAP2H and RCAP2L registers. The
Timer 2 also provides a programmable clock-out mode as a clock generator. To enable this mode,
timer 2 has to be configured with a 16-bit auto-reload timer (C/T2 = 0, CP/RL2 = 0) and bit T2OE
(T2MOD.1) must be set to 1. This mode produces a 50% duty cycle clock output and timer 2 roll-overs
will not generate an interrupt. The clock-out frequency depends on the oscillator frequency and the
reload value of registers RCAP2H and RCAP2L. The clock-out frequency is determined by following
equation:
Clock-out Frequency = Oscillator Frequency / [4 × (65536-RCAP2H, RCAP2L)]
5.2
T2OE: Timer 2 Output Enable. This bit enables/disables the Timer 2 clock-out function.
Timers 0, 1, and 2
Timer 2 Mode Control
T2EX (P1.1)
TR2 (T2CON.2)
EXEN2 (T2CON.3)
Timer 2 Clock-Out Mode
Bit:
7
-
OSC
Mnemonic: T2MOD
6
-
1/2
5
-
4
- 7 -
-
RCAP2L
TL2
3
RCAP2H
-
Address: C9h
TH2
Publication Release Date: November 6, 2006
W78LE812/W78L812A
2
-
T2CON.6
EXF2
1/2
T2OE
1
Interrupt
Timer 2
T2 (P1.0)
0
-
Revision A9