MDT10P57: 1. General Description
MDT10P57: 1. General Description
MDT10P57: 1. General Description
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 1 2008/02 Ver. 1.2
MDT10P57
4. Pin Assignment
MDT10P57A1P / MDT10P57A1S MDT10P57A3P / MDT10P57A3S
VDD1 14VSS VDD1 14 VSS
PA52 13PA0/AN0 PA52 13PA0/AN0
PA4/AN33 12PA1/AN1/VREF PA4/AN33 12PA1/AN1/VREF
PA34 11PA2/T0CKI/AN2 MCLRB4 11PA2/T0CKI/AN2
PB55 10PB0 PB55 10PB0
PB46 9PB1 PB46 9PB1
PB37 8PB2 PB37 8PB2
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 2 2008/02 Ver. 1.2
MDT10P57
6. Memory Map
(A) Register Map
Address Description
BANK0
00 Indirect Addressing Register
01 RTCC
02 PCL
03 STATUS
04 MSR
05 Port A
06 Port B
0A PCHLAT
0B INTS
0C PIFB1
1E ADRES
1F ADS0
20~7F General purpose register
BANK1
01 TMR
05 CPIO A
06 CPIO B
0C PIEB1
0E PSTA
1F ADS1
A0~BF General purpose register
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 3 2008/02 Ver. 1.2
MDT10P57
(4) STATUS (Status register): R03
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
5 RBS0 Register Bank Select bit:
0: 00H~7FH (Bank0)
1: 80H~FFH (Bank1)
7~6 -- General purpose bit
(5) MSR (Memory Bank Select Register): R04
Memory Bank Select Register:
0: 00~7F (Bank0)
1: 80~FF (Bank1)
b7 b6 b5 b4 b3 b2 b1 b0
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 4 2008/02 Ver. 1.2
MDT10P57
Bit Symbol Function
0: disable all peripheral interrupt.
6 PEIE
1: enable all peripheral interrupt.
0: disable global interrupt.
7 GIS
1: enable global interrupt.
(10) PIFB1 (Peripheral Interrupt Flag Bit): R0C
Bit Symbol Function
0~5 -- Unimplemented
A/D interrupt flag
6 ADIF 0: A/D conversion is not complete
1: A/D conversion completed
7 -- Unimplemented
(11) ADRES (A/D result register): R1E
(12) ADS0 (A/D Status Register): R1F
Bit Symbol Function
0: A/D converter module is shut off and consumes no
0 ADRUN operating current
1: A/D converter module is operating
1 -- Unimplemented
0: A/D conversion not in progress
2 GO/DONEB
1: A/D conversion in progress
4~3 CHS1~0 00: AIC0, 01: AIC1, 10: AIC2, 11: AIC3
5 -- Unimplemented
7~6 ASCS1-0 00: fosc/2, 01: fosc/8, 10: fosc/32, 11: f RC (*Note)
*Note: determined by OSC mode, HF: fosc/32, XT: fosc/8, LF: fosc/2, RC: fosc/2
(13) TMR (Time Mode Register): R81
Bit Symbol Function
Prescaler Value 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
2~0 PS2~0 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
0: RTCC
3 PSC
1: Watchdog Timer
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 5 2008/02 Ver. 1.2
MDT10P57
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 6 2008/02 Ver. 1.2
MDT10P57
(18) ADS1 (A/D Status Register): R9F
Bit Symbol Function
0 0 0: PA0~2,PA4= analog input. VREF= VDD.
0 0 1: PA0~2,PA4= analog input. PA1= ref input, VREF= PA1.
0 1 0: PA0~2= analog input. VREF= VDD.
0 1 1: PA0~2= analog input. PA1= ref input, VREF= PA1.
2~0 PAVM2~0
1 0 0: PA0, 1= analog input. PA2, 4= digital I/O, VREF= VDD.
1 0 1: PA0, 1= analog input. PA2, 4= digital I/O, VREF=PA1.
1 1 0: PA0= analog input. PA1, 2, 4= digital I/O, VREF=VDD.
1 1 1: PA0~2, 4= digital I/O.
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 7 2008/02 Ver. 1.2
MDT10P57
7. Reset Condition for all Registers
Power-On Reset,
Register Address Power range /MCLR or WDT Reset Wake-up from SLEEP
detector Reset
IAR 00h N/A N/A N/A
RTCC 01h xxxx xxxx uuuu uuuu uuuu uuuu
PC 0Ah,02h 0000 0000 0000 0000 0000 0000 PC + 1
STATUS 03h 0001 1xxx 000# #uuu 000# #uuu
MSR 04h xxxx xxxx uuuu uuuu uuuu uuuu
PORT A 05h --xx xxxx --uu uuuu --uu uuuu
PORT B 06h --xx xxxx --uu uuuu --uu uuuu
PCHLAT 0Ah ---0 0000 ---0 0000 ---u uuuu
INTS 0Bh 0000 000x 0000 000u uuuu uuuu
PIFB1 0Ch -0-- ---- -0-- ---- -u-- ----
ADRES 1Eh xxxx xxxx uuuu uuuu uuuu uuuu
ADS0 1Fh 00-0 00-0 00-0 00-0 uu-u uu-u
TMR 81h 1111 1111 1111 1111 uuuu uuuu
CPIOA 85h --11 1111 --11 1111 --uu uuuu
CPIOB 86h --11 1111 --11 1111 --uu uuuu
PIEB1 8Ch -0-- ---- -0-- ----- -u-- ----
PSTA 8Eh ---- --0- ---- --u- ---- --u-
ADS1 9Fh ---- -000 ---- -000 ---- -uuu
Note : u=unchanged, x=unknown, - =unimplemented, read as “0”
#=value depends on the condition of the following table
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 8 2008/02 Ver. 1.2
MDT10P57
8. Instruction Set
Mnemonic
Instruction Code Function Operating Status
Operands
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 00000100 RET Return from subroutine Stack→PC 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) None
↔R(4~7)]→t
011001 trrrrrrr INCR R, t Increment register R + 1→t Z
011010 trrrrrrr INCRSZ R, t Increment register, skip if R + 1→t None
zero
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 C, HC, Z
(R+/W+1→t)
011101 trrrrrrr DECR R, t Decrement register R ﹣1→t Z
011110 trrrrrrr DECRSZ R, t Decrement register, skip if R ﹣1→t None
zero
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
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 R, t Rotate right register R(n) →R(n-1), C
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 R 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
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 9 2008/02 Ver. 1.2
MDT10P57
Mnemonic
Instruction Code Function Operating Status
Operands
100nnn nnnnnnnn LCALL n Long CALL subroutine n→PC, None
PC+1→Stack
101nnn nnnnnnnn LJUMP n Long JUMP to address n→PC None
110111 iiiiiiii ADDWI i Add immediate to W W+i→W C, HC, Z
110001 iiiiiiii RTIW i Return, place immediate to Stack→PC,i→W None
W
111000 iiiiiiii SUBWI i Subtract W from immediate i-W→W C, HC, Z
010000 00001001 RTFI Reture from interrupt Stack→PC,1→GIS 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 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
*Note: Temperature=25°C
1.Operation Current :
(1) HF (C=10p) , WDT - enable
4M 10M 20M Sleep
2.5V 350uA 800uA 1.4mA 3uA
3.0V 530uA 1.1mA 1.8mA 8uA
4.0V 940uA 1.7mA 2.9mA 16uA
5.0V 1.5mA 2.5mA 4.4mA 30uA
5.5V 2.2mA 3.5mA 6mA 50uA
These parameters are for reference only.
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 10 2008/02 Ver. 1.2
MDT10P57
(2) XT (C=10p) , WDT - enable
1M 4M 10M Sleep
2.5V 120uA 300uA 800uA 3uA
3.0V 170uA 390uA 910uA 8uA
4.0V 310uA 720uA 1.5mA 16uA
5.0V 610uA 1.1mA 2.1mA 30uA
5.5V 990uA 1.6mA 2.8mA 50uA
These parameters are for reference only.
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 11 2008/02 Ver. 1.2
MDT10P57
C R Freq. Current
4.7k 820K 350uA
10k 404K 280uA
47k 88K 240uA
300p
100k 42K 230uA
300k 14K 230uA
470k 9K 230uA
These parameters are for reference only.
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 12 2008/02 Ver. 1.2
MDT10P57
4. Output Current (Max.) (Vdd = 5V) :
Port A: Current
Source current 25mA
Sink current 25mA
These parameters are for reference only.
Port B: Current
Source current 25mA
Sink current 25mA
These parameters are for reference only.
7. INRC Frequency :
Frequency(error%)
@VDD=5V,25℃ 4M
@VDD=6V,25℃ 4.1M(2.5%)
@VDD=2.5V,25℃ 3.9M(2.5%)
@VDD=5V,0℃ 4.1M(2.5%)
@VDD=5V,40℃ 3.9M(2.5%)
@VDD=5V,80℃ 3.6M(10%)
These parameters are for reference only.
This specification are subject to be changed without notice. Any latest information please preview
http;//www.mdtic.com.tw P. 13 2008/02 Ver. 1.2