The W78E354 is a stand-alone high-performance microcontroller ASIC specially designed for use in
monitor control applications. Using the Winbond 0.8µ DPDM process, the W78E354 integrates an
embedded 8031 microcontroller core, 16K bytes of Flash cell, 512 bytes of RAM and a number of
dedicated hardware functions. These hardware functions include a 6-bit A/D converter, two/fourteen
12/8-bit PWM static DACs, one/three 12/8-bit PWM dynamic DACs, a sync processor, one DDC port,
a watchdog timer and other custom glue logic. Additional special function registers are incorporated to
control the on-chip peripheral hardware.
The chip is used to control the interface signals of other devices in the monitor and to process the
video sync signals. Because of high integration and the incorporation of Flash cell for program
memory, the device offers the user the competitive advantages of low cost and reduced development
time.
FEATURES
• 80C31 MCU core included
• 16K bytes Flash OTP memory for program storage
• Total 512 bytes of on-chip data RAM:
256 bytes accessed as in the 80C32, 256 bytes accessed as external data memory via "MOVX
@Ri".
• One SPI/RS232 port (a serial port of 8051 standard)
• One external interrupt input
• Two timers/counters
• PWM DACs:
− Two 12-bit PWM/BRM Static DACs
− Fourteen 8-bit PWM Static DACs
− One 12-bit PWM/BRM Dynamic DAC
− Three 8-bit PWM Dynamic DACs
• One 6-bit ADC with 4 multiplexed analog inputs
• Sync Processor:
− Horizontal & Vertical Polarity Detector
− Sync Separator for composite sync
− Horizontal & Vertical Frequency Counter
− Programmable dummy frequency generator
− Programmable H-clamp pulse output
− SOA output (hardware H frequency change detection)
• One DDC port (master/slave mode I
• One 8-bit Auto-reload timer for software time base
2
C with two slave address reg., support DC1/DDC2B/DDC2B+)
Publication Release Date: April 1997
- 1 -Revision A1
• Watchdog Timer
132149876
5
3
0
5
1
6
5
6
7
8
9
7
D
4
3
2
4
3
1
• Two 15 mA output pins for driving LEDs
• Power down reset
• Clock: DC to 20 MHz
• Packaged in 68-pin PLCC, 48-pin DIP and 40-pin DIP
8-bit PWM static DAC output.
Sink/Source current 4 mA/-4 mA.
With slew rate control and output delay:
1. Delay about 5 nS:
SDAC2, 5, 8, 11.
2. Delay about 10 nS:
SDAC0, 3, 6, 9, 12.
3. Without delay: the others.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
SDAC0−7: A0−A7 inputs.
* In the functional test mode
(CPU executes out of ext. program memory):
SDAC0−7: A0−A7 outputs.
12-bit PWM/BRM static DAC output.
Sink/Source current 8 mA/-8 mA.
With slew rate control and output delay:
1. Delay about 5ns: BSDAC1
2. Without delay: BSDAC0.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
BSDAC0: A8 input.
* In the functional test mode
(CPU executes out of ext. program memory):
BSDAC0: A8 output.
8-bit PWM dynamic DAC output.
Sink/Source current 8 mA/-8 mA.
With slew rate control and output delay:
1. Delay about 5 nS: DDAC1.
2. Delay about 10 nS: DDAC2.
3. Without delay: DDAC0.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
DDAC0: A9 input.
* In the functional test mode
(CPU executes out of ext. program memory):
DDAC0: A9 output.
Sink/Source current 8mA/-8mA.
With slew rate control.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
BDDAC: A10 input.
* In the functional test mode
(CPU executes out of ext. program memory):
BDDAC: A10 output.
General purpose I/O.
Open-drain, Sink current 2mA.
Schmitt trigger I/P.
No PMOS ESD cell.
VIH = 3.0V (min), VIL = 1.5V (max)
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P1.0 and P1.1: A13 and A14 inputs.
* In the functional test mode
(CPU executes out of ext. program memory):
P1.0 and P1.1: do not output A13 and A14, but function in
their normal operational state.
General purpose I/O.
Open-drain, Sink current 6mA.
Schmitt trigger I/P.
No PMOS ESD cell.
VIH = 3.0V (min), VIL = 1.5V (max)
Alternate function:
P1.2: DDC port serial clock DSCL.
P1.3: DDC port serial data DSDA.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P1.2: A13CTRL input.
P1.3: A14CTRL input.
While outputing special function, P1.4's Sink/Source
current is 4 mA/-4 mA.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P1.4: A9CTRL input.
Sink/Source current 4 mA/-4 mA.
Alternate function:
P1.5: SOA (Safe Operation Area) outpout.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P1.5: A11 input.
* In the functional test mode
(CPU executes out of ext. program memory):
P1.5: doesn't output A11, but functions as
its normal operation.
General purpose I/O.
Sink/Source current 15mA/-100µA.
With slew rate control .
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P2.0−P2.1: D0−D1 data inputs/outputs.
* In the functional test mode
(CPU executes out of ext. program memory):
P2.0−P2.1: D0−D1 program inputs.
- 6 -
Pin Description, continued
W78E354
PIN NO.
68P 64P 48P 40P
21
19
13
20
22
8
9
12
13
31
32
42
61
23
24
43
67
10
11
29
30
40
58
21
22
41
63
14
6
4
7
5
6
7
22
23
29
43
15
16
30
-
13
14
4
5
6
7
20
21
25
-
-
-
-
-
PIN
NAME
P2.2
P2.3
(STP)
P2.4
(SDAC10)
P2.5
(SDAC11)
P2.6
(SDAC12)
P2.7
(SDAC13)
P3.0
(RXD)
P3.1
(TXD)
P3.2
(INT0)
P3.3
P3.4 (T0)
P3.5 (T1)
P3.6
P3.7
I/O
TYPE
I/OD2
I/O-
TEST
NAME
D3
D4
D5
D6
D7
-
A12
(PSEN)
-
-
-
-
-
FUNCTIONAL DESCRIPTION
General purpose I/O.
Sink/Source current 4 mA/-100 µA.
Alternate function:
P2.3: STP (Self-Test Pattern) output.
P2.4−P2.7: SDAC10−13 outputs.
While outputing special function, P2.3−P2.7's
Sink/Source current is 4mA/-4mA.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P2.2−P2.7: D2−D7 data inputs/outputs.
* In the functional test mode
(CPU executes out of ext. program memory):
P2.2−P2.7: D2−D7 program inputs.
General purpose I/O.
Sink/Source current 2 mA/-100 µA.
Alternate function:
P3.0: 8051 serial input port.
P3.1: 8051 serial output port.
P3.2: External interrupt input.
P3.4 and P3.5: Timer/counter 0 and 1 external inputs.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
P3.2: A12 input.
* In the functional test mode
(CPU executes out of ext. program memory):
P3.2: PSENoutput (the read strobe to
external program memory) instead of A12.
Publication Release Date: April 1997
- 7 -Revision A1
Pin Description, continued
W78E354
PIN NO.
68P 64P 48P 40P
44
42
-
45
43
-
53
51
-
55
-
-
64
-
-
1
-
-
2
-
-
25262324171815
16
27282526192017
18
33312422
41392824TestCLKI/P
PIN
NAME
-
P4.0
-
P4.1
-
P4.2
-
P4.3
-
P4.4
-
P4.5
-
P4.6
HIN
VIN
HOUT
VOUT
RESET
I/O
TYPE
O/P-
I/P
I/OOECTRL
I/P-Reset the controller (active low).
TEST
NAME
-
-
-
-
-
-
OE
CE
PROG
EA
FUNCTIONAL DESCRIPTION
Output port (Latch output).
Sink/Source current 2 mA/-2 mA.
HIN: Hsync/Composite sync input.
VIN: Vsync input.
Schmitt trigger I/P.
With Internal high value pull-down (about 200 KΩ).
No PMOS ESD diode.
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
--------------------------------------------------------* In the Flash/RAM-test mode
(when the chip is in reset state):
HOUT: OECTRL input.
VOUT: PROG input.
Schmitt trigger I/P.
With internal pull-up (about 30 KΩ).
Clock input while in internal (glue logic's) function test.
With internal pull-up (about 30 KΩ).
--------------------------------------------------------* If the EA (TestCLK) pin is pulled low when the chip is
being reset, and remains low for at least 24 clock periods
after the reset, the CPU will execute from the external
program memory regardless of the PC value. i.e., the CPU is
forced to enter the functional test mode.
- 8 -
Pin Description, continued
W78E354
PIN NO.
68P 64P 48P 40P
141512138989OSCOUT
54523732VPP-VPPIn the Test/Flash mode, this pin is the power supply input for
68644840VDD--Positive digital power supply, +5V.
16141010VSS--Digital ground.
5250--VDD--Positive digital power supply, +5V.
3432--VSS--Digital ground.
383627-VAA--Positive analog power supply, +5V.
353325-VSSA--Analog ground.
PIN
NAME
OSCIN
I/O
TYPE
O/P
I/P
TEST
NAME
-
-
FUNCTIONAL DESCRIPTION
Output from the inverting oscillator amplifier.
Input to the inverting oscillator amplifier.
Freq.: 16 MHz to 24 MHz.
the Flash cell.
Internally connected to the other power source.
Internally connected to the other power source.
Publication Release Date: April 1997
- 9 -Revision A1
BLOCK DIAGRAM
W78E354
W78E354
DD
V
RESET
OSCIN
OSCOUT
HIN, VIN
HOUT, VOUT
HCLAMP (P1.4)
SOA (P1.5)
RXD (P3.0)
TXD (P3.1)
T0 (P3.4)
T1 (P3.5)
SS
V
Power
Source
Supervisor
Reset
Circuit
WDT
OSC/Timing
Generator
Sync
Processor
Srial Port
Timer 0
Timer1
Autoload
Timer
8031 MCU core
with 256B
Scratchpad RAM
16KB
Flash ROM
256B
Data Memory
Interrupt
Processor
SDAC
DDAC
ADC
DDC
I/O Port
Vpp
INT0 (P3.2)
SDAC0~13
BSDAC0~1
DDAC0~2
BDDAC
ADC0~3
AA, VSSA
V
DSCL (P1.2)
DSDA (P1.3)
Port 1, 2, 3
(except P1.5)
P1.5, Port 4
- 10 -
W78E354
FUNCTIONAL DESCRIPTION
A. 80C31 Core
The W78E354's 80C31 (CMOS MCU) core architecture consists of a CPU surrounded by various
Special Function Registers or SFRs. Some of these SFRs are standard 80C31 registers while others
are new additions, cf. Table 1. The device includes three general purpose I/O ports (P1, P2 and P3),
one output-only port (P4), 256 bytes of scratchpad RAM, two timer/counters (Timer0 and Timer1) and
one 8051 standard serial port. The processor supports 109 different instructions (without "MOVX
A,@DPTR" and "MOVX @DPTR,A") all of which are compatible with those of the MCS-51 family.
One distinguishing feature of the device architecture is the SFR address space into which all the
registers, peripherals and scratchpad RAM are mapped. Many of the instructions operate on an SFR
address rather than a specific register, greatly increasing the power of the instruction set.
The core controller has been designed around a state machine rather than utilizing a microcode
approach, a design methodology which offers several advantages. The first of these is that faster
circuits can be produced due to the fact that flip-flops are inherently faster than ROMs. Secondly, a
ROM-free approach allows the design to be directly utilized in ASIC gate array implementations, an
important factor for cost reductions. Finally, an entire digital logic approach provides better supply
noise immunity in most applications.
Table 1. W78E354's Special Function Registers (SFRs)
1. The SFRs with a "+" are both byte- and bit-addressable.
2. The registers in the shaded region are new additions to the 80C31 SFRs.
A.1 Address Space (cf. Figure 1)
The W78E354 CPU operates out of three separate address spaces:
- 11 -Revision A1
Publication Release Date: April 1997
W78E354
1. The first of these is the internal program space (internal Flash memory) with 16K byte size
(0000H−3FFFH). The program space can be accessed by both opcode fetches and the
"MOVC" instructions.
2. The second is referred to as the data memory space and has a size of 256 bytes (0000H−00FFH).
The data memory is integrated within the chip rather than being outside as in the case of the
standard 8031. The "inside" data memory space is accessed by the "MOVX @Ri" instruction.
3. The third address space has 256 locations while it is used by 384 bytes (256 bytes of RAM and 128
bytes of SFRs).
• The lower 128 locations of this address space (00H−7FH) are for the lower 128 bytes of scratchpad
RAM. Any of these 128 bytes may be used by a programmer but some of them have special uses.
The lowest 32 bytes are organized to four 8-byte register banks. The bank select bits (RS0 and RS1
in the PSW register) selects one of these four banks which is to be used currently as an operand in
the instruction set. Registers 0 to 7 in the bank are referenced by the register direct opcodes.
Registers 0 and 1 may also contain an address that is referenced by the register indirect opcodes.
• The higher 128 locations of this address space (80H−FFH) are shared by the higher 128 bytes of
scratchpad RAM and the Special Function Registers (SFRs). The SFRs are accessed only by "direct"
addressing while the higher 128 bytes of scrachpad RAM are accessed only by "indirect" addressing.
The higher 128 bytes of scratchpad data RAM are also available for stack space.
Address spaces 20H to 2FH are bit-addressable and can be used by the Boolean Variable
Manipulation instructions. For example, bit 0 of address 20H has a Boolean address 00H, and bit 7 of
address 2FH has a Boolean address 7FH. The higher Boolean addresses (80H−FFH) are mapped
into the SFR address space. To determine a Boolean address in some bit-addressable SFR, the
higher 5 bits of the SFR's address can be combined with the 3 lower bits that specify the desired bit in
the SFR.
3FFFH
0000H
On-Chip
Program
Memory
On-Chip
Data
Memory
FFH
(MOVX @Ri)
00H
Figure1. Addres Space
- 12 -
FFH
(Direct Addressing)
80H
7FH
00H
SFR
Scratchpad
RAM
(Direct/Indirect
Addressing)
Scratchpad
RAM
(Indirect Addressing)
A.2 The Modified 80C31 SFRs
1. Timer/Counter Control Register: TCON
BITNAMEFUNCTION
TCON.7TF1Timer 1 overflow flag.
Set by hardware on timer/counter overflow. Cleared by hardware when the
processor vectors to the interrupt routine.
TCON.6TR1Timer 1 run control bit.
Set/cleared by software to turn the timer/counter on or off.
TCON.5TF0Timer 0 overflow flag.
Set by hardware on timer/counter overflow. Cleared by hardware when the
processor vectors to the interrupt routine.
TCON.4TR0Timer 0 run control bit.
Set/cleared by software to turn the timer/counter on or off.
TCON.3-(Reserved, not used by users.)
TCON.2-(Reserved)
W78E354
TCON.1IE0Interrupt 0 edge flag.
Set by hardware when an external interrupt edge is detected. Cleared when
the interrupt is processed.
TCON.0IT0Interrupt 0 type control bit.
Set/cleared by software to specify falling edge/low level triggered external
interrupt.
2. Power Control Register: PCON
BITNAMEFUNCTION
7SMODDouble baud rate bit.
6-(Reserved)
5-(Reserved, not used by users.)
4-(Reserved for testing, not used by users.
Normally 0. If set, P2.4−P2.7 will output SDAC8-11 after reset (not power-
on reset).)
3GF1General-purpose flag bit.
2GF0General-purpose flag bit.
1PDPower-down mode bit.
0IDLIdle mode bit.
Publication Release Date: April 1997
- 13 -Revision A1
3. Interrupt Enable Register: IE
BITNAMEFUNCTION
IE.7EA
If EA = 0, no interrupt will be acknowledged (disable all interrupts).
If EA = 1, each interrupt source is individually enabled or disabled by setting or
clearing its enable bit.
IE.6IE.5*1
IE.4ES
IE.3ET1
IE.2*1
IE.1ET0
IE.0EX0
Notes:
*1: No name for ASSEMBLER, must be used via "IE.x".
*2 = (DSCLINT + ADCINT + TIMEOUT + SOAINT + VEVENT + PARAINT + DDC1INT).
(Reserved)
Set/clear to enable/disable the DDC port's I2C interrupt.
Set/clear to enable/disable the serial port 0 interrupt.
Set/clear to enable/disable the Timer 1 overflow interrupt.
Set/clear to enable/disable the *2 interrupt.
Set/clear to enable/disable the Timer 0 overflow interrupt.
Set/clear to enable/disable the external interrupt 0.
W78E354
4. Interrupt Priority Register: IP
BITNAMEFUNCTION
IP.7-(Reserved)
IP.6-(Reserved)
IP.5*1Define the DDC port's I2C interrupt priority level.
If IP.5 = 1, the priority level is higher.
IP.4PSDefine the serial port interrupt priority level.
If PS = 1, the priority level is higher.
IP.3PT1Define the Timer 1 interrupt priority level.
If PT1 = 1, the priority level is higher.
IP.2*1Define the *2 priority level.
If IP.2 = 1, the priority level is higher.
IP.1PT0Define the Timer 0 interrupt priority level.
If PT0 = 1, the priority level is higher.
IP.0PX0Define the external interrupt 0 priority level.
If PX0 = 1, the priority level is higher.
Notes:
*1: No name for ASSEMBLER, must be used via "IP.x".