Page 2 - Trademark Acknowledgments:; ELAN and ELAN logo; Copyright; 007 by ELAN Microelectronics Corporation; http
Trademark Acknowledgments: IBM is a registered trademark and PS/2 is a trademark of IBM. Windows is a trademark of Microsoft Corporation. ELAN and ELAN logo are trademarks of ELAN Microelectronics Corporation. Copyright © 2007 by ELAN Microelectronics Corporation All Rights Reserved Printed in Taiwa...
Page 3 - Contents; General
Contents Product Specification (V1.0) 10.19.2007 • iii (This specification is subject to change without further notice) Contents EM78P221/2N-V Package version.................................................................................... 1 EM78P221/2N-U Package version ............................
Page 4 - iv; and
Contents iv • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.27 Bank 2-R8 (Operating Mode Control Register) .................................................19 6.2.28 Bank 2-R9~RF (Reserve)....................................................
Page 5 - APPENDIX; A Package; Trap
Contents Product Specification (V1.0) 10.19.2007 • v (This specification is subject to change without further notice) 7 Absolute Maximum Ratings ................................................................................... 53 8 DC Electrical Characteristics .......................................
Page 6 - vi; Specification Revision History; Revision Description; version
Contents vi • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) Specification Revision History Doc. Version Revision Description Date 0.9 Preliminary version 2007/03/20 1.0 Initial released version 2007/10/19
Page 7 - -Bit Microcontroller with OTP ROM; Comparison between V-Package and U-Package version
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 1 (This specification is subject to change without further notice) Read Me First ! Comparison between V-Package and U-Package version This series of microcontrollers comprise of the older V-package version and t...
Page 9 - Pin Assignment
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 3 (This specification is subject to change without further notice) 3 Pin Assignment (1) 28-Pin DIP/SOP/SSOP P70 VSS P67 P57 P56/TCC P53/OSCI P52/OSCO VDD P81//RESET P72/CIN+ P73/CIN- P71/CO/INT1 P64 P65 P66 P55 ...
Page 10 - Description; Symbol
EM78P221/2N 8-Bit Microcontroller with OTP ROM 4 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 4 Pin Description 4.1 EM78P222N Symbol Pin No. Type Function P50~P57 1~2 11~12 17~18 26~27 I/O 8-bit General purpose input/output pins Default v...
Page 12 - Block
EM78P221/2N 8-Bit Microcontroller with OTP ROM 6 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 5 Block Diagram ROM R3 (Status Reg.) ACC Instruction Decoder Instruction Register ALU PC Interrupt Circuit 8-level stack (13 bit) Interrupt Cont...
Page 13 - Function; Register Configuration; Address
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 7 (This specification is subject to change without further notice) 6 Function Description 6.1 Register Configuration Address Bank 0 Registers Bank 1 Registers Bank 2 Registers Bank 3 Registers 00 R0 (Indirect Ad...
Page 14 - Registers Description; INTE INT TS; TCC Rate
EM78P221/2N 8-Bit Microcontroller with OTP ROM 8 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2 Registers Description 6.2.1 A (Accumulator) Internal data transfer operation, or instruction operand holding usually involves the temporary ...
Page 15 - Addressing Register); Registers Description; Memory; Register Configuration
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 9 (This specification is subject to change without further notice) 6.2.3 R0 (Indirect Addressing Register) R0 is not a physically implemented register. Its major function is to perform as an indirect address poi...
Page 16 - DC; NOTE; Auxiliary carry flag
EM78P221/2N 8-Bit Microcontroller with OTP ROM 10 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) "JMP" instruction allows direct loading of the lower 10 program counter bits. Thus, "JMP" allows PC to jump to any location wit...
Page 17 - used to select registers (Address
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 11 (This specification is subject to change without further notice) 6.2.7 R4 (Select Indirect Address) Bits 7~6: not used, fixed to 0 all the time. Bit 5 ~ Bit 0: used to select registers (Address : 00 ~ 3F) in ...
Page 18 - EX1IF 0 0 ICWE 0 CMPWE 0 CMPIF; ICIF
EM78P221/2N 8-Bit Microcontroller with OTP ROM 12 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.13 Bank 0-RE (WUCR: Wake-up Control Register) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EX1IF 0 0 ICWE 0 CMPWE 0 CMPIF Bit 7 (EX1IF):...
Page 19 - with instruction “ENI”.
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 13 (This specification is subject to change without further notice) Bit 1 (ICIF): Port 6 input status change interrupt flag. Set when Port 6 input changes. Reset by software. 0 = no interrupt occurs 1 = with int...
Page 20 - CMPOUT CMPCOS1 CMPCOS0; EIS0 and EIS1 are both readable and writable.; CMPCOS1; Used as OP and P71 is OP output pin (CO)
EM78P221/2N 8-Bit Microcontroller with OTP ROM 14 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.17 Bank 1-R9 (Reserve) Bits 7~0: not used, fixed to 0 all the time 6.2.18 Bank 1-RA (CMPCON: Comparator Control Register) Bit 7 Bit 6 Bit 5...
Page 22 - WDTE 0 PSWE
EM78P221/2N 8-Bit Microcontroller with OTP ROM 16 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.21 Bank 1-RD (Pull-high Control Register) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 /PH7 /PH6 /PH5 /PH4 /PH3 /PH2 /PH1 /PH0 Bank 1-RD...
Page 23 - WDT Rate; EXIE; RF register is both readable and writable.
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 17 (This specification is subject to change without further notice) Bit 4 ~ Bit 2 (PSW2 ~ PSW0): WDT prescaler bits PSW2 PSW1 PSW0 WDT Rate 0 0 0 1:2 0 0 1 1:4 0 1 0 1:8 0 1 1 1:16 1 0 0 1:32 1 0 1 1:64 1 1 0 1:...
Page 24 - HDxx
EM78P221/2N 8-Bit Microcontroller with OTP ROM 18 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.24 Bank 2-R5 (HDCR: High Drive Control Register for Port 6) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 HD67 HD66 HD65 HD64 HD63 HD62 H...
Page 25 - register to “1” and clear Bit 4 of R8 register to “0”.
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 19 (This specification is subject to change without further notice) 6.2.26 Bank 2-R7 (HSCR2: High Sink Control Register for Port 6) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 HS67 HS66 HS65 HS64 HS63 HS62 H...
Page 26 - Bit; IRC calibration bits in IRC oscillator mode.
EM78P221/2N 8-Bit Microcontroller with OTP ROM 20 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.2.30 Bank 3-R6 (IRC Control)-only for ICE Bit 7 6 5 4 3 2 1 0 EM78P221/2N ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ICE220N C3 C2 C1 C0 RCM1 RCM0 ‘0’ ‘...
Page 27 - NRHL; Noise rejection enable; VDD Reset Level
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 21 (This specification is subject to change without further notice) 6.2.31 Bank 3-R7 (Noise and LVR Control) - only for ICE Bit 7 6 5 4 3 2 1 0 EM78P221/2N ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ‘0’ ICE220N “0” “0” “0” “0”...
Page 28 - The internal TCC will stop running when in sleep mode.
EM78P221/2N 8-Bit Microcontroller with OTP ROM 22 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.3 TCC/WDT and Prescaler There are two 8-bit counters available as prescalers for the TCC and WDT. The PST0~PST2 bits of the CONT register are...
Page 31 - Usage of Port 6 Input Status Change Wake-up/Interrupt; Next instruction
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 25 (This specification is subject to change without further notice) /SLEP T17 T10T11 ICIE Interrupt ENI Instruction DISI Instruction Interrupt (Wake-up from SLEEP) Next Instruction (Wake-up from SLEEP) CLK CLK C...
Page 34 - Select WDT prescaler and disable WDT; Wake-up and Interrupt Modes Operation Summary; Sleep Mode
EM78P221/2N 8-Bit Microcontroller with OTP ROM 28 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) If Port 6 Input Status Change Interrupt is used to wake up the EM78P221/2N (as in Case b above), the following instructions must be executed be...
Page 35 - Signal
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 29 (This specification is subject to change without further notice) The controller can be awakened from sleep mode and idle mode. The wake-up signals are listed as follows: Signal Sleep Mode Normal Mode DISI + B...
Page 36 - Register Initial Values after Reset
EM78P221/2N 8-Bit Microcontroller with OTP ROM 30 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.5.1.2 Register Initial Values after Reset The following table summarizes the registers initialized values. Address Name Reset Type Bit 7 Bit ...
Page 40 - Fig. 6-7 Controller Reset Block Diagram
EM78P221/2N 8-Bit Microcontroller with OTP ROM 34 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) Address Name Reset Type Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Bit Name - - - - NRHL NRE LVR1 LVR0- Power-on U U U U 1 1 1 1 /RESET &a...
Page 41 - The T and P Status under Status Register; A reset condition is initiated by one of the following events; Reset Type; The following shows the events that may affect the status of T and P.; Event
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 35 (This specification is subject to change without further notice) 6.5.2 The T and P Status under Status Register A reset condition is initiated by one of the following events : 1. Power-on reset 2. /RESET pin ...
Page 42 - The EM78P221/2N has four interrupts as listed below
EM78P221/2N 8-Bit Microcontroller with OTP ROM 36 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.6 Interrupt The EM78P221/2N has four interrupts as listed below : 1. TCC overflow interrupt 2. Port 6 Input Status Change Interrupt 3. Extern...
Page 44 - External Reference Signal; The reference signal must be between Vss and Vdd.; Outputs; The compared result is stored in the CMPOUT of Bank 1-RA.
EM78P221/2N 8-Bit Microcontroller with OTP ROM 38 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.7 Comparator The EM78P221/2N has one comparator comprising of two analog inputs and one output. The comparator can be utilized to wake up the...
Page 45 - The CO and P71of the P71/CO pins cannot be used at the same time.; The following figure shows the Comparator Output block diagram.; Fig. 6-11 Comparator Output Configuration; Using a Comparator as an Operation Amplifier; ICWE 0 CMPWE 0 CMPIF; Comparator wake-up enable bit; High
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 39 (This specification is subject to change without further notice) NOTE ■ The highest priority of P71/INT1/CO is INT1. When EIS1=0, the working type of P71/INT1/CO is determined by CMPCOS1 and CMPCOS2. ■ The CO...
Page 46 - CMPCOS1 CMPCOS0; Interrupt
EM78P221/2N 8-Bit Microcontroller with OTP ROM 40 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.7.3.2 Bank 1-RA (CMPCON: Comparator Control Register) Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 EIS1 EIS0 CMPOUT CMPCOS1 CMPCOS0 0 0 0 ...
Page 47 - Oscillator Modes; ERC; Conditions; Two clocks; OSCI; Clock in
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 41 (This specification is subject to change without further notice) 6.8 Oscillator 6.8.1 Oscillator Modes The EM78P221/2N can be operated in six different oscillator modes, such as High Crystal oscillator mode (...
Page 48 - Crystal; RS; is connected between OSCI and; Oscillator Type; LXT
EM78P221/2N 8-Bit Microcontroller with OTP ROM 42 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) In most applications, Pin OSCI and Pin OSCO can be connected with a crystal or ceramic resonator to generate oscillation. Fig. 6-13 below depic...
Page 50 - External RC Oscillator Mode; Fig. 6-14 External RC Oscillator Mode Circuit; , the oscillator will become; Cext
EM78P221/2N 8-Bit Microcontroller with OTP ROM 44 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.8.3 External RC Oscillator Mode For some applications that do not require precise timing calculation, the RC oscillator (Fig. 6-14) could off...
Page 51 - Internal RC Oscillator Mode; Considerations; VDD; Fig. 6-15 External Power on Reset Circuit
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 45 (This specification is subject to change without further notice) 6.8.4 Internal RC Oscillator Mode The EM78P221/2N offers a versatile internal RC mode with default frequency value of 4MHz. Internal RC oscilla...
Page 52 - Residual Voltage Protection; Fig. 6-16 Residual Voltage Protection Circuit 1; Fig. 6-17 Residual Voltage Protection Circuit 2; Low Voltage Reset; s, system reset will occur and the system will remain at
EM78P221/2N 8-Bit Microcontroller with OTP ROM 46 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 6.9.2 Residual Voltage Protection When the battery is replaced, device power Vdd is removed but residual voltage remains. The residual voltage ...
Page 53 - TYPE1 TYPE0 LVR1 LVR0 CLKS ENWDTB OSC2 OSC1 OSC0; Low Voltage Reset enable bits. If Vdd has crossover at Vdd; Option; ENWDTB
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 47 (This specification is subject to change without further notice) LVR characteristics are set at Code Option Word 0, Bits 10 and 9. Detailed operation mode is as follows: Word 0 Bit 12 Bit 11 Bit 10 Bit 9 Bit ...
Page 54 - MCU Type; Protect
EM78P221/2N 8-Bit Microcontroller with OTP ROM 48 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) Bits 12 ~ 11 (Type 1, Type 0): Type selection for EM78P221N or EM78P222N Type 1, Type 0 MCU Type 00 Not for use 01 Not for use 10 EM78P221N (24...
Page 55 - Word 1; Default; The noise rejection function is turned off in LXT2 and sleep mode.
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 49 (This specification is subject to change without further notice) 6.11.2 Code Option Register (Word 1) Word 1 Bit 12 Bit 11 Bit 10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 - - RESET ENB RCOU...
Page 56 - RC mode selection bits; Word 2; Customer’s ID code; Set; these instructions only need one instruction cycles
EM78P221/2N 8-Bit Microcontroller with OTP ROM 50 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) Bit 1 & Bit 0 (RCM1 & RCM0): RC mode selection bits RCM 1 RCM 0 Frequency (MHz) 1 1 4 (Default) 1 0 16 0 1 1 0 0 455kHz 6.11.3 Customer...
Page 59 - Absolute Maximum Ratings; Items; DC Electrical Characteristics
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 53 (This specification is subject to change without further notice) 7 Absolute Maximum Ratings Items Rating Temperature under bias -40 ° C to 85 ° C Storage temperature -65 ° C to 150 ° C Input voltage Vss-0.3V ...
Page 60 - Internal RC Electrical Characteristics (Ta=25
EM78P221/2N 8-Bit Microcontroller with OTP ROM 54 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) Symbol Parameter Condition Min. Typ. Max. Unit IPH Pull-high current (Ports 50~53, 64~67) Pull-high active, input pin at VSS 50 − 90 μ A IPL Pu...
Page 61 - AC Electrical Characteristic
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 55 (This specification is subject to change without further notice) 8.1 Comparator (OP) Characteristic Vdd = 5.0V, Vss=0V, Ta=25 ° C Symbol Parameter Condition Min. Typ. Max. Unit VOS Input Offset Voltage RL = 5...
Page 62 - 0 Timing Diagrams; AC Test Input/O utput W aveform
EM78P221/2N 8-Bit Microcontroller with OTP ROM 56 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) 10 Timing Diagrams RESET Tim ing (CLK="0") CLK /RESET NO P Instructio n 1 Execu ted T drh TCC Input Tim ing (CLKS="0") CLK T C ...
Page 63 - OTP MCU; Green products do not contain hazardous substances.
EM78P221/2N 8-Bit Microcontroller with OTP ROM Product Specification (V1.0) 10.19.2007 • 57 (This specification is subject to change without further notice) APPENDIX A Package Type OTP MCU Package Type Pin Count Package Size EM78P221NKS/NKJ Skinny DIP 24 pins 300mil EM78P221NMS/NMJ SOP 24 pins 300mi...
Page 64 - B Packaging
EM78P221/2N 8-Bit Microcontroller with OTP ROM 58 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) B Packaging Configuration B.1 24-Lead Plastic Skinny Dual in line (SDIP) — 300 mil TITLE:PDIP-24L SKINNY 300MILPACKAGE OUTLINEDIMENSION Unit : ...
Page 70 - C Quality Assurance and Reliability; Test Category; C.1 Address Trap Detect
EM78P221/2N 8-Bit Microcontroller with OTP ROM 64 • Product Specification (V1.0) 10.19.2007 (This specification is subject to change without further notice) C Quality Assurance and Reliability Test Category Test Conditions Remarks Solderability Solder temperature=245 ± 5 ° C, for 5 seconds up to the...