MDTIC MDT2030CC

MDT2030(CC)
8-bit programmable prescaler
1. General Description
This ROM-Based 8-bit micro-controller uses a
u
Timer(WDT)
fully static CMOS technology process to
achieve high speed, small size, the low power
On-chip RC oscillator based Watchdog
u
12 I/O pins with their own independent
direction control
and high noise immunity.
On chip memory includes 2K words EPROM,
and 80 bytes static RAM.
3. Applications
The application areas of this MDT2030 range
2. Features
from appliance motor control and high speed
The followings are some of the features on the
automotive to low power remote transmitters
hardware and software :
/receivers, pointing devices, and
u Fully CMOS static design
telecommunications processors, such as
u 8-bit data bus
Remote controller, small instruments,
u On chip EPROM size : 2.0 K words
chargers, toy, automobile and PC
u Internal RAM size : 80 bytes
peripheral … etc.
(73 general purpose registers, 7 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
4. Pin Assignment
DIP / SOP
PA2 1
18
PA3 2
17
RTCC 3
16
/MCLR 4
15
Vss 5
14
PB0 6
13
PB1 7
12
PB2 8
11
PB3 9
10
PA1
PA0
OSC1
OSC2
Vdd
PB7
PB6
PB5
PB4
SSOP
1
20
2
19
3
18
4
17
5
16
6
15
7
14
8
13
9
12
10
11
PA1
PA0
OSC1
OSC2
VDD
VDD
PB7
PB6
PB5
PB4
u Power-on Reset
u Power edge-detector Reset
u Sleep Mode for power saving
u
4 types of oscillator can be selected by
programming option:
RC-Low cost RC oscillator
LFXT-Low frequency crystal oscillator
XTAL-Standard crystal oscillator
HFXT-High frequency crystal oscillator
u
4 oscillator start-up time can be selected
by programming option:
150 µs, 20 ms, 40 ms, 80 ms
u
PA2
PA3
RTCC
/MCLR
VSS
VSS
PB0
PB1
PB2
PB3
8-bit real time clock/counter(RTCC) with
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.4
MDT2030(CC)
5. Block Diagram
E PR OM
S ta ck Tw o Le ve ls
P o rt
P A0 ~P A3
4 b its
RAM
7 3 X8
2 0 4 8 X1 4
P o rt A
1 1 b its
14
b its
1 1 b its
P ro g ra m C o u n te rs
In s tru ctio n
Re g is te r
S p e c ia l Re g is te r
O SC 2
MCLR
OSC 1
P o rt
P B0 ~ P B7
8 b its
D 0 ~D 7
P o rt B
O s cilla to r Circu it
In s tru ctio n
De co d e r
Co n tro l C ircu it
Da ta
8 -b it
P o we r o n Re s e t
P o w e r Do wn R e s e t
W o rkin g R e g is te r
S ta tu s R e g is te r
ALU
8 -b it Tim e r/Co u n te r
W DT/O S T
Tim e r
P re s ca le
R TCC
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.4
MDT2030(CC)
6. 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
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
7. 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~1F
Internal RAM, Memory bank 0
30~3F
Internal RAM, Memory bank 1
50~5F
Internal RAM, Memory bank 2
70~7F
Internal RAM, memory bank 3
(1) IAR ( Indirect Address Register) : R0
(2) RTCC (Real Time Counter/Counter Register) : R1
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.4
MDT2030(CC)
(3) PC (Program Counter) : R2
Write PC, CALL --- always 0
JUMP --- from instruction word
RTWI, RET --- from STACK
A10
A9
A8
A7~A0
Write PC, JUMP, CALL --- from STATUS b6 b5
RTWI, RET --- from STACK
Write PC --- from ALU
JUMP, CALL --- from instruction word
RTWI, RET --- from STACK
(4) STATUS (Status register) : R3
Bit
Symbol
Function
0
C
Carry bit
1
HC
Half Carry bit
2
Z
Zero bit
3
PF
Power loss Flag bit
4
TF
WDT Timer overflow Flag bit
page
ROM page select bit :
6—5
00 : Page 0, 000H --- 1FFH
01 : Page 1, 200H --- 3FFH
10 : Page 2, 400H --- 5FFH
11 : Page 3, 600H --- 7FFH
7
——
General purpose bit
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.4
MDT2030(CC)
(5) MSR (Memory Bank Select Register) : R4
Memory Bank 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) TMR (Time Mode Register)
Bit
Symbol
Function
Prescaler Value
2—0
PS2—0
3
PSC
4
TCE
5
TCS
RTCC rate
WDT rate
0 0 0
1:2
1:1
0 0 1
1:4
1:2
0 1 0
1:8
1:4
0 1 1
1 : 16
1:8
1 0 0
1 : 32
1 : 16
1 0 1
1 : 64
1 : 32
1 1 0
1 : 128
1 : 64
1 1 1
1 : 256
1 : 128
Prescaler assignment bit :
0 — RTCC
1 — Watchdog Timer
RTCC signal Edge :
0 — Increment on low-to-high transition on RTCC pin
1 — Increment on high-to-low transition on RTCC pin
RTCC signal set :
0 — Internal instruction cycle clock
1 — Transition on RTCC pin
(9) CPIO A, CPIO B (Control Port I/O Mode Register)
The CPIO register is “write-only”
=“0”, I/O pin in output mode;
=“1”, I/O pin in input mode.
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.4
MDT2030(CC)
(10) Configurable options for EPROM (Set by writer) :
Oscillator Type
RC
Oscillator Start-up Time
150 µs,20ms,40ms,80ms
Oscillator
HFXT Oscillator
20 ms,40ms,80ms
XTAL Oscillator
20ms,40 ms,80ms
LFXT Oscillator
40 ms,80 ms
Watchdog Timer control
Watchdog timer disable all the time
Watchdog timer enable all the time
Power Edge Detect
Security state
PED Disable
Security weak Disable
PED Enable
Security Disable
Security Enable
The default security state of EPROM is weak disable. Once the IC was set to
enable or disable, it’s forbidden to change.
(B) Program Memory
Address
Description
000-7FF
Program memory
7FF
The starting address of power on, external reset or WDT time-out reset.
8. 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
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
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.4
MDT2030(CC)
Register
Address
Power-On Reset
/MCLR or WDT Reset
PORT A
05h
- - - - xxxx
- - - - uuuu
PORT B
06h
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
9. Instruction Set :
Instruction Code
Mnemonic
Operands
Function
Operating
Status
010000 00000000
NOP
No operation
None
010000 00000001
CLRWT
Clear Watchdog timer
0→WT
TF, PF
010000 00000010
SLEEP
Sleep mode
0→WT, stop OSC
TF, PF
010000 00000011
TMODE
Load W to TMODE register
W→TMODE
None
010000 00000100
RET
Return
Stack→PC
None
010000 00000rrr
CPIO R
Control I/O port register
W→CPIO r
None
010001 1rrrrrrr
STWR R
Store W to register
W→R
None
011000 trrrrrrr
LDR R, t
Load register
R→t
Z
111010 iiiiiiii
LDWI I
Load immediate to W
I→W
None
010111 trrrrrrr
SWAPR R, t
Swap halves register
[R(0~3) ↔R(4~7)]
→t
None
011001 trrrrrrr
INCR R, t
Increment register
R + 1→t
Z
011010 trrrrrrr
INCRSZ R, t
Increment register, skip if zero
R + 1→t
None
011011 trrrrrrr
ADDWR R, t
Add W and register
W + R→t
C, HC, Z
011100 trrrrrrr
SUBWR R, t
Subtract W from register
R ﹣W→t or
(R+/W+1→t)
C, HC, Z
011101 trrrrrrr
DECR R, t
Decrement register
R ﹣1→t
Z
011110 trrrrrrr
DECRSZ R, t
Decrement register, skip if zero
R ﹣1→t
None
010010 trrrrrrr
ANDWR R, t
AND W and register
R ∩ W→t
Z
110100 iiiiiiii
ANDWI i
AND W and immediate
i ∩ W→W
Z
010011 trrrrrrr
IORWR R, t
Inclu. OR W and register
R ∪ W→t
Z
110101 iiiiiiii
IORWI i
Inclu. OR W and immediate
i ∪ W→W
Z
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.4
MDT2030(CC)
Instruction Code
Mnemonic
Operands
Function
Operating
Status
010100 trrrrrrr
XORWR R, t
Exclu. OR W and register
R ♁ W→t
Z
110110 iiiiiiii
XORWI i
Exclu. OR W and immediate
i ♁ W→W
Z
011111 trrrrrrr
COMR R, t
Complement register
/R→t
Z
010110 trrrrrrr
RRR
Rotate right register
R(n) →R(n-1),
C
R, t
C→R(7), R(0)→C
010101 trrrrrrr
RLR
R, t
Rotate left register
R(n)→r(n+1),
C
C→R(0), R(7)→C
010000 1xxxxxxx
CLRW
Clear working register
0→W
Z
010001 0rrrrrrr
CLRR
Clear register
0→R
Z
0000bb brrrrrrr
BCR
R, b
Bit clear
0→R(b)
None
0010bb brrrrrrr
BSR
R, b
Bit set
1→R(b)
None
0001bb brrrrrrr
BTSC R, b
Bit Test, skip if clear
Skip if R(b)=0
None
0011bb brrrrrrr
BTSS R, b
Bit Test, skip if set
Skip if R(b)=1
None
1000nn nnnnnnnn
LCALL n
Long CALL subroutine
n→PC,
None
R
PC+1→Stack
1010nn nnnnnnnn
LJUMP n
Long JUMP to address
n→PC
None
110000 nnnnnnnn
CALL
Call subroutine
n→PC,
None
n
PC+1→Stack
110001 iiiiiiii
RTWI
11001n nnnnnnnn
JUMP
i
n
Return, place immediate to W
Stack→PC,i→W
None
JUMP to address
n→PC
None
Note :
W
WT
TMODE
CPIO
TF
PF
PC
OSC
Inclu.
Exclu.
AND
:
:
:
:
:
:
:
:
:
:
:
Working register
Watchdog timer
TMODE mode register
Control I/O port register
Timer overflow flag
Power loss flag
Program Counter
Oscillator
Inclusive ‘∪’
Exclusive ‘♁’
Logic AND ‘∩’
b
t
R
C
HC
Z
/
x
i
n
:
:
0
1
:
:
:
:
:
:
:
:
Bit position
Target
:
Working register
:
General register
General register address
Carry flag
Half carry
Zero flag
Complement
Don’t care
Immediate data ( 8 bits )
Immediate address
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.4
MDT2030(CC)
10. Electrical Characteristics
(Operating temperature at 25℃).
Sym
Description
Condition
Vdd Operating voltage
Min
Typ
Max
Uni
t
2.3
6.0
V
VIL Input Low Voltage
PA, PB
RTCC, /MCLR
Vdd=5V
Vdd=5V
-0.6
-0.6
1.0
1.0
V
V
VIH Input high Voltage
PA, PB
RTCC, /MCLR
Vdd=5V
Vdd=5V
2.0
3.3
Vdd
Vdd
V
V
+/-1
µA
IIL
Input leakage current
VOL Output Low Voltage
PA, PB
VOH Output High Voltage
PA, PB
Islp
Sleep current (WDT disable)
Islp
Sleep current (WDT enable)
Vdd=5V
Vdd=5V, IOL=20mA
Vdd=5V, IOL=5mA
0.5
0.1
V
V
Vdd=5V, IOH= -20mA
Vdd=5V, IOH= -5mA
Vdd=2.3 ~ 6.0 V
3.8
4.5
V
V
µA
Vdd=2.3 V
Vdd=3.0 V
Vdd=4.0 V
Vdd=5.0 V
Vdd=6.0 V
1
3
6
11
17
Vpr Power Edge-detector Reset
Voltage
0.1
1.0
µA
µA
µA
µA
µA
1.1
1.3
V
Twdt The basic WDT time-out cycle
time
Vdd=2.3 V
Vdd=3.0 V
Vdd=4.0 V
Vdd=5.0 V
Vdd=6.0 V
25.2
22.4
20.4
18.8
18.0
mS
mS
mS
mS
mS
TFLT /MCLR filter
Vdd=5.0 V
600
nS
15
µA
Icc Comparator Supply current (one Vdd=5.0v
comparator)
Vref Input reference voltage
Vdd=2.5v ~6.0 V
Vdd-0.8 V
v
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.4
MDT2030(CC)
Sym
---
Description
Comparator Response time
V-=Vdd/4, V+=V- ± 0.2v
V-=Vdd/2, V+=V- ± 0.2v
V-=Vdd3/4, V+=V- ± 0.2v
V-=VDD-0.8,V+=V± 0.2v
Condition
Min
Vdd=5.0v , V- = Vref
V+ = (PA0~PA3)
Typ
Max
Uni
t
µS
µS
µS
µS
8
8
8
8
11. Operating Current
Temperature=25 ℃, the typical value as followings :
11.1 OSC Type=RC (OSC1&OSC2 Internal Cap about 10P); WDT-Enable;
Comparator - Disable ; PED=Disable Vdd=5.0 V
Cext. (F)
0P
3P
20P
Rext. (Ohm)
Frequency (Hz)
Current (A)
4.7 K
7.76M
980 µA
10.0 K
3.82M
560 µA
47.0 K
848K
240 µA
100.0 K
404K
185 µA
300.0 K
135.6K
155 µA
470.0 K
86K
150 µA
4.7 K
6.8M
880 µA
10.0 K
3.34M
510 µA
47.0 K
740K
230 µA
100.0 K
356K
185 µA
300.0 K
119K
155 µA
470.0 K
75.2K
150 µA
4.7 K
4.16M
610 µA
10.0 K
2.04M
380 µA
47.0 K
452K
200 µA
100.0 K
214.8K
175 µA
300.0 K
75.2K
155 µA
470.0 K
45.6K
151 µA
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.4
MDT2030(CC)
Cext. (F)
100P
300P
Rext. (Ohm)
Frequency (Hz)
Current (A)
4.7 K
1.57M
335 µA
10.0 K
764K
245 µA
47.0 K
167.2K
175 µA
100.0 K
76.8K
165 µA
300.0 K
26.6K
160 µA
470.0 K
16.8K
155 µA
4.7 K
672K
235 µA
10.0 K
321.6K
195 µA
47.0 K
70.4K
165 µA
100.0 K
33.2K
160 µA
300.0 K
11.1K
158 µA
470.0 K
7.04K
156 µA
11.2 OSC Type=LF (OSC1&OSC2 Internal Cap about 10P); WDT-Enable ;
Comparator - Disable﹔PED=Disable
Voltage/Frequency
32 K
455 K
1M
Sleep
2.3 V
7.0µA
25µA
40µA
<1.0 µA
3.0 V
15.0µA
45µA
65µA
3 µA
4.0 V
35.0µA
85µA
115µA
6 µA
5.0 V
70.0µA
140µA
180µA
11 µA
6.0 V
130µA
215µA
260µA
17 µA
11.3 OSC Type=XT (OSC1&OSC2 Internal Cap about 10P); WDT-Enable ;
Comparator - Disable ﹔PED=Enable
Voltage/Frequency
1M
4M
10 M
Sleep
2.1 V
50µA
120µA
290µA
<1.0 µA
3.0 V
100µA
230µA
490µA
3 µA
4.0 V
210µA
400µA
650µA
6 µA
5.0 V
375µA
590µA
1.3mA
11 µA
6.0 V
645µA
850µA
1.6mA
17 µA
11.4 OSC Type=HF (OSC1&OSC2 Internal Cap about 10P); WDT-Enable ;
Comparator - Disable﹔PED=Enable
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.4
MDT2030(CC)
Voltage/Frequency
4M
10 M
20 M
Sleep
2.1 V
150µA
320µA
X
<1.0 µA
3.0 V
280µA
550µA
925µA
3 µA
4.0 V
510µA
910µA
1.5mA
6 µA
5.0 V
800µA
1.4mA
2.3mA
11 µA
6.0 V
1.3mA
1.9mA
3.2mA
17 µA
11.5 Power Edge-detector Reset Voltage (Not in Sleep Mode), @ V dd=5.0 V
Vpr≦1.8~2.2 V
Vpr ﹕Vdd (Power Supply)
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.4
MDT2030(CC)
12. Port A and Port B Equivalent Circuit
D
Q
I/O
Control
C Latch Q
K
B
I/O
Control
Port I/O
Pin
D
Data O/P
Latch
Write
G
Q
B
Data Bus
Read
D
QB
Data I/P
Latch
G
TTL Input
Level
Inpu t Resistor
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.4
MDT2030(CC)
13. MCLRB and RTCC Input Equivalent Circuit
MCLRB
R≒1K
Schmitt Trigger
R≒1K
RTCC
Schmitt Trigger
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.4
MDT2030(CC)
14. External Capacitor Selection For Crystal Oscillator
@ Vdd=5.0 V
Osc. Type
Resonator Freq.
Capacity Range
20 MHz
10 pF ~ 50 pF
10 MHz
20 pF ~ 50 pF
4 MHz
10 pF ~ 30 pF
10 MHz
10 pF ~ 50 pF
4 MHz
10 pF ~ 50 pF
1 MHz
20 pF ~50 pF
1 MHz
20 pF ~ 30 pF
455 K
20 pF ~30 pF
32 K
20 pF ~30 pF
HF
XT
LF
MDT2030
OSC1
C1
OSC2
C2
To increase the stability of oscillator and the ability of anti-noise, the above values of the external capacitor are for
reference only, but the higher capacitance also increases the start-up time.
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.4