MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 1. General Description 3. Applications The application areas of this MDT10F676 range This 8-bit Micro-controller uses a fully static from appliance motor control and high speed CMOS technology to achieve high speed, small automotive size, low power and high noise immunity. transmitters/receivers, On chip memory includes 1 K words of Flash telecommunications processors, such as Remote ROM, and 128 bytes of EEPROM, and 64 bytes controller, of static RAM. automobile and PC peripheral … etc. 2. Features 8-bit data bus On chip flash ROM size : -- 1 K words Internal RAM size : MDT10F676 small low power pointing instruments, remote devices, chargers, and toy, 4. Pin Assignment Fully CMOS static design MDT10F676 to -- 64 bytes (64 general purpose registers) 128 bytes of EEPROM MDT10F676P11 (DIP) MDT10F676S11 (SOP) Vdd OSC1/PA5 OSC2/PA4 PA3 PC5 PC4 PC3 1 2 3 4 5 6 7 14 13 12 11 10 9 8 Vss PA0/CIN+ PA1/CINPA2/INT PC0 PC1 PC2 37 single word instructions 14-bit instructions 8-level stacks Operating voltage : 2.3V ~ 5.5 V Watchdog timer with on-chip RC oscillator Interrupt capability A/D converter module: 8 analog input multiplexed into one A/D converter with 10-bit resolution Timer0 : 8-bit timer with 3-bit prescaler Timer1 : 16-bit timer with 2-bit prescaler One analog comparator module Sleep mode for power saving PA with port change wake-up interrupt Power-on Reset 12 I/O pins with their own independent direction control This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 1/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 5. Order Information ROM RAM EEPROM (Words) (Bytes) (Bytes) MDT10F676P11 1.0K 64 128 MDT10F676S11 1.0K 64 128 Device A/D & Timer Comparators (8/16 bit) 12 1/1 1/1 14-DIP 12 1/1 1/1 14-SOP I/O Package Remark 6. Block Diagram EEPROM 128×8 Stack Eight Levels 8 bits Program Counters Flash ROM 1024 ×14 10 bits 14 bits Instruction Register Comparator RAM 64 ×8 PA3 Port A Special Register PA0~PA2 PA4~PA5 5 bits A/D converter Oscillator circuit Instruction Decoder Control Circuit Data 8bit Port C AN0 | AN7 PC0~PC5 6 bits D0~D7 TMR0 8 Bits Power on Reset Power Down Reset Working Register Watchdog Timer ALU Status Register TMR1 16 Bits This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 2/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 7. Pin Function Description Pin Name I/O PA0/CIN+/AN0 I/O Function Description Port A, TTL input level, with program pull_hi and interrupt on pin change. Comparator input. A/D Channel 0 input. PA1/CIN-/AN1 I/O Port A, TTL input level, with program pull_hi and interrupt on pin change. Comparator input. A/D Channel 1 input. PA2/T0CK/INT/COUT I/O Port A, TTL input level, with program pull_hi and interrupt on pin change. Timer0 clock input. /AN2 External interrupt. Comparator output. A/D Channel 2 input. PA3/MCLR I Port A, TTL input level, with program interrupt on pin change. Master clear. Schmitt Trigger input level. PA4/OSC2/T1G/AN3 I/O Port A, TTL input level, with program pull_hi and interrupt on pin change. Oscillator crystal output, in RC mode clock output Fosc/4 frequency. Timer1 gate. A/D Channel 3 input. PA5/OSC1/T1CKI I/O Port A, TTL input level, with program pull_hi and interrupt on pin change. Oscillator crystal input/external clock source input. Timer1 clock input. PC0/AN4 I/O Port C, TTL input level. A/D Channel 4 input. PC1/AN5 I/O Port C, TTL input level. A/D Channel 5 input. PC2/AN6 I/O Port C, TTL input level. A/D Channel 6 input. PC3/AN7 I/O Port C, TTL input level. A/D Channel 7 input. PC4~5 I/O Port C, TTL input level. Vdd Power supply Vss Ground This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 3/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 8. Memory Map 8.1 Program memory : 0000H Reset Vector 0001H 0002H 0003H 0004H Peripheral interrupt Vector 0005H Program memory 03FFH This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 4/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 8.2 MDT10F676 Register file map : Address BANK 0 00 01 02 03 04 05 06 07 08~09 0A 0B 0C 0D 0E 0F 10 11 12~14 15 16 17~18 19 1A 1B 1C 1D 1E 1F 20~5F Description IAR RTCC PCL STATUS MSR PORT A IAR TMR PCL STATUS MSR CPIO A PORT C CPIO C PCHLAT INTS PIFB1 PCHLAT INTS PIEB1 TMR1L TMR1H T1STA PSTA INOSCR ADINS PAPHR PAINTR CMSTA ADRESH ADS0 64 Genreal Register VRSTA EEDATA EEADR EECON1 EECON2 ADRESL ADS1 Mapped in Bank0 60~7F Address BANK 1 80 81 82 83 84 85 86 87 88~89 8A 8B 8C 8D 8E 8F 90 91 92~94 95 96 97~98 99 9A 9B 9C 9D 9E 9F A0~DF E0~FF Unimplemented memory location. This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 5/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com (1). 00H or 80H : IAR ( Indirect Address Register) Use contents of MSR to address data memory (not a physical register) (2). 01H : RTCC (Timer0 Counter). 8-bit real time clock/counter (3). 02H or 82H : PCL (Program Counter Low Byte) Low order 8 bits of the Program Counter (PC) (4). 03H or 83H : STATUS (Status register). 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 time-out Flag bit 5 page Register page select bit : 0 : 00H --- 7FH 1 : 80H --- FFH General purpose bit —— 6—7 (5). 04H or 84H : MSR (Memory Select Register) Memory Bank Select Register : 0 : 00~7F (Bank0) 1 : 80~FF (Bank1) MSR Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Indirect Addressing Mode (6). 05H : Port A data output register. Port A Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - PA5 PA4 PA3 PA2 PA1 PA0 Bit 7-6 : Unimplemented Bit 5-0 : PA5~PA0, I/O Register (7). 06H : Unimplemented Register. (8). 07H : Port C data output register This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 6/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com Port C MDT10F676 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 (9). 08 ~ 09H : Unimplemented Register. (10). 0AH or 8AH : Program counter high byte. PCHLAT Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - - PCH4 PCH3 PCH2 PCH1 PCH0 (11). 0BH or 8BH : Interrupt control register. INTS Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 GIS PEIE TIS INTS PAIE TIF INTF PAIF GIS : Global Interrupt Enable Bit. 0 = Disable all interrupts 1 = Enable all un-masked interrupts PEIE : Peripheral Interrupt Enable Bit. 0 = Disable all peripheral interrupts 1 = Enable all peripheral interrupts TIS : TMR0 Overflow Interrupt Enable Bit. 0 = Disable the Timer0 interrupt 1 = Enable the Timer0 interrupt INTS : PA2/INT Interrupt Enable Bit. 0 = Disable the PA2/INT interrupt 1 = Enable the PA2/INT interrupt PAIE : PA Port Change Interrupt Enable Bit. 0 = Disable the PA port change interrupt 1 = Enable the PA port change interrupt TIF : TMR0 Overflow Interrupt Flag Bit. 0 = Timer0 did not overflowed 1 = Timer0 has overflowed (must be cleared in software) INTF : PA2/INT Interrupt Flag Bit. 0 = The PA2/INT interrupt did not occur 1 = The PA2/INT interrupt occurred PAIF : PA Port Change Interrupt Flag Bit. 0 = None of the PA5~0 pins have changed state 1 = When at least one of the PA5~0 pins changed state (must be cleared in software) This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 7/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com (12). 0CH : Peripheral interrupt register. PIFB1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EEIF - - - CMIF - - TMR1IF EEIF : EEPROM Write Operation Interrupt Flag Bit. 0 = The EEPROM write operation is not completed or has not been start 1 = The EEPROM write operation completed (must be cleared in software) CMIF : Comparator Interrupt Flag Bit. 0 = Comparator input has not changed 1 = Comparator input has changed (must be cleared in software) TMR1IF : TMR1 Overflow Interrupt Flag Bit. 0 = Timer1 register did not overflow 1 = Timer1 register overflowed (must be cleared in software) (13). 0DH : Unimplemented register. (14). 0EH : TMR1L (The timer1 LSB register) The LSB of the 16-bit TMR1. (15). 0FH : TMR1H (The timer1 MSB register) The MSB of the 16-bit TMR1. (16). 10H : Timer1 control register. Bit 7 T1STA - Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 TMR1GE T1CKPS1 T1CKPS1 T1OSCEN /T1SYNC TMR1CLK TMR1ON TMR1GE : Timer1 Gate Enable Bit. If TMR1ON = 0 this bit is ignored If TMR1ON = 1 0 = Timer1 is on 1 = Timer1 is on if /T1G pin is low T1CKPS1 & T1CKPS0: Timer1 Input Clock Prescale Select bits. 0 0 = 1 : 1 Prescale value 0 1 = 1 : 2 Prescale value 1 0 = 1 : 4 Prescale value 1 1 = 1 : 8 Prescale value T1OSCEN : LF Oscillator Enable Bit. If INTOSC without CLKOUT oscillator is active : 0 = LP oscillator is off 1 = LP oscillator is enabled for Timer1 clock /T1SYNC : Timer1 External Clock Input Synchronization Control Bit. If TMR1CLK = 0 this bit is ignored Timer1 use internal clock If TMR1CLK = 1 0 = Synchronize external clock input 1 = Do not synchronize external clock input TMR1CLK : Timer1 Clock Source Select Bit. This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 8/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 0 = Select internal clock Fosc/4 1 = Select External clock from T1CKI pin (on rising edge) TMR1ON : TMR1 On Bit. 0 = Stop Timer1 1 = Enable Timer1 (17). 11 ~ 18H : Unimplemented register. (18). 19H : Comparator control register. Bit 7 CMSTA - Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - CMOINV CMIS CMP2 CMP1 CMP0 CMOUT CMOUT : Comparator Output Bit. When CMOINV = 0 1 = Vin+ > Vin- ; 0 = Vin+ < VinWhen CMOINV = 1 1 = Vin+< Vin- ; 0 = Vin+ > VinCMOINV: Comparator Output Inversion Bit. 0 = Output not inverted 1 = Output inverted CMIS: Comparator Input Switch Bit. When CMP2 ~ 0 = 110 or 101 : 0 = Vin- connects to CIN1 = Vin- connects to CIN+ CMP2 ~ 0: Comparator Mode Bits. 0 0 0 = Comparator reset (POR default value – low power) 0 0 1 = Comparator with output 0 1 0 = Comparator without output 0 1 1 = Comparator with output and internal reference (Cvref in 99H register) 1 0 0 = Comparator without output and with internal reference (Cvref in 99H register) 1 0 1 = Comparator multiplexed input with internal reference (Cvref in 99H register) and output 1 1 0 = Comparator multiplexed input with internal reference (Cvref in 99H register) 1 1 1 = Comparator off (lowest power) (19). 1A ~ 1DH : Unimplemented register. (20). 1EH : Most A/D result register. A/D result most 8 bits or 2 bits (21). 1FH : A/D control register 0. Bit 7 ADS0 ADFM Bit 6 ADVRS Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - CHS2 CHS1 CHS0 G0/DONE ADRUN ADFM : A/D result formed select bit. 0 = Left justified 1 = Right justified ADVRS : A/D voltage referece bit. This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 9/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 0 = Vdd 1 = Vref pin CHS2 ~ 0: Analog channel select bits. 0 0 0 = Channel AN0 (PA0) 0 0 1 = Channel AN1 (PA1) 0 1 0 = Channel AN2 (PA2) 0 1 1 = Channel AN3 (PA4) 1 0 0 = Channel AN4 (PC0) 1 0 1 = Channel AN5 (PC1) 1 1 0 = Channel AN6 (PC2) 1 1 1 = Channel AN7 (PC3) GO/DONE : A/D conversion status bit. 0 = A/D conversion completed/not in progress 1 = A/D conversion cycle in progress. Setting this bit start A/D conversion cycle. This bit is automatically cleared by hardware when A/D has completed. ADRUN : A/D conversion enable bit. 0 = A/D converter is shut-off. 1 = A/D converter operating. (22). 81H : Option control register. Bit 7 TMR /PAPH Bit Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 IES TCS TCE PSC PS2 PS1 PS0 Symbol 2—0 PS2—0 3 PSC 4 TCE 5 TCS 6 IES 7 /PAPH Function Prescaler Value TMR0 rate 1:2 0 0 0 1:4 0 0 1 1:8 0 1 0 1 : 16 0 1 1 1 : 32 1 0 0 1 : 64 1 0 1 1 : 128 1 1 0 1 : 256 1 1 1 Prescaler assignment bit : 0 — PA2/INT 1 — Watchdog Timer RTCC signal Edge : 0 — Increment on low-to-high transition on PA2 pin 1 — Increment on high-to-low transition on PA2 pin RTCC signal set : 0 — Internal instruction cycle clock 1 — Transition on PA2/INT pin PA2 interrupt edge select bit : 0 — Interrupt on falling edge of PA2/INT pin 1 — Interrupt on rising edge of PA2/INT pin Port A Pull-up Enable Bit : 0 — PA0~2 & PA4~5 pull-up all enable 1 — PA0~2 & PA4~5 pull-up all disable WDT rate 1:1 1:2 1:4 1:8 1 : 16 1 : 32 1 : 64 1 : 128 This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 10/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 (23). 85H : Port A input/output control register. Bit 7 CPIO A - Bit 6 - Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 CPIO PA5 CPIO PA4 CPIO PA3 CPIO PA2 CPIO PA1 CPIO PA0 (24). 86H : Unimplemented register. (25). 87H : Port A input/output control register. Bit 7 CPIO C Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 CPIO PC7 CPIO PC6 CPIO PC5 CPIO PC4 CPIO PC3 CPIO PC2 CPIO PC1 CPIO PC0 (26). 88 ~ 89H : Unimplemented register. (27). 8CH : Peripheral interrupt enable register. PIEB1 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EEIE - - - CMIE - - TMR1IE EEIE : EEPROM Write Operation Interrupt Enable Bit. 0 = Disable the EEPROM write complete interrupt 1 = Enable the EEPROM write complete interrupt CMIE : Comparator Interrupt Enable Bit. 0 = Disable the comparator interrupt 1 = Enable the comparator interrupt TMR1IE : TMR1 Overflow Interrupt Enable Bit. 0 = Disable the TMR1 overflow interrupt 1 = Enable the TMR1 overflow interrupt (28). 8DH : Unimplemented register. (29). 8EH : Power control register. PSTA Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - - - - - PORB - PORB : Power On Reset Status Bit. 0 = A power on reset occurred (must be set in software after a power on reset occurs) 1 = No power on reset occurred (30). 8FH : Unimplemented register. (31). 90H : MCU oscillator control register. INOSCR Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - REG REG REG ECKIN OSO2E OSC2O OSCIN This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 11/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 Bit6 ~ 4 : Normal register bits. ECKIN : External Clock Input Enable Bit. 0 = Disable oscillator external clock input 1 = Enable oscillator external clock input (must be set in external oscillator of RC mode ) OSO2E : Both of Internal and external oscillator Enable Bit. 0 = Only use internal oscillator or external oscillator 1 = Internal and external (LF mode only) oscillator enable both OSC2O : OSC2/PA4 Oscillator Clock Output Enable Bit. 0 = Disable OSC2/PA4 oscillator clock output in internal or external of RC mode oscillator 1 = Enable OSC2/PA4 oscillator clock output in internal or external of RC mode oscillator OSCIN : MCU Internal Or external oscillator Select Bit. 0 = Default the MCU clock based on internal 4MHz oscillator 1 = The MCU clock based on external oscillator (type from option select), When internal 4MHz oscillator change to external oscillator must wait OST time 20ms. (32). 91H : Unimplemented register. ADINS Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 ANS7 ANS6 ANS5 ANS4 ANS3 ANS2 ANS1 ANS0 ANS7~0 : Analog select analog or digital function on pins AN7~0. 0 = Digital I/O 1 = Analog input (33). 92 ~ 94H : Unimplemented register. (34). 95H : Port A pull_hi control register. Bit 7 PAPHR - Bit 6 - Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PAH5 PHA4 - PHA2 PHA1 PHA0 Bit 5-4 & Bit 2-0 : Port A Pull_hi Control Bits 0 = Pull_hi disable 1 = Pull_hi enable (35). 96H : Port A interrupt-on-change control register. Bit 7 PAINTR - Bit 6 - Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 PINTA5 PINTA4 PINTA3 PINTA2 PINTA1 PINTA0 Bit 5-0 : Port A Interrupt-On-Change Control Bits 0 = Interrupt-on-change disable 1 = Interrupt-on-change enable This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 12/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 (36). 97 ~ 98H : Unimplemented register. (37). 99H : Voltage reference control register. Bit 7 VRSTA CVREN Bit 6 - Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 CVRRS - CVR3 CVR2 CVR1 CVR0 Bit 7 : Comparator Voltage Reference Enable Bit 0 = Comparator voltage reference disable 1 = Comparator voltage reference enable Bit 5 : Comparator Voltage Reference Range Select Bit 0 = High range ; CVref = Vdd/4 + (CVR3:CVR0/32)*Vdd 1 = Low range ; CVref = (CVR3:CVR0/24)*Vdd Bit 3-0 : Comparator Voltage Reference Value Selection When CVRRS = 0, CVref = Vdd/4 + (CVR3:CVR0/32)*Vdd When CVRRS = 1, CVref = (CVR3:CVR0/24)*Vdd (38). 9AH : EEPROM data register. EEDATA Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EED7 EED6 EED5 EED4 EED3 EED2 EED1 EED0 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EEAD5 EEAD4 EEAD3 EEAD2 EEAD1 EEAD0 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - WRERR WREN WR RD (39). 9BH : EEPROM address register. Bit 7 EEADR - Bit 6 EEAD6 (40). 9CH : EEPROM control register 1. Bit 7 EECON1 - Bit 6 - Bit 7~4 is unimplemented : Read as “0” WRERR : EEPROM Write Error Flag Bit. 0 = The EEPROM write operation completed 1 = The EEPROM write operation is prematurely terminated (any MCLR reset or any WDT reset during normal operation) WREN : EEPROM Write Enable Bit. 0 = Inhibits write to the data EEPROM 1 = Allows write cycles WR : Write Control Bit. 0 = Write cycle to the data EEPROM is complete 1 = Initiates a write cycle. (The bit is cleared by hardware once write is complete. The WR bit can only be set (not clear) in software.) RD : Read Control Bit. This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 13/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com MDT10F676 0 = Does not initiate an EEPROM read. 1 = Initiates an EEPROM read (read takes once cycle. RD is cleared in hardwave. The RD bit can only be set (not clear) in software.) (41). 9DH : EEPROM control register 2. Bit 7 EECON2 - Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - - - - - - Write only ; Read as “0” When write data to the EEPROM must write 55/H to EECON2, and writ AA/H to EECON2 then set WR bit; the EEPROM can write data inside for write each byte. Example : Data EEPROM Write BSR BCR BSR LDWI STWR LDWI STWR BSR STATUS, PAGE INTS, GIS EECON1, WREN 55H EECON2 0AAH EECON2 EECON1, WR ; Select bank1 ; Disable interrupt ; Enable write ; Write 55/H ; Write AA/H ; Begin write (42). 9EH : Least A/D result register. A/D result least 8 bits or 2 bits (43). 9FH : A/D control register 0. Bit 7 ADS0 - Bit 6 ASCS2 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 ASCS1 ASCS0 - - - - ASCS2 ~ 0 : A/D conversion clock select bits. 0 0 0 = Fosc/2 0 0 1 = Fosc/8 0 1 0 = Fosc/32 X 1 1 = Select by external oscillator mode RC & LF = Fosc/2; XT = Fosc/8; HF = Fosc/32 1 0 0 = Fosc/4 1 0 1 = Fosc/16 1 1 0 = Fosc/64 This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 14/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com ASCS2,0 TAD Oscillator Minimum Oscillator Maximum frequency TAD frequency TAD Type 000 Fosc / 2 1M Hz 2us 200K Hz 10us LF,RC 001 Fosc / 8 4M Hz 2us 1M Hz 8us XT 010 Fosc /32 20M Hz 1.6us 4M Hz 8us HF 100 Fosc / 4 2M Hz 2us 250K Hz 8us LF,RC 101 Fosc /16 8M Hz 2us 2M Hz 8us XT 110 Fosc /64 20M Hz 3.2us 8M Hz 8us HF X11 RC:Fosc / 2 1M Hz 2us 200K Hz 10us RC LF:Fosc / 2 1M Hz 2us 200K Hz 10us LF XT:Fosc / 8 4M Hz 2us 1M Hz 8us XT HF:Fosc/32 20M Hz 1.6us 4M Hz 8us HF Remark The A/D conversion clock (1/TAD) must be select to ensure a TAD between minimum 1.6us and maximum 8us 9. Reset Condition for all Registers Power-On Reset, Register Address Power range /MCLR or WDT Reset Wake-up from SLEEP detector Reset IAR 00h(80h) 0000 0000 0000 0000 uuuu uuuu RTCC 01h xxxx xxxx uuuu uuuu uuuu uuuu PCL 02h(82h) 0000 0000 0000 0000 0000 0100 STATUS 03h(83h) 0001 1xxx 000# #uuu 000# #uuu MSR 04h(84h) xxxx xxxx uuuu uuuu uuuu uuuu PORT A 05h --xx xxxx --uu uuuu --uu uuuu PORT C 07h xxxx xxxx uuuu uuuu uuuu uuuu PCHLAT 0Ah(8Ah) ---0 0000 ---0 0000 ---u uuuu INTS 0Bh(8Bh) 0000 0000 0000 0000 uuuu uuuu PIFB1 0Ch 0--- 0--0 0--- 0--0 u--- u--u TMR1L 0Eh xxxx xxxx uuuu uuuu uuuu uuuu TMR1H 0Fh xxxx xxxx uuuu uuuu uuuu uuuu T1STA 10h -000 0000 -000 0000 -uuu uuuu CMSTA 19h -0-0 0000 -0-0 0000 -u-u uuuu ADRESH 1Eh xxxx xxxx uuuu uuuu uuuu uuuu ADS0 1Fh 00-0 0000 00-0 0000 uu-u uuuu TMR 81h 1111 1111 1111 1111 uuuu uuuu CPIO A 85h --11 1111 --11 1111 --uu uuuu This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 15/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com Power-On Reset, Register Address Power range /MCLR or WDT Reset Wake-up from SLEEP detector Reset CPIO C 87h 1111 1111 1111 1111 uuuu uuuu PIEB1 8Ch 0--- 0--0 0--- 0--0 u--- u--u PSTA 8Eh ---- --#- ---- --u- ---- --u- INOSCR 90h -000 0000 -000 0000 -uuu uuuu ADINS 91h 1111 1111 1111 1111 uuuu uuuu PAPHR 95h --11 -111 --11 -111 --uu -uuu PAINTR 96h --00 0000 --00 0000 --uu uuuu VRSTA 99h 0-0- 0000 0-0- 0000 u-u- uuuu EEDATA 9Ah 0000 0000 0000 0000 uuuu uuuu EEADR 9Bh -000 0000 -000 0000 -uuu uuuu EECON1 9Ch ---- x000 ---- #000 ---- #uuu EECON2 9Dh ---- ---- ---- ---- ---- ---- ADRESL 9Eh xxxx xxxx uuuu uuuu uuuu uuuu ADS1 9Fh -000 ---- -000 ---- -uuu ---- Note : “ x “=unknown; “ u “=unchanged; “ – “=unimplemented, read as “0”; “# “=value depends on condition 10. Instruction Set Instruction Code Mnemonic Operands Function Operation 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 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 011101 trrrrrrr DECR R, t 011110 trrrrrrr 010010 trrrrrrr Decrement register R ﹣ W→t (R+/W+1→t) R ﹣1→t Z DECRSZ R, t Decrement register, skip if zero R ﹣1→t None ANDWR R, t AND W and register R ∩ W→t Z C, HC, Z This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 16/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0 MDT10F676 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 110100 iiiiiiii Mnemonic Operands ANDWI I 010011 trrrrrrr Instruction Code Function Operation Status AND W and immediate I ∩ W→W Z 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 010101 trrrrrrr RLR R, t Rotate left register 010000 1xxxxxxx CLRW 010001 0rrrrrrr CLRR 0000bb brrrrrrr BCR 0010bb brrrrrrr BSR 0001bb brrrrrrr 0011bb brrrrrrr R(n) →R(n-1), C→R(7), R(0)→C R(n)→r(n+1), C→R(0), R(7)→C C C Clear working register 0→W Z Clear register 0→R Z R, b Bit clear 0→R(b) None R, b Bit set 1→R(b) None BTSC R, b Bit Test, skip if clear Skip if R(b)=0 None BTSS R, b Bit Test, skip if set Skip if R(b)=1 None None None R 100nnn nnnnnnnn LCALL N Long CALL subroutine N→PC, PC+1→Stack 101nnn nnnnnnnn LJUMP N Long JUMP to address N→PC 110001 iiiiiiii RTIW I Return, place immediate to W 110111 iiiiiiii ADDWI I Add immediate to W 111000 iiiiiiii SUBWI I Subtract W from immediate I-W→W C,HC,Z 010000 00001001 RTFI Return from interrupt Stack→PC, 1→GIS None 010000 00000100 RET Return from subroutine Stack→PC None Stack→PC, I→W PC+1→PC, W+I→W None C,HC,Z 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 : 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 Half carry This specification is subject to be changed without notice. Please visit our web site for the most updated information. http://www.mdtic.com.tw 17/17 国内A级代理商:深圳市英锐恩科技有限公司,WEB:www.enroo.com 11/02/2007 Ver. 1.0