ملخص المحتوى في الصفحة رقم 1 
                    
                         
 
 
 
EM78P809N 
8-BIT  
Microcontroller 
Product 
Specification 
DOC. VERSION 1.0 
ELAN MCCROELECTRONICS CORP. 
July 2005 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                
                    
                    ملخص المحتوى في الصفحة رقم 2 
                    
                            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 © 2005 by ELAN Microelectronics Corporation  All Rights Reserved  Printed in Taiwan       The contents of this specification are subject to change without further notice.  ELAN Microelectronics assumes  no responsibility concerning the accuracy, adequacy, or complet
                    
                    ملخص المحتوى في الصفحة رقم 3 
                    
                          Contents        Contents    1 General Description ··························································································· 1  2 Features ·············································································································· 1  2.1 CPU········································································································································ 1  2.2 Applications·································································
                    
                    ملخص المحتوى في الصفحة رقم 4 
                    
                          Contents    5 Absolute Maximum Ratings ············································································ 63  5.1 Absolute Maximum Ratings ································································································· 63  5.2 Recommended Operating Conditions·················································································· 63  6 Electrical Characteristics················································································· 64  6.1 DC Ele
                    
                    ملخص المحتوى في الصفحة رقم 5 
                    
                        EM78P809N  8-Bit Microcontroller    1 General Description  The EM78P809N is an 8-bit microprocessor with low-power, high-speed CMOS  technology and high noise immunity.  It has a built-in 8K×13-bits Electrical One Time  Programmable Read Only Memory (OTP-ROM).  It provides multi-protection bits to  prevent intrusion of user’s OTP memory codes.  Seven Option bits are also available to  meet user’s requirements.  With its OTP-ROM feature, the EM78P809N is able to offer a convenient way of  develop
                    
                    ملخص المحتوى في الصفحة رقم 6 
                    
                        EM78P809N  8-Bit Microcontroller     16 bits Counter/Timer   TC2: Timer/Counter/Window   8 bits Timer/Counter   TCC: 8-bit real time clock/counter with overflow interrupt   TC3: Timer/Counter/Capture   TC4: Timer/Counter/ PWM (pulse width modulation)/PDO (Programmable  divider output)   Time Base Timer: (1Hz ~16kHz at 8MHz)   Key tone output: (1kHz ~ 8kHz at 8MHz)   Serial transmitter/receiver interface   Serial Peripheral Interface (SPI): Three-wire synchronous communication   Universal asynchr
                    
                    ملخص المحتوى في الصفحة رقم 7 
                    
                        EM78P809N  8-Bit Microcontroller    3 Pin Assignment  (ACLK) OSCO 1 28 VDD 2 27 OSCI /RESET (VPP) 3 26 TEST P67 (DINCK) (AD0) P90 4 25 P66 (DATAIN) 5 24 (AD1) P91 P65 (PGMB) 6 23 (AD2) P92 P64 (/SS)(OEB) (AD3) P93 7 22 P63 (/TONE) 8 21 (AD4) P94 P62 (TC2) 9 20 (AD5) P95 P61 (INT1) (AD6) P96 10 19 P60 (/INT0) 11 18 (AD7/VREF) P97 P73 (/SLEEP, /INT5) 12 17 (TC3, INT3) P80 P72 (TX,SO) 13 16 (TC4, /PWM, /PDO) P81 P71(RX,SI) 14 15 VSS P70 (/SCK) EM78P809N   Fig. 1. Pin Assignment  4 Pin Description  
                    
                    ملخص المحتوى في الصفحة رقم 8 
                    
                        EM78P809N  8-Bit Microcontroller      Symbol Pin No. Type Function  * P80~P83 are bi-directional I/O pins  * P80 can be used as 8-bit Timer/Counter 3 (TC3) or external Interrupt  Input 3 (INT3)  P80~P81 12~13 I/O  * P81 can be used as 8-bit Timer/Counter 4 (TC4) or programmable  divider output (PDO)  * P80 ~ P81 can be used as pull high or pull low pins  * P90~P97 are bi-directional I/O pins  P90~P97 4~11 I/O * P90~P97 can be used as 8 channel 10-bit resolution A/D converter  * P97 can be used a
                    
                    ملخص المحتوى في الصفحة رقم 9 
                    
                        EM78P809N  8-Bit Microcontroller    4 Function Description  4.1 Functional Block Diagram    OSCI OSCO WDT timer Stack ROM WDT Prescaler R2 Oscillator Timing Control TCC Prescaler R1 (TCC) ALU Interrupt Instruction Control Register General RAM R3 ACC R5 Control Sleep and Wake-up I/O Port Instruction R4 Decoder DATA and CONTROL BUS PORT6 PORT7 PORT8 PORT9 TC 2 (16-bit Timer/Counter) TC 3 (8-bit Timer/Counter, Capture Mode) TC 4 (8-bit Timer/Counter,  PWM, PDO) IOC6 R6 IOC7 R7 IOC8 R8 IOC9 R9 SPI (
                    
                    ملخص المحتوى في الصفحة رقم 10 
                    
                        EM78P809N  8-Bit Microcontroller    4.2 Operating Registers  REGISTER REGISTER REGISTER REGISTER CONTROL BANK 0 BANK 1 BANK 2 BANK 3 REGISTER Address 00 R0/ IAR 01 R1/ TCC 02 R2/ PC 03 R3/ SR R3 (7,6)= (0,1) R3 (7,6)= (1,0) R3 (7,6)= (1,1) R4/ RSR 04 SCR TC3CR URC1 SPIC1 Reserved 05 PORT6 TC3DA URC2 SPIC2 IOC6 06 PORT7 TC3DB URS SPID IOC7 07 PORT8 TC2CR/ ADDL URRD Reserved IOC8 08 09 PORT9 TC2DH URTD Reserved IOC9 0A Reserved TC2DL Reserved PHC1 Reserved 0B TC4CR ADCR Reserved PLC1 INTCR 0C TC4D
                    
                    ملخص المحتوى في الصفحة رقم 11 
                    
                        EM78P809N  8-Bit Microcontroller     R0/IAR − Indirect Addressing Register ( Address: 00h )  R0 is not a physically implemented register.  Its major function is to act as an indirect  addressing pointer.  Any instruction using R0 as a pointer actually accesses data  pointed by the RAM Select Register (R4).   R1/TCC − Time Clock /Counter ( Address: 01h )  This register is writable and readable just like the other registers.  The contents of the  prescaler counter are cleared only when a value is 
                    
                    ملخص المحتوى في الصفحة رقم 12 
                    
                        User Memory Space EM78P809N  8-Bit Microcontroller      R5 PC A12 A11 A10 A9 A8 A7 ~ A0 0000h Reset Vector CALL 000 : PAGE0   0000~03FF 0003h RET WDT Timer Overflow RETL Store ACC, R3, R5 0006h 001 : PAGE1   0400~07FF RETI External INT0 Pin Interrupt Occurs 010 : PAGE2   0800~0BFF STACK LEVEL 1 0009h TCC Overflow STACK LEVEL 2 000Fh 011 : PAGE3   0C00~0FFF External INT1 pin Interrupt Occurs STACK LEVEL 3 100 : PAGE4   1000~13FF STACK LEVEL 4 0012h Time Base Timer Interrupt STACK LEVEL 5 0015h 10
                    
                    ملخص المحتوى في الصفحة رقم 13 
                    
                        EM78P809N  8-Bit Microcontroller    Bit 3 (P) : Power down bit.  Set to “1” during power on or by a "WDTC" command  and reset to “0” by a "SLEP" command.  Bit 2 (Z) : Zero flag.  Set to "1" if the result of an arithmetic or logic operation is   zero.  Bit 1 (DC) : Auxiliary carry flag  Bit 0 (C) : Carry flag   R4/RSR − RAM Select Register ( Address: 04h )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  GRBS1 RBS0 RSR5 RSR4 RSR3 RSR2 RSR1 RSR0  Bit 7: 6 ( GRBS1 : GRBS0 ) : determine which gener
                    
                    ملخص المحتوى في الصفحة رقم 14 
                    
                        EM78P809N  8-Bit Microcontroller      PS2 PS1 PS0 Program Memory Page [Address]   0 0 0 Page 0 [0000~03FF]  0 0 1 Page 1 [0400~07FF]  0 1 0 Page 2 [0800~0BFF]  0 1 1 Page 3 [0C00~0FFF]  1 0 0 Page 4 [1000~13FF]  1 0 1 Page 5 [1400~17FF]  1 1 0 Page 6 [1800~1BFF]  1 1 1 Page 7 [1C00~1FFF]  Bit 1 ( SIS ) : SLEEP and IDLE mode select.   SIS = “0” : IDLE mode   SIS = “1” : SLEEP mode  Bit 0 ( REM ) : Release method for sleep mode.   REM = “0” : /SLEEP pin input rising edge release   REM = “1” : /SLE
                    
                    ملخص المحتوى في الصفحة رقم 15 
                    
                        EM78P809N  8-Bit Microcontroller     PORT9 − Port 9 I/O Data Register ( Address: 09h )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  P97 P96 P95 P94 P93 P92 P91 P90  Bit 7 ~ Bit 0 ( P97 ~ P90 ) : 8-bit Port 97 ~ Port 90 I/O data register   User can use IOC9 register to define each bit whether input or output.   TC4CR — Timer/Counter 4 Control Register ( Address: 0Bh )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  TC4FF1 TC4FF0 TC4S TC4CK2 TC4CK1 TC4CK0 TC4M1 TC4M0  Bit 7 ~ Bit 6 ( TC4FF1
                    
                    ملخص المحتوى في الصفحة رقم 16 
                    
                        EM78P809N  8-Bit Microcontroller     TC4D − Timer 4 Data Buffer ( Address: 0Ch )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  TC4D7 TC4D6 TC4D5 TC4D4 TC4D3 TC4D2 TC4D1 TC4D0  Bit 7 ~ Bit 0 ( TC4D7 ~ TC4D0 ) : Data buffer of 8-bit Timer/Counter 4.   ISFR0 − Interrupt Status Flag Register 0 and INT3 Edge Detect Flag.  ( Address : 0Dh )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  0 0 INT3F INT3R 0 0 WDTIF EXIF0  Bit 5 ( INT3F ) : External interrupt 3 falling edge detect flag.   INT3F = “
                    
                    ملخص المحتوى في الصفحة رقم 17 
                    
                        EM78P809N  8-Bit Microcontroller     ISFR2 − Interrupt Status Flag Register 2 ( Address: 0Fh )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  0 UERRIF RBFF TBEF TBIF EXIF1 0 TCIF0  Bit 6 (UERRIF) : UART Receiving Error Interrupt, cleared by software or UART  disabled.  Bit 5 (RBFF) : UART Receive Mode Data Buffer Full Interrupt Flag.  Flag cleared  by software.  Bit 4 (TBEF) : UART Transmit Mode Data Buffer Empty Interrupt Flag.  Flag  cleared by software.  Bit 3 (TBIF) : Time Base Timer Inte
                    
                    ملخص المحتوى في الصفحة رقم 18 
                    
                        EM78P809N  8-Bit Microcontroller    Bit 5 ~ Bit 4 ( TC3CK1 ~ TC3CK0 ) : Timer/Counter3 Clock Source Select  Clock source Resolution Max. time  TC3CK1 TC3CK0  ( Normal, Idle ) ( Fc=8M ) ( Fc=8M )  12 0 0 Fc/2 512 μS 131.1mS  10 0 1 Fc/2 128 μS 32.6mS  7 1 0 Fc/2 16 μS 4.1mS  1 1 External clock (TC3 pin) - -  Bit 3 ( TC3M ) : Timer/Counter 3 mode select   TC3M = “0” : Timer/Counter3 mode   TC3M = “1” : Capture mode   TC3DA − Timer 3 Data Buffer A ( Address: 06h )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit
                    
                    ملخص المحتوى في الصفحة رقم 19 
                    
                        EM78P809N  8-Bit Microcontroller    Bit 2 ~ Bit 0 ( TC2CK2 ~ TC2CK0 ) : Timer/Counter 2 Clock Source Select  Clock Source Resolution Max. Time  TC2CK2 TC2CK1 TC2CK0  ( Normal, Idle ) ( Fc=8M ) ( Fc=8M )  23 0 0 0 Fc/2 1.05s 19.1h  13 0 0 1 Fc/2 1.02ms 1.1min  8 0 1 0 Fc/2 32 μs 2.1s  3 0 1 1 Fc/2 1 μs 65.5ms  1 0 0 Fc 125ns 7.9ms  1 0 1 - - -  1 1 0 - - -  1 1 1 External clock (TC2 pin)     TC2DH − Timer 2 Data Buffer High Byte ( Address: 09h )  Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0  T
                    
                    ملخص المحتوى في الصفحة رقم 20 
                    
                        EM78P809N  8-Bit Microcontroller    Bit 5~ Bit 4 ( ADCK1 ~ ADCK0 ) : AD Conversion Time Select  Clock Source  Max. Operating  ADCK1 ADCK0  ( Normal, Idle ) Frequency (Fc)  0 0 Fc/4 1MHz  0 1 Fc/16 4MHz  1 0 Fc/32 8MHz  1 1 Reserved -  Bit 3 ( ADP ) : AD power control   ADP = “0” : Power on   ADP = “1” : Power down  Bit 2 ~ Bit 0 ( ADIS2 ~ ADIS0 ) : Analog Input Pin Select  ADIS2 ADIS1 ADIS0 Analog Input Pin  0 0 0 AD0  0 0 1 AD1  0 1 0 AD2  0 1 1 AD3  1 0 0 AD4  1 0 1 AD5  1 1 0 AD6  1 1 1 AD7