深圳市美芯微电子有限公司麦肯单片机授权一级代理商 MDT10P258 电话:0755-36857609/27945551/29491882 地址:深圳市宝安区宝源路名优产品采购中心B1区721室 2 oscillator start-up time can be selected 1. General Description This ROM-Based 8-bit micro-controller uses a by programming option: fully static CMOS technology process to EXT-R、RC:150 s,20ms achieve high speed, small size, the low power XT、LF :20ms,80ms 8-bit real time clock/counter(RTCC) with and high noise immunity. On chip memory includes 2K words EPROM, 8-bit programmable prescaler and 80 bytes static RAM. On-chip RC oscillator based Watchdog Timer(WDT) 2. Features The followings are some of the features on the 12 I/O pins with their own independent hardware and software : direction control Fully CMOS static design 12 I/O pins own independent weak 8-bit data bus pull-high and can be enabled by software. On chip EPROM size : 2 K words WDT can be enabled by software if WDT Internal RAM size : 80 bytes Disable is selected in user option. (73 general purpose registers, 7 special registers) 3. Applications 36 single word instructions The application areas of this MDT10P258 are 14-bit instructions from appliance motor control and high speed 2-level stacks automotive to low power remote transmitters Operating voltage : 2.3 V ~ 5.5 V /receivers, pointing devices, and Operating frequency : 0 ~ 20 MHz telecommunications processors. Such as The most fast execution time is 200 ns Remote controller, small instruments, chargers, under 20 MHz in all single cycle toy, automobile and PC peripheral … etc. instructions except the branch instruction Addressing modes include direct, indirect and relative addressing modes Power-on Reset (POR) 4 types of power edge-detector reset: 1.8v , 2.1v , always enable 1.8v and Disable Sleep Mode for power saving 4 types of oscillator can be selected by programming option: RC-Low cost RC oscillator LFXT-Low frequency crystal oscillator XTAL-Standard crystal oscillator EXT-R-Low cost R oscillator This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.1 2010/09 Ver. 1.0 MDT10P258 4. Pin Assignment MDT10P258P11 MDT10P258S11 PA2 1 18 PA1 PA3 2 17 PA0 RTCC 3 16 OSC1 /MCLR 4 15 OSC2 Vss 5 14 Vdd PB0 6 13 PB7 PB1 7 12 PB6 PB2 8 11 PB5 PB3 9 10 PB4 MDT10P258SS11 PA2 PA3 RTCC /MCLR VSS VSS PB0 PB1 PB2 PB3 1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11 PA1 PA0 OSC1 OSC2 VDD VDD PB7 PB6 PB5 PB4 5. Order Information ROM RAM (Words) (Bytes) MDT10P258P11 2K 73 12 MDT10P258S11 2K 73 MDT10P258SS11 2K 73 MARK I/O Timer Package Mil 1 18-DIP 300 mil 12 1 18-SOP 300 mil 12 1 20-SSOP 209 mil (8 bit) This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.2 2010/09 Ver. 1.0 MDT10P258 6. Block Diagram EPROM Two Levels Stack Port PA0~PA3 4 bits RAM 73X8 2048X14 Port A 11 bits 11 bits Program Counter (pull hi) 14 bits Instruction Register Special Register MCLR OSC2 OSC1 Port PB0~PB7 8 bits D0~D7 Port B (pull hi) Oscillator Circuit Instruction Decoder Control Circuit Data 8-bit Power on Reset PED Working Register ALU 8-bit Timer/Counter Prescaler Status Register WDT/OST Timer RTCC This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.3 2010/09 Ver. 1.0 MDT10P258 7. 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 8. 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~0F Internal RAM 10~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. Please visit our web-site for the latest information http://www.mdtic.com.tw http://www.mx mcu.com.cn P.4 2010/09 Ver. 1.0 MDT10P258 (3) PC (Program Counter) : R2 Write PC, CALL --- always 0 JUMP, LJUMP, LCALL --- from instruction word RTWI, RET --- from STACK A10 A9 A8 A7~A0 Write PC, JUMP, CALL --- from STATUS b6 b5 RTWI, RET --- from STACK LJUMP, LCALL – from instruction word Write PC --- from ALU JUMP, CALL, LJUMP, LCALL --- 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. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.5 2010/09 Ver. 1.0 MDT10P258 (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, always read as “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 Prescaler Value 2—0 PS2—0 3 PSC 4 TCE 5 TCS 6 PHEN 7 WDTEN Function 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 Global Pull High Enable bit : 0 — Enable weak internal Pull High 1 — Disable weak internal Pull High This bit will be ignored if the “I/O pull-hi” is disable in user option. Watchdog timer Enable bit : 0 — Enable WDT 1 — Disable WDT This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.6 2010/09 Ver. 1.0 MDT10P258 (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. (10) Set Pull high resistors The Pull high register is “write-only” =“0”, Disable I/O pin Pull high resistor =“1”, Enable I/O pin Pull high resistor Do the CPIO instructions twice within three instructions on the same I/O port, then the second CPIO instruction will set the corresponding pull-hi of I/O pins to enable if the PHEN bit is enable (PHEN=0). Correct instruction sequence to enable pull-high Ex1: LDWI 0FFH CPIO 06H ←First:set PortB to input LDWI 0FFH ←Second CPIO 06H ←Third:enable Pull high of PB0~7 Ex2: LDWI 0FFH CPIO 06H CPIO 06H ←First:set PortB to input ←Second:enable Pull high of PB0~7 Incorrect instruction sequence to enable pull-high Ex1: (over three instructions) LDWI 0FFH CPIO 06H ←First:set PortB to input LDWI 0FFH ←Second NOP ←Third CPIO 06H ←Fourth:set PortB to input Ex2: LDWI CPIO CPIO (Different port) 0FFH 06H ←First:set PortB to input 05H ←set PortA to input (11) EPROM Option by writer programming : OSC Type Ext-R XT LF RC Description Low cost external R oscillator Crystal oscillator Low frequency crystal oscillator Low cost RC oscillator OST Description 150 us\ 20 ms OST= 150 us (for RC) or 20ms (for crystal) 20 ms\80 ms OST= 20 ms (for RC) or 80ms (for crystal) This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.7 2010/09 Ver. 1.0 MDT10P258 WDT Disable Enable PED Disable Low level Mid level L(all on) Security Disable Enable Software WDT Enable Disable Freq x 2 Enable Disable I/O pull-hi Enable Disable CLKOUT Enable Disable Reset on Err Enable Disable Description Watchdog timer disable all the time (can be enabled by software,if software WDT enable) Watchdog timer enable all the time (always enable) Description PED disable 1.8V 2.1V always Enable 1.8V Description Security Disable Security Enable Description WDT can be enabled by software WDT can’t be enabled by software Description System clock is doubled System clock is the oscillation frequency Description Allow software to enable independent I/O pin pull-high Disable all pull-high resistors Description Allow OSC2 to output CLKOUT signal OSC2 will be floating Description The MCU will be reset if two illegal instructions are executed continuously. Disable the illegal instruction reset function (B) Program Memory Address 000-7FF 7FF Description Program memory The starting address of power on, external reset or WDT time-out reset. This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.8 2010/09 Ver. 1.0 MDT10P258 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 -- 1111 1111 1111 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 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 None 011001 trrrrrrr INCR R, t Increment register [R(0~3) R(4~7)]→t R + 1→t Z This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.9 2010/09 Ver. 1.0 MDT10P258 Mnemonic Operands Instruction Code Function Operating Status 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 C, HC, Z 011101 trrrrrrr DECR R, t Decrement register R ﹣W→t or (R+/W+1→t) R ﹣1→t 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 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 C 010101 trrrrrrr RLR R, t Rotate left register C 010000 1xxxxxxx CLRW Clear working register R(n) →R(n-1), C→R(7), R(0)→C R(n)→r(n+1), C→R(0), R(7)→C 0→W 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 None 1010nn nnnnnnnn LJUMP n Long JUMP to address n→PC, PC+1→Stack n→PC 110000 nnnnnnnn CALL n Call subroutine None 110001 iiiiiiii RTWI i Return, place immediate to W n→PC, PC+1→Stack Stack→PC,i→W None 11001n nnnnnnnn JUMP n JUMP to address n→PC None R Z Z 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 : : 0 1 R : C : HC : Z : / : x : i : n : 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 10. Electrical Characteristics This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.10 2010/09 Ver. 1.0 MDT10P258 (Operating temperature at 25℃). Sym Description Condition Vdd Operating voltage VIL VIH IIL VOL Typ Max Unit 2.3 6.0 V Input Low Voltage PA, PB Vdd=5V -0.6 1.0 V RTCC, /MCLR Vdd=5V -0.6 1.0 V PA, PB Vdd=5V 2.0 Vdd V RTCC, /MCLR Vdd=5V 3.3 Vdd V Input leakage current Vdd=5V +/-1 µA Input high Voltage Output Low Voltage PA, PB VOH Min Vdd=5V, IOL=20mA 0.5 V Vdd=5V, IOL=5mA 0.2 V Vdd=5V, IOH= -20mA 3.4 V Vdd=5V, IOH= -5mA 4.5 V 0.1 Output High Voltage PA, PB Islp Sleep current (WDT disable) Vdd=2.3 ~ 6.0 V Islp Sleep current (WDT enable) Vdd=2.3 V 1 A Vdd=3.0 V 1.2 A Vdd=4.0 V 3.0 A Vdd=5.0 V 5.0 A Vdd=6.0 V 10 A Vpr Power Edge-detector Reset Voltage 1.0 A Low level 1.6 1.8 V Mid level 1.9 2.1 V Vdd=2.3 V 28.5 mS Vdd=3.0 V 25.0 mS Vdd=4.0 V 21.9 mS Vdd=5.0 V 20.3 mS Vdd=6.0 V 19.1 mS TFLT /MCLR filter Vdd=5.0 V 600 nS Icc Vdd=5.0v 15 A Twdt The basic WDT time-out cycle time Comparator Supply current (one comparator) Vref Input reference voltage Vdd=2.5v ~6.0 V Vdd-0.8 V This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.11 2010/09 Ver. 1.0 MDT10P258 11. Operating Current Temperature=25 ℃, the typical value as followings : 11.1 OSC Type=RC ﹔WDT-Enable; @Vdd=5.0 V﹔ PED=Disable Cext. (F) 3P 20P 100P 300P Rext. (Ohm) Frequency (Hz) Current (A) 4.7 K 9.16 M 1.40mA 10.0 K 5.6 M 1.00mA 47.0 K 1.44 M 350 A 100.0 K 718.4 K 250 A 300.0 K 245.2 K 200 A 470.0 K 154.8 K 180 A 4.7 K 4.72 M 820µA 10.0 K 2.73 M 550 A 47.0 K 649.6 K 250 A 100.0 K 318.4 K 200 A 300.0 K 107.2 K 170 A 470.0 K 67.6 K 160 A 4.7 K 1.68 M 400 A 10.0 K 934 K 300 A 47.0 K 212.8 K 200 A 100.0 K 103.2 K 175 A 300.0 K 34.6 K 160 A 470.0 K 21.8 K 150 A 4.7 K 716 K 300 A 10.0 K 392.4 K 220 A 47.0 K 87.6 K 170 A 100.0 K 42.4 K 160 A 300.0 K 14.2 K 155 A 470.0 K 8.8 K 145 A This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.12 2010/09 Ver. 1.0 MDT10P258 11.2 OSC Type=LF (OSC1&OSC2 External Cap about 10P); WDT-Disable ; PED=Disable Voltage/Frequency 32 K 455 K (Ext 50P) [email protected] A 1M Sleep 40.0 A <1.0 A 2.3 V 5.6 A 3.0 V 11.5 A 46.1 A 70.0 A <1.0 A 4.0 V 28.7 A 91.3 A 124.5 A <1.0 A 5.0 V 50.0 A 150 A 189.5 A <1.0 A 6.0 V 135.0 A 225.0 A 260.0 A <1.0 A 11.3 OSC Type=XT (OSC1&OSC2 External Cap about 10P); WDT-Enable ;PED=Disable Voltage/Frequency 1M 4M 10 M Sleep 280.0 A <1.0 A 2.1 V 39.0 A 120.0 A 3.0 V 85.0 A 240.0 A 480.0 A 1.2 A 4.0 V 160.0 A 400.0 A 660.0 A 3.0 A 5.0 V 260.0 A 600.0 µA 1.1 mA 5.0 A 6.0 V 400.0 A 840.0 µA 1.5 mA 10.0 A 11.4 OSC Type=EXTR ; WDT-Enable; @ Vdd=5.0 V PED=Enable Rext. (Ohm) 6.2 K 15.0 K 75.0 K Frequency (Hz) Current (A) 2.3V 6.56 M 1.7 m 3.0V 7.10M 1.8 m 4.0V 7.62M 2.8 m 5.0V 7.93 M 3.8 m 5.5V 8.02M 4.3 m 2.3V 3.62 M 750 u 3.0V 3.90M 1.1 m 4.0V 4.09M 1.7 m 5.0V 4.19 M 2.4 m 5.5V 4.22M 2.7 m 2.3V 965.7 K 220 u 3.0V 995.7 K 330 u 4.0V 1.01 M 600 u 5.0V 1.02 M 880 u 5.5V 1.02 M 1.1 m This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.13 2010/09 Ver. 1.0 MDT10P258 Rext. (Ohm) 180.0 K 510.0 K 1.1 M 2.4 M Frequency (Hz) Current (A) 2.3V 417.7 K 100 u 3.0V 424.9 K 185 u 4.0V 428.9 K 380 u 5.0V 431.3 K 640 u 5.5V 432.4 K 790 u 2.3V 154.2 K 45 u 3.0V 155.5 K 110 u 4.0V 156.3 K 280 u 5.0V 157 K 510 u 5.5V 157.3 K 640 u 2.3V 72.8 K 30 u 3.0V 73.2 K 90 u 4.0V 73.6 K 250 u 5.0V 73.9 K 480 u 5.5V 74 K 615 u 2.3V 33.4 K 20 u 3.0V 33.5 K 80 u 4.0V 33.7 K 240 u 5.0V 33.8 K 470 u 5.5V 33.9 K 600 u This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.14 2010/09 Ver. 1.0 MDT10P258 11.5 Power Edge-detector Reset Voltage (Not in Sleep Mode), @ Vdd=5.0 V (PED:Enable) Vpr(Low level)≦1.6~1.8 V Vpr ﹕Vdd (Power Supply) Vpr(Mid level)≦1.9~2.1 V 12. Port A and Port B Equivalent Circuit Control Pull-high Pull high Resistor D C K I/O Control I/O Q Contr ol Latch Q B Port I/O Pin D Data O/P Latch Q G B Write Data Bus Rea d Q D B Data I/P G Latch TTL Input Level Input Resistor This specification are subject to be changed without notice. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.15 2010/09 Ver. 1.0 MDT10P258 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. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.16 2010/09 Ver. 1.0 MDT10P258 14. External Capacitor Selection For Crystal Oscillator @ Vdd=5.0 V Osc. Type XT LF XT Oscillator Mode Capacity Range 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 Ext-R Oscillator Mode LF Oscillator Mode MDT10P258 OSC1 Resonator Freq. MDT10P258 OSC2 OSC1 OSC2 RC Oscillator Mode MDT10P258 OSC1 OSC2 Fosc/4 C1 C2 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. Please visit our web-site for the latest information http://www.mx mcu.com.cn http://www.mdtic.com.tw P.17 2010/09 Ver. 1.0