The W78C354 is a high-performance monitor microcontroller that is based on the embedded 80C32
microcontroller core. The W78C354 includes a 16 KB ROM, 512 byte internal data RAM, a 6-bit A/D
converter, two 12-bit and fourteen 8-bit PWM static DACs, one 12-bit and three 8-bit PWM dynamic
DACs, a sync processor, an I2C port, a DDC port, a watchdog timer, and glue logic specially designed
for monitor applications.
The W78C354 is suitable for monitors applying VESA DDC1/DDC2B/DDC2B+. This product's high
level of integration and the availability of a one-time programmable (OTP) flash PROM version(the
W78E354) help to reduce unit costs, development costs, and development time.
FEATURES
• 80C32 MCU core included
• 20 MHz maximum operating frequency
• 16 KB ROM for program storage
• 512 bytes of on-chip data RAM:
− Lower 256 bytes accessed as in the 80C32
− Higher 256 bytes accessed as an external data memory via "MOVX @Ri".
• One SPI/RS232 port (80C32 standard serial port)
• One external interrupt input
• Two timers/counters
• One 8-bit auto-reload timer for software time base
Open-drain, Sink current 6 mA.
Alternate function:
P1.2: DDC port serial clock DSCL.
P1.3: DDC port serial data DSDA.
I/OGeneral purpose I/O.
Sink/source current 4 mA/-100 µA.
Alternate function:
P1.4: HCLAMP (H-clamp pulse) output.
While outputing special function, P1.4 sink/source current is
4 mA/-4 mA.
Sink/source current 4 mA/-4 mA.
Alternate function:
P1.5: SOA (safe operation area) output.
OSCOUTOOutput from inverting oscillator amplifier.
OSCINIInput to inverting oscillator amplifier.
VPPIHigh voltage supply input for flash PROM.
VDDIPositive power supply for digital circuit, +5V.
VSSIDigital ground.
VAAIPositive power supply for analog circuit, +5V.
VSSAIAnalog ground.
I/OGeneral 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 sink/source
current is 4 mA/-4 mA.
I/OGeneral purpose I/O.
Sink/Source current 2 mA/-100 µA.
Alternate function:
P3.0: Serial input port.
P3.1: Serial output port.
P3.2: External interrupt input.
P3.4, P3.5: Timer/counter 0, 1 external inputs.
OOutput port.
Sink/source current 2 mA/-2 mA.
IHIN: Hsync/composite sync input.
VIN: Vsync input.
Schmitt trigger input pin.
OHOUT: Hsync output.
VOUT: Vsync output.
Sink/source current 4 mA/-4 mA.
IReset the controller (active low).
Schmitt trigger input pin.
W78C354
BLOCK DIAGRAM
Publication Release Date: October 1996
- 5 -Revision A1
W78C354
Circuit
V
DD
V
SS
Power source
Supervisor
512 x 8
RAM
16K x 8
Mask
ROM
RST
HOUT, VOUT
HIN, VIN
HCLAMP
SOA
TXD
RXD
T0
T1
Reset
WDT
Sync.
Processor
Oscillator
Serial
Port
Timer0
Timer1
CPU
CORE
Interrupt
Processor
SDAC
DDAC
ADC
2
I
C
DDC
Port
I/O
Port
Auto
Reload
Timer
INT0
SDAC0 to 13, BSDAC0 to 1
DDAC0 to 2, BDDAC
ADC0 to 3
,
VAAV
SSA
ISCL
ISDA
DSCL
DSDA
P2
P4
- 6 -
W78C354
FUNCTIONAL DESCRIPTION
The W78C354's core architecture consists of an 80C32 MCU surrounded by various special function
registers, or SFRs (some of these are 80C32 standard registers, while others are newly added; see
Table 1), 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 80C32 standard serial port. The
processor supports 109 different instructions (without "MOVX A, @DPTR" and "MOVX @DPTR, A"),
which are all compatible with the 80C32 family instruction set.
There are two major differences between the W78C354 and 80C32. First, the W78C354 cannot
access an external program or data memory. This function is unnecessary, because the W78C354's
16 KB of internal ROM and 512 bytes of on-chip RAM should be enough for most monitor
applications. Second, the W78C354 has a number of new SFRs (see Table 2), which provide more
powerful functions.
Table 1. W78C354 special function registers (SFRs)
1. SFRs with a "+" are both byte and bit-addressable.
2. The registers in the shaded region are newly added to the 80C32.
A. Memory Address Space
The W78C354 operates in three separate address spaces:
(1) The first (Figure 1-1) is the 16 KB internal program space (0000H−3FFFH).
(2) The second (Figure 1-2) is the data memory space, which is 256 bytes in size (0000H−00FFH).
The data memory is integrated inside the chip rather than outside the chip, as in a standard
80C32. This data memory space must be accessed by the "MOVX @Ri" instruction.
(3) The third (Figure 1-3) is the same as in the standard 80C32.
Publication Release Date: October 1996
- 7 -Revision A1
3FFFH
Program Memory
Data Memory
W78C354
On-Chip
On-Chip
(MOVX @Ri)
Figure 1-2
FFH
80H
7FH
00H
SFR
(Direct Addressing)
Scratchpad
RAM
(Direct/Indirect
Addressing)
FFH
0000H
Figure 1-1Figure 1-3
00H
Figure 1. Memory address space
B. Modified 80C32 SFRs
1. Timer/Counter Control Register (TCON):
BITNAMEFUNCTION
TCON.7TF1Timer 1 overflow flag.
Set by hardware on timer/counter overflow. Cleared by hardware when
processor vectors to interrupt routine.
TCON.6TR1Timer 1 run control bit.
Set/cleared by software to turn timer/counter on or off.
TCON.5TF0Timer 0 overflow flag.
Set by hardware on timer/counter overflow. Cleared by hardware when
processor vectors to interrupt routine.
TCON.4TR0Timer 0 run control bit.
Set/cleared by software to turn timer/counter on or off.
Scratchpad
RAM
(Indirect Addressing)
TCON.3-Reserved
TCON.2-Reserved
TCON.1IE0Interrupt 0 edge flag.
Set by hardware when external interrupt edge detected. Cleared by
hardware when interrupt processed.
TCON.0IT0Interrupt 0 type control bit.
Set/cleared by software to specify falling edge/low level triggered external
interrupt.
Note: The registers in the shaded region are modified from the 80C32 SFRs.
- 8 -
2. Power Control Register (PCON):
NAMEFUNCTION
SMODDouble baud rate bit.
-Reserved
-Reserved
-Reserved
GF1General-purpose flag bit.
GF0General-purpose flag bit.
-Reserved
IDLIdle mode bit.
Notes:
1. The SFR is not bit-addressable.
2. The registers in the shaded region are modified from the 80C32 SFRs.
3. Interrupt Enable Register (IE):
W78C354
BITNAMEFUNCTION
IE.7EAIf 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.6-(Reserved)
IE.5*1Set/clear to enable/disable the DDC port's I2C interrupt.
IE.4ESSet/clear to enable/disable the serial port 0 interrupt.
IE.3ET1Set/clear to enable/disable the Timer 1 overflow interrupt.
IE.2*1Set/clear to enable/disable the *2 interrupt.
IE.1ET0Set/clear to enable/disable the Timer 0 overflow interrupt.
IE.0EX0Set/clear to enable/disable the external interrupt 0.
Notes:
*1. No name for ASSEMBLER, must be used via "IE.x".
*2. DSCLINT+ADCINT+TIMEOUT+SOAINT+VEVENT+PARAINT +DDC1INT.
”.
Publication Release Date: October 1996
- 9 -Revision A1
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.
W78C354
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".
*2. DSCLINT+ADCINT+TIMEOUT+SOAINT+VEVENT+PARAINT+DDC1INT.
C. Newly Added Special Function Registers
In addition to the 80C32 SFRs, the W78C354 has forty-nine new SFRs in the SFR address space, as
listed in Table 2.
1. "-" means the SFR has no real hardware but only an address.
2. Three SFRs (CONTREG1, CONTREG4, SICON) can be accessed by bit addressing.
CONTENT
RESET
D. Status and Control Register Overview
1. STATUS: Status Register
Publication Release Date: October 1996
- 11 -Revision A1
BITNAMEFUNCTION
0HPHsync polarity. 0: Positive, 1: Negative.
1VPVsync polarity. 0: Positive, 1: Negative.
2NOHSet by hardware if no Hsync.
3NOVSet by hardware if no Vsync.
2. CONTREG1: Control Register1, Bit-addressable
BITNAMEFUNCTION
0ADCS0ADC channel select bit 0.
1ADCS1ADC channel select bit 1.
2ENDDC1Enable/Disable DDC1 mode.
0: Disable DDC1 mode; the pin P1.3/DSDA is accessed data in the
DDC2B/2B+ mode.
1: Enable DDC1 mode ; the pin P1.3/DSDA is output data in the DDC1 mode.
3HCESH-Clamp Edge Select.
0: Pin P1.4 will output H-clamp pluse, if the leading edge of Hsync occurs.
1: Pin P1.4 will output H-clamp pluse, if the trailing edge of Hsync occurs.
4HCWS0H-Clamp Width Select bit 0.
5HCWS1H-Clamp Width Select bit 1.
6DUMMYENEnable/Disable dummy frequency generator.
DPARAINT = 0; V dummy signal will generate VEVENT interrupt.
DPARAINT = 1; V dummy signal will not generate VEVENT interrupt.
7-Reserved.
E. I/O Port
The I/O ports available in the W78C354 vary with the package, as shown in the table below:
I/O PORT68-PIN PLCC48-PIN DIP40-PIN DIP
Port 16 bits6 bits6 bits
Port 28 bits8 bits8 bits
Port 38 bits7 bits3 bits
Port 47 bitsN.A.N.A.
P1, P2, and P3 are the SFR latches of ports 1, 2, and 3, respectively. Writing a "1" to a bit of a port
SFR (P1, P2, or P3) causes the corresponding port output pin to switch to high. Writing a "0" causes
the port output pin to switch to low. When a port is used as an input, the external state of the port pin
will be read into the port SFR (i.e., if the external state is low, the corresponding SFR bit will contain a
"0"; if it is high, the bit will contain a "1"). The block diagrams and control registers are shown below.
E-1 Port 1
Besides general purpose I/O functions, port 1 provides the functions shown in the following table.