8051 core, 12MHz operating frequency.
512-byte RAM; 32K-byte program Flash-ROM support In System
Maximum 14 channels of 5V open-drain PWM DAC.
Watchdog timer with pro
VESA DDC interface, 3-channel A/D converter and a 32K-byte internal program Flash-ROM.
WR
WR
MTV212M32
TECHNOLOGY
(Rev 1.1)
8051 Embedded Monitor Controller
Flash Type with ISP
FEATURES
•
•
•
•Maximum 32 bi-directional I/O pins.
•SYNC processor for composite separation/insertion, H/V polarity/frequency check, polarity adjustment
and programmable clamp pulse output.
•Built-in self-test pattern generator with four free-running timings.
•Built-in low power reset circuit.
•Compliant with VESA DDC1/2B/2Bi/2B+ standard.
•Dual slave IIC addresses.
•Single master IIC interface for internal device communication.
•4-channel 6-bit ADC.
•
•40-pin DIP, 42-pin SDIP or 44-pin PLCC package.
grammable interval.
GENERAL DESCRIPTIONS
Programming(ISP).
The MTV212M32 micro-controller is an 8051 CPU core embedded device specially tailored to Monitor
applications. It includes an 8051 CPU core, 512-byte SRAM, SYNC processor, 14 built-in PWM DACs,
This datasheet contains new product information. Myson Technology reserves the rights to modify the product specification without
notice. No liability is assumed as a result of the use of this product. No rights under any patent accompany the sale of the product.
Revision 1.1 - 1 - 2000/07/04
Page 2
MYSON
MTV212M32
TECHNOLOGY
(Rev 1.1)
DEVICE SUMMARY
The MTV212M32 is one of the MTV212 family device. For other family devices information, please see the
table below:
Note: As long as the pin sequence is not changed, the 42 pin SDIP’s pin-out is negotiable according to
customer’s demand.
401
VSYNC
39
HSYNC
38
DA3/P5.3
37
DA4/P5.4
36
DA5/P5.5
35
DA8/HALFH
34
DA9/HALFV
33
HBLANK/P4.1
32
VBLANK/P4.0
31
DA7/HCLAMP
30
DA6/P5.6
29
P2.7/DA13
28
P2.6/DA12
27
P2.5/DA11
26
P2.4/DA10
25
HSCL/P3.0/Rxd
24
HSDA/P3.1/Txd
23
P2.0/AD0
22
P2.1/AD1
21
P1.7
RST
VDD
X2
X1
P1.0
P1.1
P1.2
P1.3
P1.4
P1.5
P1.6
2
3
4
5
6
7
8
MTV212M32
9
40 Pin
10
11
12
13
14
15
16
17
18
19
20
PDIP
NC
NC
NC
RST
VDD
X2
X1
P1.0
P1.1
P1.2
P1.3
P1.4
1
2
3
4
5
6
7
8
MTV212M32
9
42 Pin
10
11
12
13
14
15
16
17
18
19
20
SDIP
VSYNC
42
HSYNC
41
40
DA3/P5.3
39
DA4/P5.4
38
DA5/P5.5
37
DA8/HALFH
36
DA9/HALFV
35
HBLANK/P4.1
34
VBLANK/P4.0
33
DA7/HCLAMP
32
DA6/P5.6
31
P2.6/DA12
30
P2.5/DA11
29
P2.4/DA10
28
HSCL/P3.0/Rxd
27
HSDA/P3.1/Txd
26
P2.0/AD0
25
P2.1/AD1
24
P1.7
23
P1.6
2221
P1.5
RST
VDD
X2
X1
P1.0
7
8
9
10
11
12
13
14
15
16
17
MTV212M32
44 Pin
PLCC
39
DA8/HALFH
38
DA9/HALFV
37
HBLANK/P4.1
36
VBLANK/P4.0
35
DA7/HCLAMP
34
DA6/P5.6
33
P2.7/DA13
32
P2.6/DA12
31
P2.5/DA11
30
P2.4/DA10
29
HSCL/P3.0/Rxd
Revision 1.1 - 3 - 2000/07/04
Page 4
MYSON
PWM DAC output (5V open drain) / General purpose I/O (5V open drain).
PWM DAC output (5V open drain) / General purpose I/O (5V open drain).
PWM DAC output (5V open drain) / General purpose I/O (5V open drain).
PWM DAC output (CMOS) /
PWM DAC output (5V open drain) /
PWM DAC output (5V open drain) /
General purpose I/O (CMOS output or 8051 standard) / ADC Input.
I/O
Ground.
-
Oscillator output.
O
Oscillator input.
I
Master IIC data (5V open drain) / General purpose I/O (8051 standard) / T0
I/O
Master IIC clock (5V open drain) / General purpose I/O (8051 standard) / T1
I/O
Self-test video output (CMOS) / General purpose Output (CMOS).
O
General purpose I/O (CMOS output or 8051 standard) / ADC Input.
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose Input / INT0.
I
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard).
I/O
General purpose I/O (CMOS output or 8051 standard) / ADC Input.
I/O
General purpose I/O (CMOS output or 8051 standard) / ADC Input.
I/O
Slave IIC data (5V open drain) / General purpose I/O (8051 standard) / Txd
I/O
Slave IIC clock (5V open drain) / General purpose I/O (8051 standard) / Rxd
I/O
General purpose I/O (CMOS output or 8051 standard) / PWM DAC output (CMOS).
I/O
General purpose I/O (CMOS output or 8051 standard) / PWM DAC output (CMOS).
I/O
General purpose I/O (CMOS output or 8051 standard) / PWM DAC output (CMOS).
I/O
General purpose I/O (CMOS output or 8051 standard) / PWM DAC output (CMOS).
I/O
PWM DAC output (CMOS) / General purpose I/O (CMOS output or open drain I/O).
I/O
O
Vertical blank (CMOS) / General purpose Output (CMOS).
O
Horizontal blank (CMOS) / General purpose Output (CMOS).
O
O
O
PWM DAC output (CMOS) / General purpose I/O (CMOS output or open drain I/O).
I/O
PWM DAC output (CMOS) / General purpose I/O (CMOS output or open drain I/O).
I/O
PWM DAC output (CMOS) / General purpose I/O (CMOS output or open drain I/O).
I/O
Horizontal SYNC or Composite SYNC Input.
I
Vertical SYNC input.
I
Hsync clamp pulse output (CMOS).
(Rev 1.1)
vsync half freq. output (5V open drain).
hsync half freq. output (5V open drain).
Revision 1.1 - 4 - 2000/07/04
Page 5
MYSON
MTV212M32
TECHNOLOGY
(Rev 1.1)
PIN CONFIGURATION
A “CMOS output pin” means it can sink and drive at least 4mA current. It’s not recommended to use such pin
as input fuction.
A “5V open drain pin” means it can sink at least 4mA current but only drive 10~20uA to VDD. It can be used
as input or output function and need an external pull up resistor.
A “8051 standard pin” is a pseudo open drain pin. It can sink at least 4mA current when output low level, and
drive at least 4mA current for 160nS when output transit from low to high, then keep drive 1 00uA to maintain
the pin at high level. It can be used as input or output function. It need an external pull up resistor when drive
heavy load device.
Output
Data
2 OSC
period
delay
4mA10uA
4mA
Input
Data
120uA
8051 Stand ard Pin
Pin
Input
Data
Output
Data
Output
Data
4mA
CMOS Outp u t Pin
Pin
4mA
No Current
5V Open Drain Pin
Pin
4mA
Revision 1.1 - 5 - 2000/07/04
Page 6
MYSON
FUNCTIONAL DESCRIPTIONS
2. Memory Allo catio n
2.4 Auxiliary RAM (AUXRAM)
divided into two banks, selected by XBANK register. Program can initialize
MTV212M32
TECHNOLOGY
1. 8051 CPU Core
(Rev 1.1)
MTV212M32 includes all 8051 functions with the following exceptions:
1.1 The external RAM access is restricted to XFRs/AUXRAM within the MTV212M32.
1.2 Port0, port3.3, port3.6 and port3.7 are not general-purpose I/O ports. They are dedicated to monitor
special application.
1.3 INT1 input pin is not provided, it is connected to special interrupt sources.
1.4 Port2 are shared with special function pins.
In addition, there are 2 timers, 5 interrupt sources and serial interface compatible with the standard 8051.
Note: All registers listed in this document reside in external RAM area (XFR). For internal RAM memory map
please refer to 8051 spec.
2.1 Internal Special Function Registers (SFR)
The SFR is a group of registers that are the same as standard 8051.
2.2 Internal RAM
There are total 256 bytes internal RAM in MTV212M32, same as standard 8052.
2.3 External Special Function Registers (XFR)
The XFR is a group of registers allocated in the 8051 external RAM area 00h - 7Fh. Most of the registers are
used for monitor control or PWM DAC. Program can initialize Ri value and use "MOVX" instruction to access
these registers.
There are total 256 bytes auxiliary RAM allocated in the 8051 external RAM area 80h - FFh. The AUXRAM is
instruction to access the AUXRAM.
FFh
Internal RAM
addressing only
80h
7Fh
Internal RAM
Accessible by
indirect
(Using
MOV A,@Ri
instruction)
SFR
Accessible by
direct addressing
FFh
80h
7Fh
Ri value and use "MOVX"
AUXRAM
Accessible by
indirect external
RAM addressing
(XBANK=0)(Using
MOVX A,@Ri
instruction)
Accessible by
indirect external
RAM addressing
(XBANK=1)(Using
MOVX A,@Ri
XFR
AUXRAM
instruction)
Accessible by
direct and indirect
addressing
00h
Accessible by
indirect external
RAM addressing
(Using
MOVX A,@Ri
instruction
00h
Revision 1.1 - 6 - 2000/07/04
Page 7
MYSON
PWMF
MTV212M32
TECHNOLOGY
3. Chip Configu ratio n
The Chip Configuration registers define the chip pins function, as well as the functional blocks' connection,
configuration and frequency.
Reg nameaddrbit7bit6bit5bit4bit3bit2bit1bit0
PADMOD
PADMOD
PADMOD
PADMOD
PADMOD
PADMOD
OPTION
OPTION
XBANK
PADMOD (w) : Pad mode control registers. (All are "0" in Chip Reset)
DA13E = 1→ pin “P2.7/DA13” is DA13.
DA12E = 1→ pin “P2.6/DA12” is DA12.
DA11E = 1→ pin “P2.5/DA11” is DA11.
DA10E = 1→ pin “P2.4/DA10” is DA10.
AD3E = 1→ pin “P2.3/AD3” is AD3.
AD2E = 1→ pin “P2.2/AD2” is AD2.
AD1E = 1→ pin “P2.1/AD1” is AD1.
AD0E = 1→ pin “P2.0/AD0” is AD0.
P56E= 1→ pin “DA6/P5.6” is P5.6.
P55E= 1→ pin “DA5/P5.5” is P5.5.
P54E= 1→ pin “DA4/P5.4” is P5.4.
P53E= 1→ pin “DA3/P5.3” is P5.3.
P52E= 1→ pin “DA2/P5.2” is P5.2.
P51E= 1→ pin “DA1/P5.1” is P5.1.
P50E= 1→ pin “DA0/P5.0” is P5.0.
HIICE = 1→pin “HSCL/P3.0/Rxd” is HSCL; pin “HSDA/P3.1/Txd” is HSDA.
IIICE= 1→ pin “ISDA/P3.4/T0” is ISDA; pin “ISCL/P3.5/T1” is ISCL.
HLFVE = 1→ pin “DA9/HALFV” is VSYNC half frequency output.
= 1→ Select AUXRAM bank 1.
= 2→ Select AUXRAM bank 0.
= 3→ Select AUXRAM bank 1.
= 4→ Select AUXRAM bank 0.
= 5→ Select AUXRAM bank 1.
(Rev 1.1)
4. Extra I/O
The extra I/O is a group of I/O pins located in XFR area. Port4 is output mode onl y. Port5 can be used as
both output and input, because Port5's pin is open drain type, user must write Port5's corresponding bit to
"1" in input mode.
Reg nameaddrbit7bit6bit5bit4bit3bit2bit1bit0
PORT4
PORT5
PORT4 (w) :Port 4 data output value.
PORT5 (r/w) : Port 5 data input/output value.
5. PWM DAC
PWM clk is 47KHz or 94KHz, selected by PWMF. And the total duty cycle step of these DAC outputs is 253
or 256, selected by DIV253. If DIV253=1, writing FDH/FEH/FFH to 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 DAC register generates stable low output.
38h (w)P42P41P40
39h (r/w)P56P55P54P53P52P51P50
Revision 1.1 - 9 - 2000/07/04
Page 10
MYSON
Pulse width of PWM DAC 0
Pulse width of PWM DAC 1
Pulse width of PWM DAC 2
Pulse width of PWM DAC 3
Pulse width of PWM DAC 4
Pulse width of PWM DAC 5
Pulse width of PWM DAC 6
Pulse width of PWM DAC 7
Pulse width of PWM DAC 8
Pulse width of PWM DAC 9
Pulse width of PWM DAC 10
Pulse width of PWM DAC 11
Pulse width of PWM DAC 12
Pulse width of PWM DAC 13
* All of PWM DAC converters are centered with value 80h after power on.
inputs presence check, frequency counting, polarity detection and control, as well as the protection of
function block treat any pulse shorter than one OSC period as noise.
Hself
Hpol
CVpre
Vbpl
VSYNC
Vpre
Vfreq
Vpol
VBLANK
Vself
XOR
HSYNC
CVSYNC
Hpre
Hfreq
Hbpl
XOR
HBLANK
MTV212M32
TECHNOLOGY
Reg nameaddrbit7bit6bit5bit4bit3bit2bit1bit0
DA0
DA1
DA2
DA3
DA4
DA5
DA6
DA7
DA8
DA9
DA10
DA11
DA12
DA13
DA0-13 (r/w) : The output pulse width control for DA0-13.
The H/V SYNC processing block performs the functions of composite signal separation /insertion, SYNC
VBLANK output while VSYNC speed up in high DDC communication clock rate. The present and frequency
Digital Filter
Digital Filter
Present
Check
Polarity Check &
Freq. Count
XOR
Present
Check
Polarity Check &
Sync Seperator
Present Check &
Freq. Count
Composite
Pulse Insert
XOR
H/V SYNC Processor Block Diagram
Revision 1.1 - 10 - 2000/07/04
Page 11
MYSON
6.2 H/V Frequency Counter
VSYNC/CVSYNC is present or continuously updated when VSYNC/CVS YNC is non-present. The 12 bits
CVpre flag interrupt may be disabled when S/W disable the composite function.
MTV212M32
TECHNOLOGY
6.1 Composite SYNC separation/insertion
The MTV212M32 continuously monitors the input HSYNC, if the vertical SYNC pulse can be extracted from
the input, a CVpre flag is set and user can select the extracted "CVSYNC" for the source of polarity check,
frequency count, and VBLANK output. The CVSYNC will have 8us delay compared to the original signal.
The MTV212M32 can also insert pulse to HBLANK output during composite VSYNC’s active time. The insert
pulse’s width is 1/8 HSYNC period and the insertion frequency can adapt to original HSYNC. The HBLANK
pulse can be disable or enable by setting “NoHins” control bit.
MTV212M32 can discriminate HSYNC/VSYNC frequency and saves the information in XFRs. The 14 bits
Hcounter counts the time of 64xHSYNC period, then load the result into the HCNTH/HCNTL latch. The
output value will be [(128000000/H-Freq) - 1], updated once per VSYNC/CVSYNC period when
Vcounter counts the time between two VSYNC pulses, then load the result into the VCNTH/VCNTL latch.
The output value will be (62500/V-Freq), updated every VSYNC/CVSYNC perio d. An extra overflow bit
indicates the condition of H/V counter overflow. The VFchg/HFchg interrupt is set when VCNT/HCNT value
changes or overflow. Table 4.2.1 and table 4.2.2 shows the HCNT/VCNT value under the operations of
12MHz.
6.3 H/V Present Check
The Hpresent function checks the input HSYNC pulse, Hpre flag is set when HSYNC is over 10KHz or
cleared when HSYNC is under 10Hz. The Vpresent function checks the input VSYNC pulse, the Vpre flag is
set when VSYNC is over 40Hz or cleared when VSYNC is under 10Hz. The HPRchg interrupt is set when
the Hpre value changes. The VPRchg interrupt is set when the Vpre/CVpre value change. However, the
6.4 H/V Polarity Detect
The polarity functions detect the input HSYNC/VSYNC high and low pulse duty cycle. If the high pulse
duration is longer than that of low pulse, the negative polarity is asserted; otherwise, positi ve polarity is
6.5 Output HBLANK/VBLANK Control and Polarity Adjust
MTV212M32
TECHNOLOGY
asserted. The HPLchg interrupt is set when the Hpol value changes. The VPLchg interrupt is set when the
Vpol value changes.
The HBLANK is the mux output of HSYNC, composite Hpulse and self-test horizontal pattern. The VBLANK
is the mux output of VSYNC, CVSYNC and 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. The
HBLANK/VBLANK shares the output pin with P4.1/ P4.0.
6.6 Self Test Pattern Generator
This generator can generate 4 display patterns for testing purpose, which are positive cross-hatch, negative
cross-hatch, full white, and full black (showed as following figure). The HBLANK output frequency of the
pattern can be chosen to 95.2KHz, 63.5KHz, 47.6KHz and 31.75KHz. The VBLANK output frequency of the
pattern is 72Hz or 60Hz. It is originally designed to support monitor manufacturer to do burn-in test, or offer
end-user a reference to check the monitor. The generator's output STOUT shares the output pin with P4.2.
Display Region
(Rev 1.1)
Positive cross-hatchNegative cross-hatch
Full whiteFull black
Revision 1.1 - 12 - 2000/07/04
Page 13
MYSON
* 8 x 8 blocks of cross hatch pattern in display region.
width and polarity is S/W controllable.
flag is set each time when MTV212M32 detects a VSYNC pulse. The flag is cleared by S/W writing a "0".
timeH dotstimeH dotstimeH dotstimeH dots
Hor. Total time (A)15.75us128021.0us102431.5us64010.5us1600
Hor. Active time (D)12.05us979.316.07us783.224.05us488.68.03us1224
Hor. F. P. (E)0.2us16.250.28us120.45us90.14us21
SYNC pulse width (B)1.5us1222us903us611.0us152
Hor. B. P. (C)2us162.542.67us1104us81.271.33us203
(Rev 1.1)
timeV linestimeV linestimeV linestimeV lines
Vert. Total time (O)16.66ms102416.66ms76816.66ms48013.89ms1200
Vert. Active time (R)15.65ms96215.65ms721.515.65ms45113.03ms1126
Vert. F. P. (S)0.063ms3.870.063ms2.90.063ms1.820.052ms4.5
SYNC pulse width (P) 0.063ms3.870.063ms2.90.063ms1.820.052ms4.5
Vert. B. P. (Q)0.882ms54.20.882ms40.50.882ms25.40.756ms65
6.7 HSYNC Clamp Pulse Output
The HCLAMP output is active by setting “HCLPE” control bit. The HCLAMP’s leading edge position, pulse
6.8 VSYNC Interrupt
The MTV212M32 check the VSYNC input pulse and generate an interrupt at its leadi ng edge. The VSYNC
C1, C0 = 1,1→ Select CVSYNC as the polarity, freq and VBLANK source.
= 1,0→ Select VSYNC as the polarity, freq and VBLANK source.
= 0,0→ Disable composite function.
= 0,1→ H/W auto switch to CVSYNC when CVpre=1 and VSpre=0.
NoHins = 1 → HBLANK has no insert pulse in composite mode.
DbufI interrupt is automatically cleared when Software writes a new data byte to DBUF. The
access EEPROM directly.
Under such condition, the HSDA and HSCL are directly bypassed to ISDA and ISCL pins . The other way to
RCABUF/RCBBUF register when a data byte is received. The first byte loaded is word address (slave
the RCABUF/RCBBUF is loaded. If S/W can't read out the RCABUF/RCBBUF in time, the next byte in shift
every time when shift register reads out the data from TX ABUF/TXBBUF.
SlvBMI is cleared by writing "0" to corresponding bit in INTFLG register.
The TXAI/TXBI is cleared by writing TXABUF/TXBBUF. If the control
The master mode IIC block can be connected to the ISDA /ISCL pins or the HSDA/HSCL pins, select by
Msel control bit. Its speed can be selected to 50KHz-400KHz by S/W setting the MIICF1/MIICF0 control bit.
and the display information share the common EEPROM, precaution m ust be taken to avoid bus conflicting
while Msel=0. In DDC1 mode or IICpass=0, the ISCL/ISDA is controlled by MTV212M32 only. In DDC2
MTV212M32
TECHNOLOGY
7. DDC & IIC Int er face
7.1 DDC1 Mode
The MTV212M32 enters DDC1 mode after Reset. In this mode, VSYNC is used as data clock. The HSCL pin
should remain at high. The data output to the HSDA pin is taken from a shift register in MTV212M32. The
shift register fetch data byte from the DDC1 data buffer (DBUF) then send it in 9 bits packet formats which
includes a null bit (=1) as packet separator. The DBUF set the DbufI interrupt flag when the shift register
read out the data byte from DBUF. Software needs to write EDID data to DBUF as soon as the DbufI is set.
The
interrupt can be mask or enable by EDbufI control bit.
7.2 DDC2B Mode
The MTV212M32 switches to DDC2B mode when it detects a high to low transition on the HSCL pin. Once
MTV212M32 enters DDC2B mode, S/W can set IICpass control bit to allow HOST
perform DDC2 function is to clear IICpass and config the Slave A IIC block to act as EEPROM behavior. The
Slave A block's slave address can be chosen by S/W as 5-bits, 6-bits or 7-bits. For example, if S/W choose
5-bits slave address as 10100b, the slave IIC block A will respond to slave address 10100xx b and save the 2
LSB "xx" in XFR. This feature enables MTV212M32 to meet PC99 requirement.
The MTV212M32 will return to DDC1 mode if HSCL is kept high for 128 VSYNC clock period. However, it
will lock in DDC2B mode if a valid IIC address (1010xxxb) has been detected on HSCL/HSDA bus. The
DDC2 flag reflects the current DDC status, S/W may clear it by writing a "0" to it.
(Rev 1.1)
DbufI
7.3 Slave Mode IIC function Block
The slave mode IIC block is connected to HSDA and HSCL pins. This block can receive/transmit data using
IIC protocol. There are 2 slave addresses MTV212M32 can respond to. S/W may write the
SLVAADR/SLVBADR register to determine the slave addresses. The SlaveA address can be configured to
5-bits, 6-bits or 7-bits by S/W setting the SlvAbs1 and SlvAbs0 control bits.
In receive mode, the block first detects IIC slave address match condition then issues a SlvAMI/SlvBMI
interrupt. If the matched address is slave A, MTV212M32 will save the matched address's 2 LSB bits to
SlvAlsb1 and SlvAlsb0 register. The data from HSDA is shifted into shift register then written to
address is dropped). This block also generates a RCAI/RCBI (receive buff er full interrupt) every time when
register will not be written to RCABUF/RCBBUF and the slave block return NACK to the master. This feature
guarantees the data integrity of communication. The WadrA/WadrB flag can tell S/W that if the data in
RCABUF/RCBBUF is a word address.
In transmit mode, the block first detects IIC slave address match condition then issues a SlvAMI/SlvBMI
interrupt. In the mean time, the SlvAlsb1/SlvAlsb0 is also updated if the matched address is sla ve A, and the
data pre-stored in the TXABUF/TXBBUF is loaded into shift register, result in TXABUF/T XBBUF empty and
generates a TXAI/TXBI (transmit buffer empty interrupt). S/W should write the TXABUF/TXBBUF a new byte
for next transfer before shift register empty. Fail to do this will cause data corrupt. The TXAI/TXBI occurs
The SlvAMI/
cleared by reading RCABUF/RCBBUF.
bit ENSCL is set, the block will hold HSCL low until the RCAI/RCBI/TXAI/TXBI is cleared.
*Please see the attachments about "Slave IIC Block Timing".
7.4 Master Mode IIC Function Block
The RCAI/RCBI is
The software program can access the external IIC device through this interface. Since th e ED ID/VDIF data
Revision 1.1 - 16 - 2000/07/04
Page 17
MYSON
IICpass flag is set, the host may access the EEPROM directl y. Soft ware can test the HSCL
condition by reading the
HSCL's rising edge. S/W can launch the master IIC transmit/receive by clearing the P bit. Once P=0,
1. Write MBUF the Slave Address.
1. Write MBUF the Slave Address.
6. After the MTV212M32 receives a new byte, the
WadrB
WadrA
SLVAADR
SLVBADR
In master receive mode, NACK is returned by MTV212M32.
In master receive mode, ACK is returned by MTV212M32.
MTV212M32
TECHNOLOGY
mode and
MTV212M32 will hold HSCL low to isolate the host's access to EEPROM. A summary of master IIC access
is illustrated as follows.
7.4.1. To write IIC Device
2. Set S bit to Start.
3. After the MTV212M32 transmit this byte, a MbufI interrupt will be triggered.
4. Program can write MBUF to transfer next byte or set P bit to stop.
* Please see the attachments about "Master IIC Transmit Timing".
7.4.2. To read IIC Device
2. Set S bit to Start.
3. After the MTV212M32 transmit this byte, a MbufI interrupt will be triggered.
4. Set or reset the MAckO flag according to the IIC protocol.
5. Read out MBUF the useless byte to continue the data transfer.
7. Read MBUF also trigger the next receive operation, but set P bit before read can terminate the operation.
Hbusy flag, which is set in case of HSCL=0, and keeps high for 100uS after the
MbufI interrupt is triggered again.
(Rev 1.1)
* Please see the attachments about "Master IIC Receive Timing".
Reg nameaddrbit7bit6bit5bit4bit3bit2bit1bit0
IICCTR
IICSTUS
IICSTUS
INTFLG
INTFLG
INTEN
MBUF
RCABUF
TXABUF
RCBBUF
TXBBUF
DBUF
IICCTR (r/w) : IIC interface contro l register.
DDC2 = 1→ MTV212M32 is in DDC2 mode, write "0" can clear it.
MAckO = 1→
S, P= ↑, 0 → Start condition when Master IIC is not during transf er.
* A write/read MBUF operation can be recognized only after 10us of the MbufI flag's rising edge.
06h (r)Slave A IIC receive buffer
06h (w)Slave A IIC transmit buffer
07h (w)ENSlvASlave A IIC address
08h (r)Slave B IIC receive buffer
08h (w)Slave B IIC transmit buffer
09h (w)ENSlvBSlave B IIC address
0Ah (w)DDC1 transmit data buffer
= 0→ MTV212M32 is in DDC1 mode.
= 0→
= X, ↑ → Stop condition when Master IIC is not during transfer.
= 1, X → Will resume transfer after a read/write MBUF operat ion.
= X, 0 → Force HSCL low and occupy the master IIC bus.
SlvRWB SAckInSLVSSlvAlsb1 SlvAlsb0
IICSTUS (r) : IIC interface status register.
WadrB = 1→ The data in RCBBUF is word address.
WadrA = 1→ The data in RCABUF is word address.
Revision 1.1 - 17 - 2000/07/04
Page 18
MYSON
enable bit is set, the 8051 INT1 source will be driven by a zero level. Software MUST clear
MTV212M32
TECHNOLOGY
SlvRWB = 1→ Current transfer is slave transmit
= 0→ Current transfer is slave receive
SAckIn = 1→ The external IIC host resp ond NACK.
SLVS = 1→ The slave block has detected a START, cleared when STOP detected.
SlvAlsb1,SlvAlsb0 : The 2 LSB which host send to Slave A block.
MAckIn = 1 → Master IIC bus error, no ACK received from the slave IIC device.
= 0→ ACK received from the slave IIC device.
Hifreq = 1→ MTV212M32 has detected a higher than 200Hz clock on the VSYNC pin.
Hbusy = 1→ Host drives the HSCL pin to low.
INTFLG (w) :Interrupt flag. A interrupt event will set its individual flag, and, if the corresponding interrupt
this register while serve the interrupt routine.
SlvBMI = 1→ No action.
= 0→ Clear SlvBMI flag.
SlvAMI = 1→ No action.
= 0→ Clear SlvAMI flag.
MbufI= 1→ No action.
= 0→ Clear Master IIC bus interrupt flag (MbufI).
INTFLG (r) : Interrupt flag.
TXBI= 1→ Indicates the TXBBUF need a new data byte, clear by writing TXBBUF.
RCBI= 1→ Indicates the RCBBUF has received a new data byte, clear by reading RCBBUF.
SlvBMI = 1→ Indicates the slave IIC address B match condition.
TXAI= 1→ Indicates the TXABUF need a new data byte, clear by writing TXABUF.
RCAI= 1→ Indicates the RCABUF has received a new data byte, clear by reading RCABUF.
SlvAMI = 1→ Indicates the slave IIC address A match condition.
DbufI= 1→ Indicates the DDC1 d ata buffer need a new data byte, clear by writing DBUF.
MbufI = 1→ Indicates a byte is sent/received to/from the master IIC bus.
(Rev 1.1)
INTEN (w) : Interrupt enable.
ETXBI = 1→ Enable TXBBUF interrupt.
ERCBI = 1→ Enable RCBBUF interrupt.
ESlvBMI = 1→ Enable slave address B match interrupt.
ETXAI = 1→ Enable TXABUF interrupt.
ERCAI = 1→ Enable RCABUF interrupt.
ESlvAMI = 1→ Enable slave address A match interrupt.
EDbufI = 1→ Enable DDC1 data buffer interrupt.
EMbufI = 1→ Enable Master IIC bus interrupt.
Mbuf (w) : Master IIC data shift register, after START and before STOP condition, write this register will
resume MTV212M32's transmission to the IIC bus.
Mbuf (r) : Master IIC data shift register, after START and before STOP condition, rea d th is register will
resume MTV212M32's receiving from the IIC bus.
RCABUF (r) :Slave IIC block A receive data buffer.
TXABUF (w) : Slave IIC block A transmit data buffer.
SLVAADR (w) :Slave IIC block A's enable and address.
ENslvA = 1→ Enable slave IIC block A.
= 0→ Disable slave IIC block A.
Revision 1.1 - 18 - 2000/07/04
Page 19
MYSON
When the voltage level of power supply is below 4.0V(+/-0.2V) for a specific time, the LVR will generate a
chip reset signal. After the power supply is above 4.0V(+/-0.2V), LVR maintain in reset state f or 144
WDT(2:0). The timer
9. A/D con v ert er
three 6-bit A/D converters, S/W can select the current convert channel
WCLR
WDT2
WDT1
WDT0
Watchdog Timer control register.
MTV212M32
TECHNOLOGY
bit6-0 : Slave IIC address A to which the slave block should respond.
RCBBUF (r) :Slave IIC block B receive data buffer.
TXBBUF (w) : Slave IIC block B transmit data buffer.
SLVBADR (w) :Slave IIC block B's enable and address.
ENslvB = 1→ Enable slave IIC block B.
= 0→ Disable slave IIC block B.
bit6-0 : Slave IIC address B to which the slave block should respond.
8. Low Pow er Reset (LVR) & Watchdog Tim er
cycle to guarantee the chip exit reset condition with a stable X'tal oscillation.
The WatchDog Timer automatically generates a device reset when it is overflow. The interval of overflow is
0.25 sec x N, where N is a number from 1 to 8, and can be programmed via register
function is disabled after power on reset, user can activate this function by setting WEN, and clear the timer
by set WCLR.
(Rev 1.1)
Xtal
The MTV212M32 is equipped with
by setting the SADC1/SADC0 bit. The refresh rate for the ADC is OSC freq./12288. The ADC compare the
input pin voltage with internal VDD*N/64 voltage (where N = 0 - 63). The ADC output va lue is N when pin
voltage is greater than VDD*N/64 and smaller than VDD*(N+1)/64.
= 1→ overflow interval = 1 x 0.25 sec.
= 2→ overflow interval = 2 x 0.25 sec.
= 3→ overflow interval = 3 x 0.25 sec.
= 4→ overflow interval = 4 x 0.25 sec.
= 5→ overflow interval = 5 x 0.25 sec.
= 6→ overflow interval = 6 x 0.25 sec.
= 7→ overflow interval = 7 x 0.25 sec.
Revision 1.1 - 19 - 2000/07/04
Page 20
MYSON
mode, or by IIC Host in serial mode
5V power supply for Program/Erase/Verify.
Whole Flash erase (Blank): 4mS
Whole 32K byte Flash programming within 3 Sec
request (by key or IIC), S/W can accept the request by the steps below:
Write ISP slave
When ISP is enable, the MTV212M32 will disable Watchdog reset and switch the Flash interface to ISP host
10.1 ISP Command Write
MTV212M32
TECHNOLOGY
ADC (r) : ADC convert result.
10. In System Programm i n g fu n c ti o n (ISP)
The Flash memory can be programmed by a specific WRITER in parallel
while the system is working. The ISP’s feature is outlined as below:
1. Single
2. Block Erase: 128 Byte at 4mS
3.
4. Byte programming Cycle time: 60uS
5. Read access time: 40ns
6. Only two pin IIC bus(shared with DDC2) is needed for ISP in user/factory mode
7. IIC Bus clock rate up to 140KHz
8.
9. CRC check provide 100% coverage for all single/double bit errors
After power on/Reset, The MTV212M32 is running the original ROM code. Once the S/W detect a ISP
1. Clear watchdog to prevent reset during ISP period
2. Disable all interrupt to prevent CPU wake-up
3.
4. Write 93h to ISP enable register (ISPEN) to enable ISP
5. Enter 8051 idle mode
’s IIC address to ISPSLV for communication
(Rev 1.1)
in 15-22.5uS. So S/W MUST enter idle mode immediately after enable ISP. In the 8051 idle mode, PWM
DACs and I/O pins keep running at its old status. There are 4 types of IIC bus transfer protocol in ISP mode.
The 2nd byte of “Command Write” can define the operating mode of MTV212M32 in its “Data write” stage,
Revision 1.1 - 20 - 2000/07/04
Page 21
MYSON
byte reflects the current Flash
byte, the MTV212M32 will
Command Write
address will increase every time when ISP slave acknowledges the data b yte. The Blank/Erase command
need one data byte (content is
ack to the following data byte. In the meantime, the low address won
acked data byte. A Data Write may consist of 1,2 or more bytes.
s data byte
10.5 Cyclic Redundancy Check (CRC)
Command Write
MTV212M32
TECHNOLOGY
clear CRC register, or reset MTV212M32. The 3rd byte of Command Write defines the page address (A14-7)
of Flash memory. A Command Write may consist of 1,2 or 3 bytes.
10.2 ISP Command Read
The 2nd byte echoes the current command in ISP slave. The 3rd and 4
address. The 5th and 6th byte reports the CRC result. A Command Read may consist of 2,3,4,5 or 6 bytes.
10.3 ISP Data Write
The 2nd byte defines the Flash’s low address (A6-0). After receiving the 3
execute a Program/Erase/Blank command depends on the preceding “
slave won’t accept any command/data and returns non-ack to any IIC bus activity. The Program command
may have 1-128 data byte. The program cycle time is 60us. If the ISP slave can’t complete the program
cycle in time, it will return nonincrease and the CRC won’t count the non-
“don’t care”). The executing time is 4mS. During the 4mS period, the ISP
|-----Min. 4mS----|
|Min. 60uS|
th
rd
(Rev 1.1)
”. The Flash’s low
’t
10.4 ISP Data Read
The 1st and 2nd byte are the same as “Data write” to define the Flash’s low address. Between 2nd and 3rd byte,
the ISP host may issue Stop-Start or only Re-Start. From the 4th byte, the ISP slave send Flash’
to ISP Host. The low address auto increase every time when data byte transferred.
To shorten the verify time, the ISP slave provide a simple way to check if data error occurs duri ng the
program data transfer. After the ISP Host send a lot of data byte to ISP slave, Host can use Command Read
to check CRC register’s result instead of reading every byte in Flash. The CRC register counts every data
byte which ISP slave acknowledges during “Data Write” period. However, the low address byte and the data
byte of Erase/Blank are not counted. The Clear CRC command will write all “1” to the 16-bit CRC register.
For CRC generation, the 16-bit CRC register is seeded with all “1” pattern (by device reset or Clear CRC
command). The data byte shifted into the CRC register is Msb first. The real implementation is described as
follows:
10.6 Reset Device
After the Flash been program completed and verified OK, the ISP Host can use “
Reset_CPU command to wake up MTV212M32.
” with
Reg nameaddrbit7bit6bit5bit4bit3bit2bit1bit0
ISPSLV
Revision 1.1 - 21 - 2000/07/04
0bh (w)ISP Slave address
Page 22
MYSON
Write 93h to enable ISP Mode
Writer Mode: RESET=1 & DA9=0 & DA8=1
WadrB
WadrA
SLVAADR
SLVBADR
Write 93h to enable ISP Mode
WCLR
WDT2
WDT1
WDT0
Pulse width of PWM DAC 0
Pulse width of PWM DAC 1
Pulse width of PWM DAC 2
Pulse width of PWM DAC 3
Pulse width of PWM DAC 4
Pulse width of PWM DAC 5
Pulse width of PWM DAC 6
Pulse width of PWM DAC 7
Pulse width of PWM DAC 8
Pulse width of PWM DAC 9
Pulse width of PWM DAC 10
Pulse width of PWM DAC 11
Pulse width of PWM DAC 12
Pulse width of PWM DAC 13
PWMF
MTV212M32
(Rev 1.1)
ISPEN
TECHNOLOGY
0ch (w)
Test Mode Conditi o n
In normal application, users should avoid the MTV212M32 entering its test mode or writer mode, outlined as
follow, Adding pull-up resistor to DA8 and DA9 pins is recommended.