MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 1 2005/6 VER 1.3
1. General Description
This EPROM-Based 8-bit micro-controller
uses a fully static CMOS design
technology combines higher speed and
smaller size with the low power and high
noise immunity of CMOS.
On chip memory system includes 2.0 K
bytes of ROM, and 80 bytes of static RAM.
2. Features
The followings are some of the features on
the hardware and software :
u Fully CMOS static design
u 8-bit data bus
u On chip ROM size : 2 K words
u Internal RAM size : 80 bytes
(72 general purpose, 8 special registers)
u 36 single word instructions
u 14-bit instructions
u 2-level stacks
u Operating voltage : 2.3 V ~ 6.0 V
u Operating frequency : 0 ~ 20 MHz
u The most fast execution time is 200 ns
under 20 MHz in all single cycle
instructions except the branch
instruction.
u Addressing modes include direct,
indirect and relative addressing
modes
u Power-on Reset
u Power Edge-detector Reset
u Sleep mode for power saving
u 4 oscillator start-up time :
150 µs, 20 ms, 40 ms, 80 ms
u 8-bit real time clock/counter(RTCC)
with 8-bit programmable prescaler
u 4 types of oscillator can be selected by
code options :
RCLow cost RC oscillator
LFXTLow frequency crystal oscillator
XTALStandard crystal oscillator
HFXTHigh frequency crystal
oscillator
u On-chip RC oscillator based
Watchdog Timer(WDT) can be operated
freely
u 20 I/O pins with their own independent
direction control
3. Applications
The application areas of this MDT10P20
range from appliance motor control and
high speed automotive to low power
remote transmitters/receivers, pointing
devices, and telecommunications
processors, such as Remote controller,
small instruments, chargers, toy,
automobile and PC peripheral … etc.
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 2 2005/6 VER 1.3
4. Pin Assignment
DIP / SOP / SKINNY
RTCC 1 28 /MCLR
Vdd 2 27 OSC1
N/C 3 26 OSC2
Vss 4 25 PC7
N/C 5 24 PC6
PA0 6 23 PC5
PA1 7 22 PC4
PA2 8 21 PC3
PA3 9 20 PC2
PB0 10 19 PC1
PB1 11 18 PC0
PB2 12 17 PB7
PB3 13 16 PB6
PB4 14 15 PB5
SSOP
VSS 1 28 /MCLR
RTCC 2 27 OSC1
VDD 3 26 OSC2
VDD 4 25 PC7
PA0 5 24 PC6
PA1 6 23 PC5
PA2 7 22 PC4
PA3 8 21 PC3
PB0 9 20 PC2
PB1 10 19 PC1
PB2 11 18 PC0
PB3 12 17 PB7
PB4 13 16 PB6
VSS 14 15 PB5
5. Pin Function Description
Pin Name I/O Function Description
PA0~PA3 I/O Port A, TTL input level
PB0~PB7 I/O Port B, TTL input level
PC0~PC7 I/O Port C, TTL input level
RTCC I Real Time Clock/Counter, Schmitt Trigger input levels
/MCLR I Master Clear, Schmitt Trigger input levels
OSC1 I Oscillator Input
OSC2 O Oscillator Output
Vdd Power supply
Vss Ground
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 2 2005/6 VER 1.3
6. Memory Map
(A) Register Map
Address Description
00 Indirect Addressing Register
01 RTCC
02 PC
03 STATUS
04 MSR
05 Port A
06 Port B
07 Port C
08~0F Internal RAM, General Purpose Register
10~1F Internal Memory Select Register
30~3F Internal Memory Select Register
50~5F Internal Memory Select Register
70~7F Internal Memory Select Register
(1) IAR ( Indirect Address Register) : R0
(2) RTCC (Real Time Counter/Counter Register) : R1
(3) PC (Program Counter) : R2
Write PC, CALL --- always 0
LJUMP, JUMP, LCALL --- from instruction word
RTWI, RET --- from STACK
A10 A9 A8 A7~A0
Write PC, JUMP, CALL --- from STATUS b6 b5
LJUMP, LCALL --- from instruction word
RTWI, RET --- from STACK
Write PC --- from ALU
LJUMP, JUMP, LCALL, CALL --- from instruction word
RTWI, RET --- from STACK
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 3 2005/6 VER 1.3
(4) STATUS (Status register) : R3
Bit Symbol Function
0
1
2
3
4
65
7
C
HC
Z
PF
TF
page
——
Carry bit
Half Carry bit
Zero bit
Power loss Flag bit
Time overflow Flag bit
Page select bit :
00 : 000H --- 1FFH
01 : 200H --- 3FFH
10 : 400H --- 5FFH
11 : 600H --- 7FFH
General purpose bit
(5) MSR (Memory Select Register) : R4
Memory Select Register :
00 : 10~1F
01 : 30~3F
10 : 50~5F
11 : 70~7F
b7 b6 b5 b4 b3 b2 b1 b0
Read only “1”
Indirect Addressing Mode
(6) PORT A : R5
PA3~PA0, I/O Register
(7) PORT B : R6
PB7~PB0, I/O Register
(8) PORT C : R7
PC7~PC0, I/O Register
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 4 2005/6 VER 1.3
(9) TMR (Time Mode Register)
Bit Symbol Function
Prescaler Value RTCC rate WDT rate
20
PS20
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
1 : 2
1 : 4
1 : 8
1 : 16
1 : 32
1 : 64
1 : 128
1 : 256
1 : 1
1 : 2
1 : 4
1 : 8
1 : 16
1 : 32
1 : 64
1 : 128
3
PSC Prescaler assignment bit :
0 RTCC
1 Watchdog Timer
4
TCE RTCC signal Edge :
0 Increment on low-to-high transition on RTCC pin
1 Increment on high-to-low transition on RTCC pin
5
TCS RTCC signal set :
0 Internal instruction cycle clock
1 Transition on RTCC pin
(10) CPIO A, CPIO B, CPIO C (Control Port I/O Mode Register)
The CPIO register is “write -only”
“0”, I/O pin in output mode;
“1”, I/O pin in i nput mode.
(11) EPROM Option by Writer Programming:
Oscillator Type Oscillator Start-up Time
RC Oscillator 150 µs,20ms,40ms,80ms
HFXT Oscillator 20 ms,40ms,80ms
XTAL Oscillator 20ms,40 ms,80ms
LFXT Oscillator 40ms,80 ms
Watchdog Timer control
Watchdog timer disable all the time
Watchdog timer enable all the time
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 5 2005/6 VER 1.3
Power Edge Detect Security bit
PED Disable Security weak Disable
PED Enable Security Disable
Security Enable
7. Reset Condition for all Registers
Register Address Power-On Reset /MCLR or WDT Reset
CPIO A -- 1111 1111 1111 1111
CPIO B -- 1111 1111 1111 1111
CPIO C -- 1111 1111 1111 1111
TMR -- --11 1111 --11 1111
IAR 00h
RTCC 01h xxxx xxxx uuuu uuuu
PC 02h 1111 1111 1111 1111
STATUS 03h 0001 1xxx 000# #uuu
MSR 04h 100x xxxx 100u uuuu
PORT A 05h - - - - xxxx - - - - uuuu
PORT B 06h xxxx xxxx uuuu uuuu
PORT C 07h xxxx xxxx uuuu uuuu
Note : u = unchanged, x = unknown, - = unimplemented, read as “0”
# = value depends on the condition of the following table
Condition Status: bit 4 Status: bit 3
/MCLR reset (not during SLEEP) u u
/MCLR reset during SLEEP 1 0
WDT reset (not during SLEEP) 0 1
WDT reset during SLEEP 0 0
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 6 2005/6 VER 1.3
8. Instruction Set
Instruction Code Mnemonic
Operands Function Operating Status
010000 00000000
NOP No operation
None
010000 00000001
CLRWT Clear Watchdog timer 0WT TF, PF
010000 00000010
SLEEP
Sleep mode
0
WT,stop OSC
TF, PF
010000 00000011
TMODE Load W to TMODE register WTMODE None
010000 00000100
RET
Return
StackPC None
010000 00000rrr
CPIO R Control I/O port register WCPIO r None
010001 1rrrrrrr
STWR R Store W to register WR None
011000 trrrrrrr
LDR R t Load regi
ster
Rt Z
111010 iiiii
iii LDWI I
Load immediate to W
IW None
010111 trrrrrrr
SWAPR Rt
Swap halves register
[R(0~3)
R(4~7)]t None
011001 trrrrrrr
INCR Rt Increment register R + 1t Z
011010 trrrrrrr
INCRSZ R Increment registerskip if
zero R + 1t None
011011 trrrrrrr
ADDWR Rt Add W and register W + Rt CHCZ
011100 trrrrrrr
SUBWR Rt Subtract W from register R Wt
(R+/W+1t) CHCZ
011101 trrrrrrr
DECR Rt Decrement register R 1t Z
011110 tr
rrrrrr DECRSZ Rt Decrement register
skip if zero R 1t None
010010 trrrrrrr
ANDWR Rt AND W and register R Wt Z
110100 iiiiiiii
ANDWI I AND W and immediate I WW Z
010011 trrrrrrr
IORWR Rt Inclu. OR W and register R Wt Z
110101 ii
iiiiii IORWI I Inclu. OR W and immediate I WW Z
010100 trrrrrrr
XORWR Rt Exclu. OR W and register R Wt Z
110110 iiiiiiii
XORWI I Exclu. OR W and immediate I WW Z
011111 trrrrrrr
COMR R t
Complement register
/Rt Z
010110 trrrrrrr
RRR Rt Rotate right register R(n)R(n-1)
CR(7) R(0)C C
010101 trrrrrrr
RLR R t Rotate left register R(n)(n+1)
CR(0) R(7)C C
010000 1xxxxxxx
CLRW Clear working register 0W Z
010001 0rrrrrrr
CLRR R Clear register
0R Z
0000bb brrr
rrrr BCR R b
Bit clear
0R(b) None
0010bb brrrrrrr
BSR R b
Bit set
1R(b) None
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 7 2005/6 VER 1.3
Instruction Code Mnemonic
Operands Function Operating Status
0001bb brrrrrrr
BTSC R b Bit Testskip if clear Skip if R(b)=0
None
0011bb brrrrrrr
BTSS R b Bit Testskip if set Skip if R(b)=1
None
100nnn nnnnnnnn
LCALL n Long CALL subroutine nPC
PC+1Stack None
101nnn nnnnnnnn
LJUMP n Long JUMP to address nPC None
110000 nnnnnnnn
CALL n Call
subroutine
nPC,
PC+1Stack None
110001 iiiiiiii
RTWI i Return, place immediate to
W StackPC,
iW None
11001n nnnnnnnn
JUMP n
JUMP to address
nPC None
Note : W : Working register b : Bit position
WT : Watchdog timer t : Target
TMODE : TMODE mode register 0 : Working register
CPIO : Control I/O port register 1 : General register
TF : Timer overflow flag R : General register address
PF : Power loss flag C : Carry flag
PC : Program Counter HC : Half carry
OSC : Oscillator Z : Zero flag
Inclu. : Inclusive / : Complement
Exclu. : Exclusive x : Don’t care
AND : Logic AND ‘ i : Immediate data ( 8 bits )
n : Immediate address
9. Electrical Characteristics
(A) Operating Voltage & Frequency
Vdd 2.3 V ~ 6.0 V
Frequency0 Hz ~ 20 MHz
(B) Input Voltage
@ Vdd5.0 V, Temperature25
Port Min. Max.
Vil PA, PB, PC
RTCC, /MCLR Vss
Vss 1.0 V
1.0 V
Vih PA, PB, PC
RTCC, /MCLR 2.0 V
3.3 V Vdd
Vdd
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 8 2005/6 VER 1.3
Threshold Voltage :
Port A, Port B, Port C Vth1.5 V
RTCC, /MCLR Vil1.2 V, Vih3.1V (Schmitt Trigger)
(C) Output Voltage
@ Vdd5.0 V, Temperature25 , the typical value as followings :
PA, PB, PC Port
Ioh=-20.0 mA Voh3.40 V
Iol20.0 mA Vol0.50 V
Ioh=-5.0 mA Voh4.50 V
Iol5.0 mA Vol0.10 V
(D) Leakage Current
@ Vdd5.0 V, Temperature25 , the typical value as followings :
Iil 0.1µA (Max.)
Iih 0.1 µA (Max.)
(E) Sleep Current
@WDTDisable, Temperature25 , the typical value as followings :
Vdd2.3 V Idd1.0 µA
Vdd3.0 V Idd1.0 µA
Vdd4.0 V Idd1.0 µA
Vdd5.0 V Idd1.0 µA
Vdd6.0 V Idd1.0 µA
@WDTEnable, Temperature25 , the typical value as followings :
Vdd2.3 V Idd1.0 µA
Vdd3.0 V Idd3.0 µA
Vdd4.0 V Idd6.0 µA
Vdd5.0 V Idd11.0 µA
Vdd6.0 V Idd17.0 µA
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 9 2005/6 VER 1.3
F) Operating Current
Temperature25, the typical value as followings :
(i) OSC TypeRC (OSC1&OSC2 Internal Cap about 10P); WDTEnable; @ Vdd5.0 V
PED=Disable
Cext. (F) Rext. (Ohm) Frequency (Hz) Current (A)
4.7 K 7.76 M 980 µA
10.0 K 3.82 M 560 µA
0P 47.0 K 848 K 240 µA
100.0 K 404 K 185 µA
300.0 K 135.6 K 155 µA
470.0 K 86 K 150 µA
4.7 K 6.8 M 880 µA
10.0 K 3.34 M 510 µA
3P 47.0 K 740 M 230 µA
100.0 K 356 K 185 µA
300.0 K 119 K 155 µA
470.0 K 75.2 K 150 µA
4.7 K 4.16 M 610 µA
10.0 K 2.04 M 380 µA
20P 47.0 K 452 K 200 µA
100.0 K 214.8 K 175 µA
300.0 K 75.2 K 155 µA
470.0 K 45.6 K 151 µA
4.7 K 1.57 M 335 µA
10.0 K 764 K 245 µA
100P 47.0 K 167.2 K 175 µA
100.0 K 76.8 K 165 µA
300.0 K 26.6 K 160 µA
470.0 K 16.8 K 155 µA
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 10 2005/6 VER 1.3
Cext. (F) Rext. (Ohm) Frequency (Hz) Current (A)
4.7 K 672 K 235 µA
10.0 K 321.6 K 195 µA
300P 47.0 K 70.4 K 165 µA
100.0 K 33.2 K 160 µA
300.0 K 11.1 K 158 µA
470.0 K 7.04 K 156 µA
(ii) OSC TypeLF (OSC1&OSC2 Internal Cap about 10P); WDTEnable
PED=Disable
Voltage/Frequency 32 K 455 K 1 M Sleep
2.3 V 7.0 µA 25.0 µA 40.0 µA 1.0 µA
3.0 V 15.0 µA 45.0 µA 65.0 µA 3.0 µA
4.0 V 35.0µA 85.0 µA 115.0 µA 6.0 µA
5.0 V 70.0 µA 140.0 µA 180.0 µA 11.0 µA
6.0 V 130.0 µA 215.0 µA 260.0 µA 17.0 µA
(iii) OSC TypeXT (OSC1&OSC2 Internal Cap about 10P); WDTEnablePED=Disable
Voltage/Frequency 1 M 4 M 10 M Sleep
2.1 V 50.0 µA 120.0 µA
290 µA 1.0 µA
3.0 V 100.0 µA 230.0 µA 490 µA 3.0 µA
4.0 V 210.0 µA 400.0 µA 650 µA 6.0 µA
5.0 V 375.0 µA 590.0 µA 1.3 mA 11.0 µA
6.0 V 645.0 µA 850.0 µA 1.6 mA 17.0 µA
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 11 2005/6 VER 1.3
(iv) OSC TypeHF (OSC1&OSC2 Internal Cap about 10P); WDTEnablePED=Disable
Voltage/Frequency 4 M 10 M 20 M Sleep
2.1 V 150.0 µA 320.0 µA X 1.0 µA
3.0 V 280.0 µA 550.0 µA 950.0 µA 3.0 µA
4.0 V 510.0 µA 910.0 µA 1.5 mA 6.0 µA
5.0 V 800.0 µA 1.4 mA 2.3 mA 11.0 µA
6.0 V 1.3 mA 1.9 mA 3.2 mA 17.0 µA
(G) Power Edge-detector Reset Voltage (Not in Sleep Mode), @ Vdd5.0 V
Vpr1.8~2.2 V Vpr Vdd (Power Supply)
(H) The basic WDT time-out cycle time
@Temperature25 , the typical value as followings :
Vdd =5.0 V, Temperature=25,the typical value as followings:
Voltage (V) Basic WDT time-out cycle time (ms)
2.3 25.2
3.0 22.4
4.0 20.4
5.0 18.8
6.0 18.0
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 12 2005/6 VER 1.3
10. Port A ,Port B and Port C Equivalent Circuit
Working Register
I/O Control
Write
Data Bus
Read
Data O/P
Latch
D
CK
DI/O
Control
Latch
CK
QB
Q
Q
CK
QBDInput Resistor
Port I/O Pin
Data I/P
Latch TTL Input Level
Data I/P
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 13 2005/6 VER 1.3
11. MCLRB and RTCC Input Equivalent Circuit
R
1 K
Schmitt Trigger
MCLRB
R
1 K
Schmitt Trigger
RTCC
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 14 2005/6 VER 1.3
12. Block Diagram
Stack Two Levels
Program Counters
Oscillator Circuit
Power on Reset
Power Down Reset
8-bit Timer/Counter
EPROM
2048
×
14
Instruction
Register
Instruction
Decoder
Working Register
ALU
Prescale
RAM
72*8
Special Register
Control Circuit
Status Register
WDT/OST
Timer
Port A
Port B
Port C
OSC1 OSC2 MCLR
Data 8-bit
RTCC
11 bits
11 bits 14 bits
Port
PA0~PA3
4 bits
Port
PB0~PB7
8 bits
Port
PC0~PC7
8 bits
D0~D7
MDT10P20(BC)
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 15 2005/6 VER 1.3
13. External Capacitor Selection For Crystal Oscillator
@ Vdd3.0 V~ 5.0 V
Osc. Type Resonator Freq. C1 C2
20 MHz 5 pF ~10 pF 10 pF~30 pF
HF 10 MHz 10 pF ~50 pF 20 pF ~100 pF
4 MHz 10 pF ~50 pF 20 pF ~100 pF
10 MHz 10 pF ~30 pF 10 pF ~50 pF
XT 4 MHz 10 pF ~50 pF 20 pF ~100 pF
1 MHz 10 pF ~30 pF 20 pF ~50 pF
1 MHz 3 pF ~5 pF 3 pF ~5 pF
LF 455 K 10 pF ~30 pF 20 pF ~50 pF
32 K 10 pF ~20 pF 15 pF ~30 pF
MDT10P20
OSC1 OSC2
C1 C2
To increase the stability of oscillator and the ability of anti-noise, the above values of the external
capacitor range can be recommended for reference, but the higher capacitance also increases
the start-up time.