8051 Embedded CRT Monitor Controller MASK Version: Features
8051 Embedded CRT Monitor Controller MASK Version: Features
GENERAL DESCRIPTION
The MTV112A micro-controller is an 8051 CPU core embedded device specially tailored to CRT monitor
applications. It includes an 8051 CPU core, 384-byte SRAM, 14 built-in PWM DACs, DDC1/DDC2B interface,
24Cxx series EEPROM interface, A/D converter and a 16K-bytes internal program Mask ROM.
BLOCK DIAGRAM
STOUT
P0.0-7 P0.0-7 HSYNC
P1.0-7 XFR
RD RD H / VSYNC VSYNC
WR WR
CONTROL HBLANK
X1
VBLANK
8051
X2 CORE INT
1 WATCH-DOG
TIMER DA0-9
P2.0-3 RST RST
14 CHANNEL
PWM DAC
DA10-13
P3.0-P3.2 P3.4 P2.4-7
AD0
ADC AD1
ISCL
HSCL DDC 1/2 B & FIFO
IIC INTERFACE
HSDA INTERFACE ISDA
DA0/P5.0
DA1/P5.1
DA2/P5.2
DA3/P5.3
VDD
P1.0
NC
44
43
42
41
40
6
5
4
3
2
1
NC 7 39 DA4/P5.4
P1.5/AD3 8 38 DA5/P5.5
P1.6/AD0 9 37 DA6/P5.6
P1.7/AD1 10 36 DA7/P5.7
RESET 11 35 DA8
HSCL/P3.0/Rxd 12 MTV112A 34 DA9
HSDA/P3.1/Txd 13 33 STOUT/P4.2
ISDA/P3.2/INT0 14 32 DA10/P2.7
HSYNC 15 31 DA11/P2.6
ISCL/P3.4/T0 16 30 DA12/P2.5
VSYNC 17 29 NC
18
19
20
21
22
23
24
25
26
27
28
X2
X1
DA13/P2.4
VBLANK/P4.0
P2.1
P2.2
P2.3
HBLANK/P4.1
P2.0/INT0
VSS
NC
Page 2 of 20
MTV112A
2.0 PIN DESCRIPTIONS
Pin#
Name Type Description
40 42 44
P1.0 I/O 1 1 2 General purpose I/O
P1.1/HALFV I/O 2 2 3 General purpose I/O / Vsync half frequency output.
P1.2/HALFH I/O 3 3 4 General purpose I/O / Hsync half frequency output.
P1.3/HCLAMP I/O 4 4 5 General purpose I/O / Hsync clamp pulse output.
P1.4/AD2 I/O 5 5 6 General purpose I/O / ADC input.
P1.5/AD3 I/O 6 6 8 General purpose I/O / ADC input.
P1.6/AD0 I/O 7 7 9 General purpose I/O / ADC input
P1.7/AD1 I/O 8 8 10 General purpose I/O / ADC input
RST I 9 9 11 Active high reset
HSCL/P3.0/Rxd I/O 10 10 12 IIC clock / General purpose I/O / Rxd
HSDA/P3.1/Txd I/O 11 11 13 IIC data / General purpose I/O / Txd
ISDA/P3.2/INT0 I/O 12 12 14 IIC data / General purpose I/O / INT0
HSYNC I 13 13 15 Horizontal SYNC or Composite SYNC
ISCL/P3.4/T0 I/O 14 14 16 IIC clock / General purpose I/O / T0
VSYNC I 15 15 17 Vertical SYNC
HCLAMP/P4.4 O - 16 - Hsync clamp pulse output / General purpose output
HBLANK/P4.1 O 16 17 19 Horizontal blank / General purpose output
VBLANK/P4.0 O 17 18 20 Vertical blank / General purpose output
X2 O 18 19 21 Oscillator output
X1 I 19 20 22 Oscillator input
VSS - 20 21 23 Ground
P2.0/INT0 I/O 21 22 24 General purpose I/O / INT0
P2.1 I/O 22 23 25 General purpose I/O
P2.2 I/O 23 24 26 General purpose I/O
P2.3 I/O 24 25 27 General purpose I/O
DA13/P2.4 I/O 25 26 28 PWM DAC output / General purpose I/O (open-drain)
DA12/P2.5 I/O 26 27 30 PWM DAC output / General purpose I/O (open-drain)
DA11/P2.6 I/O 27 28 31 PWM DAC output / General purpose I/O (open-drain)
DA10/P2.7 I/O 28 29 32 PWM DAC output / General purpose I/O (open-drain)
STOUT/P4.2 O 29 30 33 Self-test video output / General purpose output
HALFH/P4.3 O - 31 - Hsync half frequency output / General purpose output
DA9 O 30 32 34 PWM DAC output / General purpose I/O (open-drain)
DA8 O 31 33 35 PWM DAC output / General purpose I/O (open-drain)
DA7/P5.7 O 32 34 36 PWM DAC output / General purpose I/O (open-drain)
DA6/P5.6 O 33 35 37 PWM DAC output / General purpose I/O (open-drain)
DA5/P5.5 O 34 36 38 PWM DAC output / General purpose I/O (open-drain)
DA4/P5.4 O 35 37 39 PWM DAC output / General purpose I/O (open-drain)
DA3/P5.3 O 36 38 41 PWM DAC output / General purpose I/O (open-drain)
DA2/P5.2 O 37 39 42 PWM DAC output / General purpose I/O (open-drain)
DA1/P5.1 O 38 40 43 PWM DAC output / General purpose I/O (open-drain)
DA0/P5.0 O 39 41 44 PWM DAC output / General purpose I/O (open-drain)
VDD - 40 42 1 Positive power supply
Page 3 of 20
MTV112A
In addition, there are 2 timers, 5 interrupt sources and a serial interface compatible with the standard 8051. The
Txd/Rxd (P3.0/P3.1) pins are shared with DDC interface. INT0/T0 pins are shared with IIC interface. An extra
option can be used to switch the INT0 source from P3.2 to P2.0. This feature maintains an external interrupt
source when IIC interface is enabled.
Note: All registers listed in this document reside in the external RAM area (XFR). For the internal RAM
memory map please refer to the 8051 spec.
addr
Reg name bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
PADMOD 30h (w) SINT0 IICF DDCE IICE DA13E DA12E DA11E DA10E
PADMOD 31h (w) P57E P56E P55E P54E P53E P52E P51E P50E
PADMOD 37h (w) - - - - - - - MORE
Page 4 of 20
MTV112A
=0 → Pin #39 is DA0.
MORE = 1 → Bits P57E,P56E,P55E,P54E,P53E,P52E,P51E,P50E,DACK,EHALFV,
EHALFH,ENCLP,ADCMOD can be programmed,and master IIC speed is
controlled by (MCLK1,MCLK0) bits.
=0 → above bits internal keep “0” by MTV112A, and master IIC speed is controlled by
IICF bit.
* SINT0 should be 0 in this case.
2. Memory Allocation
FFH
Accessible by indirect
addressing only. SFR
The value of PSW.1 =
both 0 and 1. Accessible by direct FFH XFR
(Using MOV A, @Ri addressing.
instruction) Accessible by indirect
80H
external RAM
7FH
addressing.
Accessible by direct Accessible by direct
(Using MOVX A, @Ri
and indirect and indirect
00H Instruction.)
addressing. addressing.
PSW.1=0 PSW.1 =1
00H
3. PWM DAC
Each D/A converter's output pulse width is controlled by an 8-bit register in XFR. The frequency of PWM clk is
X’tal or 2 * X’tal, selected by DACK. And the frequency of these DAC outputs is (PWM clk frequency)/253 or
(PWM clk frequency)/256, selected by DIV253. If DIV253=1, writing FDH/FEH/FFH to the DAC register
generates stable high output. If DIV253=0, the output will pulse low at least once even if the DAC register's
content is FFH. Writing 00H to the DAC register generates stable low output.
reg name addr bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
DA0 20h (r/w) DA0b7 DA0b6 DA0b5 DA0b4 DA0b3 DA0b2 DA0b1 DA0b0
DA1 21h (r/w) DA1b7 DA1b6 DA1b5 DA1b4 DA1b3 DA1b2 DA1b1 DA1b0
DA2 22h (r/w) DA2b7 DA2b6 DA2b5 DA2b4 DA2b3 DA2b2 DA2b1 DA2b0
DA3 23h (r/w) DA3b7 DA3b6 DA3b5 DA3b4 DA3b3 DA3b2 DA3b1 DA3b0
DA4 24h (r/w) DA4b7 DA4b6 DA4b5 DA4b4 DA4b3 DA4b2 DA4b1 DA4b0
DA5 25h (r/w) DA5b7 DA5b6 DA5b5 DA5b4 DA5b3 DA5b2 DA5b1 DA5b0
DA6 26h (r/w) DA6b7 DA6b6 DA6b5 DA6b4 DA6b3 DA6b2 DA6b1 DA6b0
DA7 27h (r/w) DA7b7 DA7b6 DA7b5 DA7b4 DA7b3 DA7b2 DA7b1 DA7b0
Page 5 of 20
MTV112A
DA8 28h (r/w) DA8b7 DA8b6 DA8b5 DA8b4 DA8b3 DA8b2 DA8b1 DA8b0
DA9 29h (r/w) DA9b7 DA9b6 DA9b5 DA9b4 DA9b3 DA9b2 DA9b1 DA9b0
DA10 2Ah (r/w) DA10b7 DA10b6 DA10b5 DA10b4 DA10b3 DA10b2 DA10b1 DA10b0
DA11 2Bh (r/w) DA11b7 DA11b6 DA11b5 DA11b4 DA11b3 DA11b2 DA11b1 DA11b0
DA12 2Ch (r/w) DA12b7 DA12b6 DA12b5 DA12b4 DA12b3 DA12b2 DA12b1 DA12b0
DA13 2Dh (r/w) DA13b7 DA13b6 DA13b5 DA13b4 DA13b3 DA13b2 DA13b1 DA13b0
WDT 80h WEN WCLR CLRDDC DIV253 DACK WDT2 WDT1 WDT0
*1. All D/A converters are centered with value 80h after power-on.
The H/V SYNC processing block performs the functions of composite signal separation, SYNC input presence
check, frequency counting, and polarity detection and control, as well as the protection of VBLANK output while
VSYNC speeds up to a high DDC communication clock rate. The present and frequency function block treat any
pulse less than one OSC period as noise.
Page 6 of 20
MTV112A
Output Value (11 bits)
H-Freq(KHZ)
8MHz OSC (hex / dec) 12MHz OSC (hex / dec)
1 30 215h / 533 320h / 800
2 31.5 1FBh / 507 2F9h / 761
3 33.5 1DDh /477 2CCh / 716
4 35.5 1C2h / 450 2A4h / 676
5 36.8 1B2h / 434 28Ch / 652
6 38 1A5h / 421 277h / 631
7 40 190h / 400 258h / 600
8 48 14Dh / 333 1F4h / 500
9 50 140h / 320 1E0h / 480
10 57 118h / 280 1A5h / 421
11 60 10Ah / 266 190h / 400
12 64 0FAh / 250 177h / 375
13 100 0A0h / 160 0F0h / 240
Page 7 of 20
MTV112A
VSYNC, CVSYNC and the self-test vertical pattern. The mux selection and output polarity are S/W controllable.
The VBLANK output is cut off when VSYNC frequency is over 200Hz or 133Hz depends on 8MHz/12MHz OSC
selection. The HBLANK/VBLANK shares the output pin with P4.1/ P4.0.
Display Region
Page 8 of 20
MTV112A
Hor. C E
B A
Vert. Q S
P O
V lines V lines
Hor. Total Time Us(O)=16.6635 1024 Us(O)=16.6635 480
Hor. Active Time Us(R)=15.6555 962 Us(R)=15.6555 451
Hor. F. P. Us(S)=0.063 3.87 Us(S)=0.063 1.82
SYNC Pulse Width Us(P)=0.063 3.87 Us(P)=0.063 1.82
Hor. B. P. Us(Q)=0.882 54.2 Us(Q)=0.882 25.4
MTV112A checks the VSYNC input pulse and generates an interrupt at its leading edge. The VSYNC1 flag is
set each time MTV112A detects a VSYNC pulse.
reg name addr bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
PSTUS 40h (r) CVpre X Hpol Vpol Hpre Vpre Hoff Voff
HCNTH 41h (r) Hovf X X X X HF10 HF9 HF8
HCNTL 42h (r) HF7 HF6 HF5 HF4 HF3 HF2 HF1 HF0
VCNTH 43h (r) Vovf X X X X X X VF8
VCNTL 44h (r) VF7 VF6 VF5 VF4 VF3 VF2 VF1 VF0
PCTR0 40h (w) C1 C0 HVsel STOsel PREFS HALFV HBpl VBpl
PCTR2 42h (w) X X X Selft STbsh Rt1 Rt0 STF
PCTR3 43h (w) ENCLP CLPEG CLPPO CLPW2 CLPW1 CLPW0 EHALFV EHALFH
P4OUT 44h (w) X X X P44 P43 P42 P41 P40
Page 9 of 20
MTV112A
P5OUT 45h (r/w) P57 P56 P55 P54 P53 P52 P51 P50
PCTR6 46h (w) X X X X X X CLPsel HALFHsel
INTFLG 50h (r/w) HPRchg VPRchg HPLchg VPLchg HFchg VFchg FIFOI MI
INTEN 60h (w) EHPR EVPR EHPL EVPL EHF EVF EFIFO EMI
INTFLG 51h(r/w) X X X X X X X VSYNC
INTEN 61h(w) X X X X X X X EVSI
Present Vpre
Check
Digital Filter
Frequency Vfreq
Count
Polarity Vpol
Check
VBpl
VSYNC High VBLANK
Vself Frequency
Mask
CVSYNC
Present CVpre
Polarity Check & Check
Sync Seperator
Hpol HBpl
Hself
HBLANK
HSYNC
Hpre
Present Check &
Digital Filter Hfreq
Frequency Count
PSTUS (r) : The status of polarity, presence and static level for HSYNC and VSYNC.
CVpre = 1 → The extracted CVSYNC is present.
=0 → The extracted CVSYNC is not present.
Hpol =1 → HSYNC input is positive polarity.
=0 → HSYNC input is negative polarity.
Vpol =1 → VSYNC (CVSYNC) is positive polarity.
=0 → VSYNC (CVSYNC) is negative polarity.
Hpre = 1 → HSYNC input is present.
=0 → HSYNC input is not present.
Vpre = 1 → VSYNC input is present.
=0 → VSYNC input is not present.
Hoff* = 1 → HSYNC input's off-level is high.
=0 → HSYNC input's off-level is low.
Voff* = 1 → VSYNC input's off-level is high.
=0 → VSYNC input's off-level is low.
*Hoff and Voff are valid when Hpre=0 or Vpre=0.
Page 10 of 20
MTV112A
Vovf =1 → V-Freq counter overflows; this bit is cleared by H/W when condition removed.
VF8 : High bit of V-Freq counter.
Page 11 of 20
MTV112A
=0 → pin HCLAMP/P4.4 is HCLAMP.
HALFHsel = 1 → pin HALFH/P4.3 is P4.3.
=0 → pin HALFH/P4.3 is HALFH.
INTFLG (w) : Interrupt flag. An interrupt event will set its individual flag, and, if the corresponding interrupt
enabler bit is set, the 8051 core's INT1 source will be driven by a zero level. Software MUST
clear this register while serving the interrupt routine.
HPRchg= 1 → No action.
=0 → Clears HSYNC presence change flag.
VPRchg= 1 → No action.
=0 → Clears VSYNC presence change flag.
HPLchg = 1 → No action.
=0 → Clears HSYNC polarity change flag.
VPLchg = 1 → No action.
=0 → Clears VSYNC polarity change flag.
HFchg = 1 → No action.
=0 → Clears HSYNC frequency change flag.
VFchg = 1 → No action.
=0 → Clears VSYNC frequency change flag.
VSYNCi= 1 → No action.
=0 → Clears VSYNC interrupt flag.
Page 12 of 20
MTV112A
automatically loaded with MBUF data when software reads MBUF XFR.
Page 13 of 20
MTV112A
Reg name addr bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
MCTR 00h (w) LS1 LS0 LDFIFO M256 M128 ACK P S
MSTUS 00h (r) X SCLERR DDC2 BERR HFREQ FIFOH FIFOL BUSY
MCTR 01h (w) X X X X X X MCLK1 MCLK0
MBUF 10h (r/w) MBUF7 MBUF6 MBUF5 MBUF4 MBUF3 MBUF2 MBUF1 MBUF0
INTFLG 50h (r/w) HPRchg VPRchg HPLchg VPLchg HFchg VFchg FIFOI MI
INTEN 60h (w) EHPR EVPR EHPL EVPL EHF EVF EFIFO EMI
FIFO 70h (w) FIFO7 FIFO6 FIFO5 FIFO4 FIFO3 FIFO2 FIFO1 FIFO0
SLVCTR 90h (w) ENSLV SLVsel ERCBI ESLVMI ETXBI ENSCL X X
SLVSTUS 91h (r) WADR SLVS RCBI SLVMI TXBI RWB ACKIN X
SLVSTUS 91h (w) Write to clear SLVMI
RCBUF 92h (r) RCbuf7 RCbuf6 RCbuf5 RCbuf4 RCbuf3 RCbuf2 RCbuf1 RCbuf0
TXBUF 92h (w) TXbuf7 TXbuf6 TXbuf5 TXbuf4 TXbuf3 TXbuf2 TXbuf1 TXbuf0
SLVADR 93h (w) SLVadr7 SLVadr6 SLVadr5 SLVadr4 SLVadr3 SLVadr2 SLVadr1 X
* MTV112A uses a 100KHz clock to sample the S/P bit; any pulse should sustain at least 20us.
* A write/read MBUF operation can be recognized only after 10us of the MI flag's rising edge.
MBUF (w) : Master IIC data shift register, after START and before STOP condition, write this register will
resume MTV112A's transmission to the IIC bus.
Page 14 of 20
MTV112A
MBUF (r) : Master IIC data shift register, after START and before STOP condition, read this register will
resume MTV112A's receiving from the IIC bus.
INTFLG (w) : Interrupt flag. An interrupt event will set its individual flag, and, if the corresponding interrupt
enabler bit is set, the 8051 INT1 source will be driven by a zero level. Software MUST clear this
register while serving the interrupt routine.
FIFOI = 1 → No action.
=0 → Clears FIFOI flag.
MI =1 → No action.
=0 → Clears Master IIC bus interrupt flag (MI).
SLVADR (w) : Slave IIC address to which the slave block should respond.
When the voltage level of the power supply is below 4.0V for a specific time, the LVR will generate a chip
Page 15 of 20
MTV112A
resetting signal. After the power supply is above 4.0V, LVR maintains the reset state for 144 Xtal cycles to
guarantee the chip exit reset condition has a stable Xtal oscillation. The specific time of power supply in a low
level is 3us and is adjustable by an external capacitor connected to the RST pin.
The watchdog timer automatically generates a device reset when it overflows. The interval of overflow is 0.25
sec x N, in which N is a number from 1 to 8, and can be programmed via register WDT (2:0). The timer function
is disabled after power-on reset. The user can activate this function by setting WEN and clear the timer by
setting WCLR.
7. A/D Converter
The MTV112 is equipped with two 4-bit or four 6-bit A/D converters. Each one can be enabled/disabled by S/W
control. The refresh rate for the ADC is OSC freq./6144(4-bit) or OSC freq./12288(6-bit). The ADC compare the
input pin voltage with the internal VDD*N/16(4-bit) or VDD*N/64(6-bit) voltage (where N = 0 -15 or N = 0 - 63).
The ADC output value is N when pin voltage is greater than VDD*N/16 or VDD *N/64 and smaller than
VDD*(N+1)/16 or VDD*(N+1)/64.
Reg name addr bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
ADC A0h (w) ENADC X X X X X EADC1 EADC0
ADC A0h (r) AD1b3 AD1b2 AD1b1 AD1b0 AD0b3 AD0b2 AD0b1 AD0b0
ADC A0h (r) X X ADb5 ADb4 ADb3 ADb2 ADb1 ADb0
WDT 80h (w) WEN WCLR CLRDDC DIV253 DACK WDT2 WDT1 WDT0
Page 16 of 20
MTV112A
Test Mode B: RESET falling edge & DA9=1 & DA8=0 & DA7=1 & DA6=0
5.3 DC Characteristics
5.4 AC Characteristics
Page 17 of 20
MTV112A
VS Pulse Width in H+V Signal tVCPW FXtal=12MHz 20 uS
1.981m
m
+/-0.254 2.540m
1.270mm +/- 0.457mm +/-
0.254 0.127 m
15.494mm +/-
0.254
13.868mm +/-
0.102
0.254m
1.778m m
m +/-0.102
3.81mm
+/-0.127 +/-0.127
0.254m
m
3.302m 5o~7
(min.) 0
m
+/-0.254
6o +/-
o
16.256mm +/- 3
0.508
6o +/-
eB θ° 16.256mm +/- 3
0.508
o
Page 18 of 20
MTV112A
6.3 44 pin PLCC Unit: inch
PIN #1 HOLE
0.045*45 0 0.180 MAX.
0.020 MIN.
0.013~0.021 TYP.
0.690 +/-0.005
0.610 +/-0.02
0.653 +/-0.003
0.500
70TYP.
0.010
0.690 +/-0.005
Page 19 of 20
MTV112A
7.0 Ordering Information
Standard configurations:
Prefix Part Type Package Type Other Information
N: PDIP
MTV 112A
V: PLCC
Part Type
Package Type
Part Numbers:
Page 20 of 20