Page 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~2007 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 completeness of this specification. ELAN Microelectronics makes no commitment to update, or to keep current the information and material contained in this specification. Such information and material may change to conform to each confirmed order.
In no event shall ELAN Microelectronics be made responsible for any claims attributed to errors, omissions, or other inaccuracies in the information or material contained in this specification. ELAN Microelectronics shall not be liable for direct, indirect, special incidental, or consequential damages arising from the use of such information or material.
The software (if any) described in this specification is furnished under a license or nondisclosure agreement, and may be used or copied only in accordance with the terms of such agreement.
ELAN Microelectronics products are not intended for use in life support appliances, devices, or systems. Use of ELAN Microelectronics product in such applications is not supported and is prohibited.
NO PART OF THIS SPECIFICATION MAY BE REPRODUCED OR TRANSMITTED IN ANY FORM OR BY ANY MEANS WITHOUT THE EXPRESSED WRITTEN PERMISSION OF ELAN MICROELECTRONICS.
ELAN MICROELECTRONICS CORPORATION
| Headquarters: | Hong Kong: | USA: |
| No. 12, Innovation Road 1 | Elan (HK) Microelectronics | Elan Information Technology |
| Hsinchu Science Park | Corporation, Ltd. | Group (USA) |
| Hsinchu, Taiwan 30077 | Flat A, 19F., World Tech Centre 95 | 1821 Saratoga Ave., Suite 250 |
| Tel: +886 3 563-9977 | How Ming Street, Kwun Tong |
| Saratoga, CA 95070 |
| Fax: +886 3 563-9966 | Kowloon, HONG KONG |
| USA |
| http://www.emc.com.tw | Tel: +852 2723-3376 |
| Tel: +1 408 366-8225 |
| | Fax: +852 2723-7780 |
| | Fax: +1 408 366-8220 |
| | elanhk@emc.com.hk |
| | |
| | Shenzhen: | Shanghai: |
| | Elan Microelectronics | Elan Microelectronics |
| | Shenzhen, Ltd. | Shanghai, Ltd. |
| | 3F, SSMEC Bldg., Gaoxin S. Ave. I | #23, Zone 115, Lane 572, Bibo Rd. |
| | Shenzhen Hi-tech Industrial Park | Zhangjiang Hi-Tech Park |
| | (South Area) Shenzhen | Shanghai, CHINA 201203 |
| | CHINA 518057 | Tel: +86 21 5080-3866 |
| | Tel: +86 755 2601-0565 | Fax: +86 21 5080-4600 |
| | Fax: +86 755 2601-0500 | |
| | | |
Contents
EM78P259N/260N
Elan Microelectronics Corporation
Contents
Analog-To-Digital Converter ADC
Reset and Wake-up
TCC/WDT and Prescaler
6.1
11.3
11.1
11.2
11.4
Doc. Version Revision Description
Date
Bit Microprocessor with OTP ROM
Features
General Description
Pin DIP/SOP
Block Diagram
Pin Assignment
Pin DIP/SOP/SSOP
EM78P259NP/M
Symbol Pin No Type Function
Pin Description
EM78P260NP/M/KM
1 R0 Indirect Address Register
Function Description
Operational Registers
2 R1 Time Clock /Counter
EM78P259N/260N
Bit Microprocessor with OTP ROM Data Memory Configuration
Cont
Bit
5 R4 RAM Select Register
Bit 4 T
Bits 5~0
7 R7 Port
Bit 7 ~ Bit 4 C3 ~ C0 Calibrator of internal RC mode
6 R5 ~ R6 Port 5 ~ Port
Bit 7 ~ Bit
8 R8 Aisr ADC Input Select Register
9 R9 Adcon ADC Control Register
Bit 3 Adpd
Bit 5 ~ Bit 3 VOF2 ~ VOF0 Offset voltage bits
RA Adoc ADC Offset Calibration Register
RB Addata Converted Value of ADC
Bit 2 ~ Bit 0 Unimplemented, read as ‘0’
RE Interrupt Status 2 & Wake-up Control Register
RC ADDATA1H Converted Value of ADC
RD ADDATA1L Converted Value of ADC
All of these are 8-bit general-purpose registers
RF Interrupt Status 2 Register
16 R10 ~ R3F
Control Register
Special Purpose Registers
Accumulator
Bit 7 & Bit 6 Not used
3 IOC50 ~ IOC70 I/O Port Control Register
4 IOC80 Comparator and Tcca Control Register
Bit 4 & Bit 3 COS1 & COS0 Comparator/OP Select bits
Tccc signal source
Bit 6 Tccben Tccb enable bit 0 = disable Tccb
Bit 4 Tccbte Tccb signal edge
Bit 0 Tcccte Tccc signal edge
IOCA0 IR and Tccc Scale Control Register
Bit 1 LGP
Bit 3 IRE
Bit 2 HF
Bit 0 Iroute
Bit PD57 PD56 PD55 PD54 PD53 PD52 PD51 PD50
IOCB0 Pull-down Control Register
IOCC0 Open-Drain Control Register
Bit OD67 OD66 OD65 OD64 OD63 OD62 OD61 OD60
Bit PH57 PH56 PH55 PH54 PH53 PH52 PH51 PH50
IOCD0 Pull-high Control Register
IOCE0 WDT Control & Interrupt Mask Registers
= Enable Lpwtif interrupt
Lpwtif interrupt enable bit
= Disable Lpwtif interrupt
IOCF0 Interrupt Mask Register
12 IOC51 Tcca Counter
13 IOC61 Tccb Counter
14 IOC71 TCCBH/MSB Counter
15 IOC81 Tccc Counter
IOCB1 High/Low Time Scale Control Register
16 IOC91 Low Time Register
IOCA1 High Time Register
TCC prescaler counter can be read and written to
IOCC1 TCC Prescaler Counter
Bit 2 ~ Bit 0 LTS2 ~ LTS0 Low time scale bits
TCC/WDT and Prescaler
I/O Ports
MUX
I/O Port and I/O Control Register Circuit for P60 /INT
I/O Port and I/O Control Register Circuit for Port 50 ~ P57
Usage of Port 5 Input Change Wake-up/Interrupt Function
Reset and Wake-up
Reset and Wake-up Operation
Wake-up Wake-up and Interrupt
EM78P259N/260N
Select Segment
Signal Sleep Mode Normal Mode
Comparator
Address Name Reset Type Bit
Following summarizes the initialized values for registers
Name Reset Type Bit
HTR7 HTR6 HTR5 HTR4 HTR3 HTR2 HTR1 HTR0
Aisr
Controller Reset Block Diagram
Tcif
Event
Interrupt
T and P Status under Status R3 Register
EM78P259N/260N
Reti
Interrupt Vector Interrupt Status Priority
1.1 R8 Aisr ADC Input Select Register
Analog-to-Digital Converter ADC
ADC Control Register AISR/R8, ADCON/R9, ADOC/RA
Bit 7 ~ Bit 3 ADE3 Bit 2 ADE2
P54
1.2 R9 Adcon AD Control Register
P54/TCC/VREF Pin Priority High Medium Low
RA Adoc AD Offset Calibration Register
While the CPU is operating
= ADC is operating
ADC Sampling Time
ADC Operation during Sleep Mode
ADC Data Register ADDATA/RB, ADDATA1H/RC, ADDATA1L/RD
AD Conversion Time
Follow these steps to obtain data from the ADC
Programming Process/Considerations
Programming Process
ADC Control Register
Sample Demo Programs Define a General Register
Define a Control Register
Define Bits in Adcon
AD power on
Infrared Remote Control Application/PWM Waveform Generation
Overview
Function Description
Fcarrier
IRE Irout
Address Name Bit
Programming the Related Registers
IR/PWM Related Status/Data Registers
EM78P259N/260N
Under Tccb Counter IOC61
Timer/Counter
Under Tcca Counter IOC51
Under Tccc Counter IOC81
Comparator
Related Tccx Status/Data Registers
External Reference Signal
Comparator Output
Comparator Interrupt
Using a Comparator as an Operation Amplifier
Wake-up from Sleep Mode
Oscillator Modes
Oscillator
Oscillator Modes
Conditions
Frequency C1pF C2pF
Crystal Oscillator/Ceramic Resonators Crystal
Oscillator Type
External RC Oscillator Mode
18 Serial Mode Crystal/Resonator Circuit Diagram
Cext Rext Average Fosc 5V, 25C Average Fosc 3V, 25C
Internal RC Oscillator Mode
Internal Drift Rate RC Frequency Temperature
40C ~ +85C 3V~5.5V Total
Programmable WDT Time-out Period
Power-on Considerations
External Power-on Reset Circuit
EM78P259N
Residual Voltage Protection
Vdd
EM78P260N
Word Word1 Bit12 ~ Bit0
Code Option
Code Option Register Word
Word Bit Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit
Bit Microprocessor with OTP ROM Bit 3 HLP
= Pulses equal to 8/fc s is regarded as signal
= Pulses equal to 32/fc s is regarded as signal default
Bit 2 ~ 0 PR2 ~ PR0 Protect Bits
Customer ID Register Word
Bit 1 & Bit 0 RCM1, RCM0 RC mode selection bits
Instruction Set
Mnemonic Operation Status Affected
Following are the EM78P259N/260N instruction set
Instruction Binary
Absolute Maximum Ratings
Items Rating
Ta=25 C, VDD=5.0V±5%, VSS=0V
DC Electrical Characteristics
Symbol Parameter Condition Min Typ Max Unit
Internal RC Drift Rate
Voltage Min Typ Max
AD Converter Characteristics
Vdd=2.5V to 5.5V, Vss=0V, Ta=25C
Vdd = 5.0V, Vss=0V, Ta=25C
Comparator OP Characteristics
Device Characteristics
Ta=25C, VDD=5V±5%, VSS=0V
AC Electrical Characteristic
Symbol Parameter Conditions Min Typ Max Unit
AC Test Input/Output Waveform
Timing Diagrams
Reset Timing CLK=0
TCC Input Timing CLKS=0
18-Lead Plastic Dual in line Pdip 300 mil
Package Type
Package Information
Package Type Pin Count Package Size
18-Lead Plastic Small Outline SOP 300 mil
838
Lead Plastic Shrink Small Outline Ssop 209 mil
650
Lead Plastic Dual-in-line Pdip 300 mil
Lead Plastic Small Outline SOP 300 mil
Test Category Test Conditions Remarks
Quality Assurance and Reliability
Address Trap Detect