![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
em78p259n/260n 8-bit microprocessor with otp rom product specification d oc . v ersion 1.0 elan microelectronics corp. june 2005
t r adem ark acknowledgm ents : ibm is a registered tradem ark and ps/2 is a tradem ark of ibm. w i ndows is a tradem ark of microsoft corporation. l a n a n d e l a n l o g o are tradem a r k s o f e l a n m i c r o e l e c t r o n i c s c o r p o r a t e i o n . l a n m i c r o e l e c t r o n i c s c o r p o r a t i o n e d r i n t e d i n t a iwan i cs assum e s o n t ai ned i n p ecial i n ci de nt al , or c ons eq ue nt i a l dam a ges ari s i n g f r o m t h e u s e of s u ch i n f o r m at i o n e o r n o n d i scl o sure agreem ent , and ces, or sy st em s. use of n y means w i thout the expressed w r itten permission of elan microelectronics. el an microelectronics c o rpora t ion d 1 http : //w w w .em c .com .tw copy right ? 2 0 0 5 b y e a l l r i g h t s r e s e r v p the cont ent s of t h i s speci fi cat i on are subject t o change wi t hout furt her not i ce. elan m i croel ect r o n no responsibility concerning the accuracy , adequacy , or com p leteness of this specification. elan m i croel ect roni cs m a kes no com m i t m ent t o updat e , or t o keep current t h e i n form at i on and m a t e ri al c this specification. such inform a tion and m a terial m a y change to conform to each confirm e d order . in no event shal l elan m i croel ect roni cs be m a de responsi b l e for any cl ai m s at t r i but ed t o errors, om i ssi ons, or ot he r i n acc urac i e s i n t h e i n f o r m at i on or m a t e ri al cont ai ne d i n t h i s s p eci fi ca t i on. el a n m i croel ect r oni cs shal l n o t be lia ble for direct, indirect, s or m a terial. the soft ware (i f any ) descri bed i n t h i s speci fi cat i on i s furni s hed under a l i c e n s m a y be used or copied only in accordance with the term s of such agreem ent. elan m i croel ect roni cs product s are not i n t e nded for use i n l i f e support appl i a n c e s , d e v i elan m i croel ect roni cs product i n such appl i cat i ons i s not support e d and i s prohi bi t e d. n o p a r t o f th is speci fica ti on ma y be reprodu ced o r tra n smi t ted i n any fo rm o r by a he a dqua rte r s : n o . 1 2 , i n n o v a t i o n r o a hsinchu science park hsinchu, t a iwan 308 tel : +886 3 563-9977 fa x : +886 3 563-9966 hong kong: elan (hk) micro e l e c t r o n i cs t r e i n g elanhk@emc.com.hk corpora t ion, lt d. r m . 1 0 0 5 b , 1 0 / f e m p i r e c e n 68 mody road, t s i m s h a t s u k o w l o o n , h o n g k o tel : +852 2723-3376 fa x : +852 2 7 2 3 - 7 7 8 0 usa : ela n i n f o r m a tion t e c hnology u i t e 2 5 0 g a , c a 95070 fa x : +1 408 366-8220 group 1821 saratoga a v e . , s s a r a t o usa tel : +1 408 366-8223 europe : elan m i c r o e lectro n i cs co rp . r l a n d http : //www. elan-europe. c om (europe ) siewerdtstrasse 105 8 0 5 0 z u r i c h , s w i t z e tel : +41 43 299-4060 fa x : +41 43 299-4079 sh en zh en : elan micro e l e c t r o n i cs k i n a fa x : +86 755 2601-0500 i b o r o a sh en zh en , l t d . ssmec bldg., 3f , gaoxin s. a v e. shenzhen hi-t e c h i n d u s t r i a l p a r s h e n z h e n , g u a n d o n g , c h tel : +86 755 2601-0565 sha ngha i: elan micro e lectro n i cs sha ngha i corpora t ion, lt d. 23/bldg. #1 1 5 l a n e 5 7 2 , b d p a r k fa x : +86 021 5080-4600 zhangjiang hi-t e c h shanghai, china tel : +86 021 5080-3866 conte n ts product specification (v1.0) 06.16.2005 ? iii contents 1 general description .................................................................................................. 1 2 features ..................................................................................................................... 1 3 pin configuration (package) .................................................................................... 2 3.1 em78p259np/m pin assignment....................................................................... 2 3.2 em78p260np/m/km pin assignment ................................................................ 3 4 functional block diagram........................................................................................ 3 5 pin description.......................................................................................................... 4 5.1 em78p259np/m pin description ....................................................................... 4 5.2 em78p260np/m/km pin description ................................................................. 5 6 function description ................................................................................................ 6 6.1 operational registers......................................................................................... 6 6.1.1 r0 (indirect a ddress regi ster) ............................................................................6 6.1.2 r1 (time cl ock /count er)....................................................................................6 6.1.3 r2 (program co unter) and stack........................................................................6 6.1.3.1 data memory configuration .................................................................8 6.1.4 r3 (statu s register) ............................................................................................9 6.1.5 r4 (ram sele ct register) ...................................................................................9 6.1.6 r5 ~ r6 (por t 5 ~ port 6) ..................................................................................10 6.1.7 r7 (p ort 7) .........................................................................................................10 6.1.8 r8 (aisr: adc input select regi ster) ..............................................................11 6.1.9 r9 (adcon: adc control register).................................................................12 6.1.10 ra (adoc: adc offset calibration r egister) ...................................................13 6.1.11 rb (addata: conv erted value of adc)...........................................................13 6.1.12 rc (addata1h: conv erted value of adc) ......................................................14 6.1.13 rd (addata1l: conv erted value of adc) ......................................................14 6.1.14 re (interrupt status 2 & wake-up contro l register) ........................................14 6.1.15 rf (interrupt st atus 2 regi ster) ........................................................................15 6.1.16 r10 ~ r3f .........................................................................................................15 6.2 special purpose registers ............................................................................... 16 6.2.1 a (accum ulator ).................................................................................................16 6.2.2 cont (contro l register)...................................................................................16 6.2.3 ioc50 ~ ioc70 (i/o po rt control re gister) ......................................................17 6.2.4 ioc80 (comparator and tcca control register).............................................17 6.2.5 ioc90 (tccb and tccc control regi ster ).....................................................18 6.2.6 ioca0 (ir and tccc sc ale control re gister) .................................................19 6.2.7 iocb0 (pull-down control register).................................................................21 6.2.8 iocc0 (open -drain control register) ..............................................................21 conte n ts iv ? product specification (v1.0) 06.16.2005 6.2.9 iocd0 (pull-high control regi ster)...................................................................22 6.2.10 ioce0 (wdt control & in terrupt mask registers 2) ........................................22 6.2.11 iocf0 (interrupt mask register).......................................................................23 6.2.12 ioc51 (tcca counter ) .....................................................................................24 6.2.13 ioc61 (tccb counter ) .....................................................................................24 6.2.14 ioc71 (tccbh/ msb coun ter) .........................................................................25 6.2.15 ioc81 (tccc counter).....................................................................................25 6.2.16 ioc91 (low-t ime regist er) ..............................................................................26 6.2.17 ioca1 (high ti me regist er) .............................................................................26 6.2.18 iocb1 high/low time scale control register) ................................................26 6.2.19 iocc1 (tcc pres caler count er) ......................................................................27 6.3 tcc/wdt and prescaler.................................................................................. 28 6.4 i/o ports ........................................................................................................... 29 6.4.1 usage of port 5 input chan ge wake-up/interr upt function..............................32 6.5 reset and wake-up ....................................................................................... 32 6.5.1 reset and wake -up operat ion .......................................................................32 6.5.1.1 wake-up and interrupt modes operat ion summa ry..........................35 6.5.1.2 register initial values afte r reset ......................................................37 6.5.1.3 controller rese t block di agram.........................................................42 6.5.2 the t and p status und er status regist er ....................................................42 6.6 interrupt ............................................................................................................ 42 6.7 analog-to-digital converter (adc) .................................................................. 45 6.7.1 adc control register (a isr/r8, adcon/r9 , adoc/ra) ...............................45 6.7.1.1 r8 (aisr: adc i nput select r egister) ...............................................45 6.7.1.2 r9 (adcon: adc control register)..................................................46 6.7.1.3 ra (adoc: adc offs et calibration register) ....................................47 6.7.2 adc data register (addata/ rb, addata1h/rc, addata1l/rd) ...............48 6.7.3 adc samp ling time ..........................................................................................48 6.7.4 ad conv ersion time .........................................................................................48 6.7.5 adc operation during sle ep mode ...................................................................48 6.7.6 programming proces s/considerations..............................................................49 6.7.6.1 programmi ng process........................................................................49 6.7.6.2 sample de mo programs ....................................................................50 6.8 infrared remote control application/pwm waveform generation................... 52 6.8.1 over view ...........................................................................................................52 6.8.2 function description..........................................................................................53 6.8.3 programming the related registers ................................................................55 6.9 timer/counter................................................................................................... 56 6.9.1 over view ...........................................................................................................56 6.9.2 function description..........................................................................................56 6.9.3 programming the re lated regi sters .................................................................58 conte n ts product specification (v1.0) 06.16.2005 ? v 6.10 comparator ...................................................................................................... 58 6.10.1 external re ference signal ................................................................................59 6.10.2 comparator outputs..........................................................................................60 6.10.3 using comparator as an operation am plifier....................................................60 6.10.4 comparator interr upt .........................................................................................60 6.10.5 wake-up from sleep mode .............................................................................60 6.11 oscillator .......................................................................................................... 61 6.11.1 oscilla tor mo des................................................................................................61 6.11.2 crystal oscillator/cer amic resonators (xtal) .................................................62 6.11.3 external rc oscillato r mode .............................................................................63 6.11.4 internal rc oscillator mode ..............................................................................64 6.12 power-on considerations ................................................................................. 65 6.12.1 programmable wdt time-out period ..............................................................65 6.12.2 external power- on reset ci rcuit .......................................................................65 6.12.3 residual vo ltage protec tion ..............................................................................66 6.13 code option ..................................................................................................... 67 6.13.1 code option r egister (w ord 0) .........................................................................67 6.13.2 code option r egister (w ord 1) .........................................................................68 6.13.3 customer id r egister (w ord 2) .........................................................................69 6.14 instruction set .................................................................................................. 69 7 absolute maximum ratings ................................................................................... 71 8 dc electrical characteristics ................................................................................. 72 8.1 ad converter characteristics........................................................................... 73 8.2 comparator (op) characteristics ..................................................................... 74 8.3 device characteristics...................................................................................... 74 9 ac electrical characteristic ................................................................................... 75 10 timing diagrams ..................................................................................................... 76 appendix a. package types summary ....................................................................................... 77 b packaging configurations...................................................................................... 77 b.1 18-lead plastic dual in line (pdip) - 300 mil ................................................... 77 b.2 18-lead plastic small outline (sop) - 300 mil ................................................ 78 b.3 20-lead plastic shrink small outline (ssop) - 209 mil ................................... 79 b.4 20-lead plastic dual-in-line (pdip) - 300 mil ................................................... 80 b.5 20-lead plastic small outline (sopp) - 300 mil .............................................. 81 c quality assurance and reliability ......................................................................... 82 c.1 address trap detect......................................................................................... 82 conte n ts vi ? product specification (v1.0) 06.16.2005 specification revision history doc. version revision description date 1.0 initial official version 2005/06/16 em78p259n/260n 8-bit microprocessor w i th otp rom product specification (v1.0) 06.16.2005 ? 1 (this specification is subject to change without further notice) 1 general description em78p259n and em78p260n are 8-bit micropr ocessors designed and developed with low-power and high-speed cmos technology. it is equipped with a 2k*13-bit electrical one time programmable read only memory (o tp-rom). with its otp-rom feature, it is able to offer a convenient way of devel oping and verifying your programs. moreover, it provides a protect bit to guard against code intrusion, as well as 3 code option words to accommodate your requirements. furt hermore you can take advantage of elan writer to easily write your developm ent code into the em78p259n and em78p260n. 2 features operating voltage range : 2.3v~5.5v base on 0 c ~ 70 c (commercial) 2.5v~5.5v base on ?40 c ~ 85 c (industrial) operating frequency range (base on 2 clocks): ? crystal mode: dc ~ 20mhz/2clks, 5v; dc ~ 8mhz/2clks, 3v ? rc mode: dc ~ 4mhz/2clks, 5v; dc ~ 4mhz/2clks, 3v low power consumption: ? less than 1.9 ma at 5v/4mhz ? typically 15 a, at 3v/32khz ? typically 1 a, during sleep mode built-in rc oscillator 4mhz, 8mhz,1mhz, 455khz (auto calibration) programmable wdt time (4.5ms : 18ms) independent programmable prescaler of wdt one configuration register to match y our requirements, and user?s id code for customer use is provided 80 8 on chip registers (sram, general purpose register) 2k 13 on-chip rom bi-directional i/o ports 8-level stacks for subroutine nesting 8-bit real time clock/counter (tcc) with se lective signal sources, trigger edges, and overflow interrupt 8-bit real time clock/counter (tcca, t ccc) and 16-bit real time clock/counter (tccb) with selective signal sources, trigger edges, and overflow interrupt one pair of comparators (can act as an op) 4-bit multi-channel analog-to-digital converter with 12-bit resolution em78p259n/260n 8-bit microprocessor w i th otp rom 2 ? product specification (v1.0) 06.16.2005 (this specification is subject to change without further notice) easily-implemented ir (infrared re mote control) application circuit power down (sleep) mode six interrupt sources : ? tcc, tcca, tccb, and tccc overflow interrupt ? input-port st atus change interr upt (wake-up from sleep mode) ? external interrupt ? comp arators st atus change interrupt ? ir/pwm interrupt ? adc completion interrupt programmable free running watchdog timer 8 programmable pull-high i/o pins 8 programmable open-drain i/o pins 8 programmable pull-down i/o pins. t w o or four clocks per inst ruct ion cy cle package types : ? 18-pin dip 300mil : em78p259np ? 18-pin sop 300mil : EM78P259NM ? 20-pin dip 300mil : em78p260np ? 20-pin sop 300mil : em78p260nm ? 20-pin ssop 209mil : em78p260nkm power-on volt age detector available (2.0v 0.1v) 3 pin configuration (package) 3.1 em78p259np/m pin assignment p 52/adc2 p 53/ad c3 p 5 4/tcc/v r ef /reset vs s p 60//i nt p 61/tcca p 62/tccb p6 3 / t c c c p 55/osci p7 0 / o s c o vd d p6 7 / i r o u t p 65/cin+ em78p25 9np em78p2 59nm 1 2 3 4 5 6 7 8 9 18 17 16 15 14 13 12 11 p 64/co 10 p 66/cin- p 5 0/adc0 p 51/ad c1 f i g. 3-1 pin assignment ? em78p259np/m em78p259n/260n 8-bit microprocessor w i th otp rom produc t spe c i fic a t ion (v1.0) 06.16.2 005 ? 3 (this specification is subject to change without further notice) 3.2 em78p260np/m/km pin assignment 1 2 3 4 5 6 7 8 9 10 20 19 18 17 16 15 14 13 12 11 p52/ ad c2 p 53/ad c3 p54/ t cc/ vr e f /reset vs s p 60/ /int p6 1 / t c c a p62/t ccb p6 3 / t c c c p 55/ os ci p7 0 / o s c o vd d p67/ir out p 6 5/cin+ em 78p26 0n p6 4 / c o p 6 6/cin- p 5 0/ad c0 p 5 1/ad c1 p5 6 p 5 7 f i g. 3-2 pin assignment ? em78p260np/m/km 4 functional block diagram da t a & contr o l bus o s c illa t o r t i m i n g cont r o l wd t t i m e r p r esca le r ram r4 r 1 ( t cc) i n terru p t c o n t ro ll er ro m in st ru ct io n re g i s t e r r2 alu ac c r3 i n stru ctio n d eco d e r osc i os c o /r e s e t tc c /in t io c 5 r5 c o unt er stac k 6 i o c 6 / 7 r6/ 7 por t 5 i/o p 6 0 /in t p 61/ t c ca p 62/ t c cb p 63/ t c cc p 64/ c o p 65/ c i n+ p 66/ c i n- p 6 7 /ir o u t p 70/ o s c o a dc0 / p 5 0 a dc1 / p 5 1 a dc2 / p 5 2 a dc3 / p 5 3 vr ef /t cc /p 54 o s c i/p5 5 p56 p57 stack 7 stack 5 stack 4 stack 3 stack 2 stack 1 stack 0 b u i l t-i n osc i/ o po r t 6/7 f i g. 4-1 em78p259n/260n f unctional block diagram em78p259n/260n 8-bit microprocessor w i th otp rom 4 ? product specification (v1.0) 06.16.2005 (this specification is subject to change without further notice) 5 pin description 5.1 em78p259np/m pin description symbol pin no. type function vdd 14 ? power supply osci 16 i xtal type crystal input terminal or external clock input pin rc type : rc oscillator input pin osco 15 i/o xtal type : output terminal for crysta l oscillator or external clock input pin rc type : clock output with a duration one instruction cycle external clock signal input p70 15 i/o general-purpose i/o pin default value at power-on reset p60 ~ p67 6 ~ 13 i/o general-purpose i/o pin open drain default value at power-on reset p50 ~ p55 1 ~ 3 16 ~ 18 i/o general-purpose i/o pin pull-high/pull-down wake up from sleep mode when t he status of the pin changes default value at power-on reset cin?, cin+ co 12, 11 10 i o ??? the input pin of vi n? of a comparator ?+? the input pin of vin+ of a comparator pin co is the output of the comparator defined by ioc80 <4 : 3> ir out 13 o ir mode output pin. c apable of driving and sinking current = 20ma when the output voltage drops to 0.7vdd and rise to 0.3vdd at vdd = 5v. vref 3 i external reference voltage for adc defined by adcon (r9)<7> /int 6 i external interrupt pin triggered by falling or rising edge defined by cont <7> tcc, tcca, tccb, tccc 3, 7, 8, 9 i external counter input tcc defined by cont<5> tcca defined by ioc80 <1> tccb defined by ioc90 <5> tccc defined by ioc90 <1> adc0 ~ adc3 1, 2, 17, 18 i analog to digital converter defined by adcon (r9)<1:0> /reset 4 i if it remains at logic low, the device will be reset wake-up from sleep mode when pin status changes voltage on /reset/vpp must not exceed vdd during normal mode vss 5 ? ground em78p259n/260n 8-bit microprocessor w i th otp rom product specification (v1.0) 06.16.2005 ? 5 (this specification is subject to change without further notice) 5.2 em78p260np/m/km pin description symbol pin no. type function vdd 15 ? power supply. osci 17 i xtal type crystal input terminal or external clock input pin rc type : rc oscillator input pin osco 16 i/o xtal type : output terminal for crysta l oscillator or external clock input pin rc type : clock output with a time period of one instruction cycle. external clock signal input p70 16 i/o general-purpose i/o pin default value at power-on reset p60 ~ p67 7 ~ 14 i/o general-purpose i/o pin open-drain default value at power-on reset p50 ~ p57 1 ~ 4 17 ~ 20 i/o general-purpose i/o pin pull-high/pull-down wake up from sleep mode when t he status of the pin changes default value at power-on reset cin?, cin+ co 13, 12 11 i o ??? the input pin of vi n? of a comparator ?+? the input pin of vin+ of a comparator pin co is the output of the comparator defined by ioc80 <4 : 3> ir out 14 o ir mode output pin. c apable of driving and sinking current = 20ma when the output voltage drops to 0.7vdd and rise to 0.3vdd at vdd = 5v. vref 4 i external reference voltage for adc defined by adcon (r9)<7> /int 7 i external interrupt pin triggered by falling or rising edge. defined by cont <7> tcc, tcca, tccb, tccc 4, 8, 9, 10 i external counter input tcc defined by cont<5> tcca defined by ioc80 <1> tccb defined by ioc90 <5> tccc defined by ioc90 <1> adc0 ~ adc3 2, 3, 18, 19 i analog to digital converter defined by adcon (r9)<1 : 0> /reset 5 i if it remains at logic low, the device will be reset wake-up from sleep mode when pin status changes voltage on /reset/vpp must not exceed vdd during normal mode vss 6 ? ground em78p259n/260n 8-bit microprocessor w i th otp rom 6 ? product specification (v1.0) 06.16.2005 (this specification is subject to change without further notice) 6 function description 6.1 operational registers 6.1.1 r0 (indirect address register) r0 is not a physically implemented register . it s major func tion is to perform as an indirect address pointer . any instruction us ing r0 as a pointer , actually accesses the dat a pointed by the ram select register (r4). 6.1.2 r1 (time clock /counter) increased by an external signal edge which is defined by the te bit (cont-4) through the tcc pin, or by t he instruction cycle clock. writable and readable as any other registers the tcc prescaler counter (iocc1) is assigned to tcc the contents of the iocc1 register is cleared whenever ? ? a value is written to tcc register . ? a value is written to tcc prescaler bit s (bit3, 2, 1, 0 of the cont register) ? during power on res e t, /reset , or wdt time out res e t. 6.1.3 r2 (program counter) and stack a7 ~ a0 on-c hi p p r og r a m me m o r y ) ' ' ) ) h a r d w a r e inte r r up t ve ct o r u s e r me mo r y spac e r e se t ve cto r a9 a8 a10 stack le ve l 1 st ac k l e v e l 3 st ac k l e v e l 2 st ac k l e v e l 4 st ac k l e v e l 5 cal l 0 0 pag e0 0 0 0 0 ~ 0 3 f f 0 1 pag e1 0 4 0 0 ~ 0 7 f f r3 re t re t l re t i st ac k l e v e l 6 st ac k l e v e l 7 st ac k l e v e l 8 & |