![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
EM78M680 usb full speed microcontroller product specification d oc . v ersion 1.1 elan microelectronics corp. february 2007
trademark acknowledgments: ibm is a registered trademark a nd ps/2 is a trademark of ibm. windows is a trademark of microsoft corporation. elan and elan logo are trademarks of elan mi croelectronics corporation. copyright ? 2006 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, ad equacy, or completeness of this sp ecification. 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 accordan ce 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 re produced or transmitted in any form or by any means without the expressed written permission of elan microelectronics. elan microelectronics corporation headquarters: no. 12, innovation road 1 hsinchu science park hsinchu, taiwan 30077 tel : +886 3 563-9977 fax : +886 3 563-9966 http : //www.emc.com.tw hong kong: elan (hk) microelectronics corporation, ltd. flat a, 19f., world tech centre 95 how ming street, kwun tong kowloon , hong kong tel : +852 2723-3376 fax : +852 2723-7780 elanhk@emc.com.hk usa: elan information technology group (usa) 1821 saratoga ave., suite 250 saratoga, ca 95070 usa tel : +1 408 366-8225 fax : +1 408 366-8220 europe: elan microelectronics corp. (europe) siewerdtstrasse 105 8050 zurich, switzerland tel : +41 43 299-4060 fax : +41 43 299-4079 http : //www.elan-europe.com shenzhen: elan microelectronics shenzhen, ltd. ssmec bldg., 3f, gaoxin s. ave. shenzhen hi-tech industrial park shenzhen, guandong, china tel : +86 755 2601-0565 fax : +86 755 2601-0500 shanghai: elan microelectronics shanghai, ltd. 23/bldg. #115 lane 572, bibo roa d zhangjiang hi-tech park shanghai, china tel : +86 21 5080-3866 fax : +86 21 5080-4600 contents product specification (v1.11) 02.10.2007 ? iii contents 1 general description .................................................................................................. 1 2 features ..................................................................................................................... 1 3 pin assignment ......................................................................................................... 4 3.1 function type description .................................................................................. 4 3.2 pin configuration................................................................................................ 4 4 pin description.......................................................................................................... 6 5 block diagram ........................................................................................................... 7 6 function description ................................................................................................ 7 6.1 program memory................................................................................................ 7 6.2 data memory ...................................................................................................... 8 6.2.1 operational regist ers........................................................................................10 6.2.1.1 r0 (indirect address regi ster) ........................................................... 10 6.2.1.2 r1 (timer/clo ck counter , tcc) ......................................................... 10 6.2.1.3 r2 (program counter & stack)........................................................... 10 6.2.1.4 r3 (statu s register) ........................................................................... 11 6.2.1.5 r4 (ram se lect register) .................................................................. 12 6.2.1.6 r5 (port 5 i/o regist er)...................................................................... 13 6.2.1.7 r6 (port 6 i/o regist er)...................................................................... 13 6.2.1.8 r7 (port 7 i/o regist er)...................................................................... 13 6.2.1.9 r8 (port 8 i/o regist er)...................................................................... 13 6.2.1.10 r9 (port 9 i/o regi ster)...................................................................... 13 6.2.1.11 ra (usb endpoint 0 status register) ................................................ 13 6.2.1.12 rc (fifo indire ct index r egister )...................................................... 14 6.2.1.13 rd (fifo indire ct data register) ....................................................... 14 6.2.1.14 re (interrupt status r egister) ............................................................ 15 6.2.1.15 rf (i nterrupt status register) ............................................................ 15 6.2.1.16 r10 (usb endpoint status r egister) ................................................. 15 6.2.1.17 r11 (ad controlle r/ad selection pin) ................................................ 16 6.2.1.18 r12 (dua l mode cont rol).................................................................... 17 6.2.1.19 r14 (adc output data) : a dc output data for selecting pin ........... 17 6.2.1.20 r17 (eeprom control regi ster) ....................................................... 18 6.2.1.21 r18~r1f (general purpose r egister ) ............................................... 18 6.2.1.22 r20~r3f (general purpose r egister) ............................................... 18 6.3 special function registers............................................................................... 19 6.3.1 a (accum ulator ).................................................................................................19 6.3.2 cont (contro l register)...................................................................................19 6.3.3 ioc5 ~ ioc9 (i/o po rt control r egister) ..........................................................20 6.3.4 ioca (rfcnt: rf control register).................................................................20 6.3.5 iocb (pwm_cnt : pwm cont roller) .................................................................20 contents ? product specification (v1.11) 02.10.2007 iv 6.3.6 iocc (r eserve).................................................................................................21 6.3.7 iocd (port 9 pull hi gh control r egister)..........................................................21 6.3.8 ioce (mcu cont rol regist er)...........................................................................21 6.3.9 iocf (interrupt mask register).........................................................................22 6.4 usb device controller ..................................................................................... 23 6.5 device address and endpoints......................................................................... 23 6.6 reset ................................................................................................................ 23 6.6.1 power-o n reset.................................................................................................23 6.6.2 watchdo g reset ................................................................................................23 6.6.3 usb reset.........................................................................................................24 6.7 saving power mode ......................................................................................... 24 6.7.1 power do wn m ode ............................................................................................24 6.7.2 dual cl ock mode ...............................................................................................24 6.8 interrupt ............................................................................................................ 25 6.9 pattern detect application (pda) ..................................................................... 26 6.9.1 function description..........................................................................................26 6.9.2 control register ................................................................................................26 6.9.2.1 iocf [2~3] pda enable contro l bit t ................................................. 26 6.9.2.2 ioca (pda c ontrol regi ster) ............................................................. 26 6.9.2.3 r15 eram1 (p.92 low pattern counter)........................................... 26 6.9.2.4 r16 eram1 (p.92 hi gh pattern counter).......................................... 26 6.9.2.5 r17 eram1 (p.93 low pattern counter)........................................... 26 6.9.2.6 r18 eram1 (p.93 hi gh pattern counter).......................................... 27 6.9.3 sampling rate and debounce length ..............................................................27 6.10 pulse width modulation (pwm) ....................................................................... 28 6.10.1 function description..........................................................................................28 6.10.2 duty cycle .........................................................................................................29 6.10.3 control register ................................................................................................29 6.10.3.1 r15 (pwm1 duty cycle regi ster) ...................................................... 29 6.10.3.2 r16 (pwm2 duty cycle regi ster) ...................................................... 29 6.10.3.3 iocb (pwm c ontrol regi ster)............................................................ 29 6.11 analog-to-digital converter (adc) .................................................................. 30 6.11.1 function description..........................................................................................30 6.11.2 contro l register ................................................................................................30 6.11.2.1 r11 (ad channel select regi ster)..................................................... 30 6.11.2.2 r13 (ad lsb data regi ster).............................................................. 31 6.11.2.3 r14 (ad msb data regi ster)............................................................. 31 7 absolute maximum ratings ................................................................................... 31 8 dc electrical characteristic ................................................................................... 32 contents product specification (v1.11) 02.10.2007 ? v appendix a special registers map ............................................................................................ 34 b instruction set ......................................................................................................... 41 c code option............................................................................................................. 44 d application circuit???????????????????????????..47 contents ? product specification (v1.11) 02.10.2007 vi specification revision history doc. version revision description date 0.9 preliminary version 2006/08/29 contents product specification (v1.11) 02.10.2007 ? 1 1 general description the EM78M680 is a series of 8-bit univ ersal serial bus, risc architecture, multi-time programming (mtp) microcontrollers. it is specifically designed for usb full speed device application. the EM78M680 also supports one device address and five endpoints. the EM78M680 has eight-level stack and four sets of interrupt sources. it has a maximum of 36 general input/output pins with the capacity of sinking large current. each device has 271 bytes of general purpose sram, 6k bytes of program rom, and is embedded with 32 bytes of eeprom. these series of ics have special features that meet user?s requirements. such features are: ? dual clock mode which allows the device to run on very low power. ? pattern detect application function which is used in serial transmission to count waveform width ? pulse width modulation that can generate a duty-cycle-programmable signal ? 24-channel ad converter with up to 10 bits resolution 2 features ? operating voltage: 4.4v ~ 5.25v ? usb specification compliance ? universal serial bus specification version 1.1 ? usb device class definition for human interface device (hid), firmware specification version 1.1 ? supports one device address and five endpoints ? usb application ? p74 (d+) has an internal pull-high resistor (1.5k ? ) ? usb protocol handling ? usb device state handling ? identifies and decodes standard usb commands to endpoint zero contents ? product specification (v1.11) 02.10.2007 2 ? built-in 8-bit risc mcu ? 8-level stacks for subroutine nesting, and interrupt ? 4 sets of interrupts ? 8-bit real time clock/counter (tcc) with overflow interrupt ? built-in rc oscillator free running for watchdog timer and dual clock mode ? two independent programmable prescalers for wdt and tcc ? two methods of power saving: ? power-down mode (sleep mode) ? dual clock mode ? two clocks per instruction cycle ? multi-time programmable ? set 1 int : (jump to 0x08) ? tcc overflow interrupt ? ep0 command in interrupt ? usb suspend interrupt ? usb reset interrupt ? usb host resume interrupt ? set 2 int : (jump to 0x10) ? rf1 low pattern interrupt ? rf1 high pattern interrupt ? rf2 low pattern interrupt ? rf2 high pattern interrupt ? set 3 int : (jump to 0x18) ? p77 port change interrupt ? p76 port change interrupt ? set 4 int : (jump to 0x20) ? ep1~5 output endpoint received o.k interrupt ? i/o ports ? 3 led sink pins ? each gpio pin in ports 5, 6, 8, p90~p93, p95, p96, p70~p72 and p76~p77, has an internal programmable pull-high resistor (25 k ? ) ? each gpio pin of port 6, p76~p77, and port 9 can wakeup the mcu from sleep mode by input state change contents product specification (v1.11) 02.10.2007 ? 3 ? internal memory ? built-in 6k 13 bits program rom ? built-in 271 bytes general purpose registers (sram) ? built-in usb application fifos ? built-in 32 bytes e 2 prom ? operation frequency ? normal mode: mcu runs on an external oscillator frequency of 4mhz, internal system frequency of 8mhz, 16mhz or 24mhz ? dual clock mode: mcu runs at a frequency of 256khz (or 32khz, 4khz, 500hz), using an internal oscillator with an external crystal resonator turned off to save power ? built-in pattern detecting applicati on for serial signal transmission ? built-in pulse width modulation (pwm) ? 2 channels pwm function on p.92 (pwm1) and p.93 (pwm2) ? 8-bit resolution of pwm output ? 8 selections of duty cycles ? built-in 24-channel analog-to-digital converter (adc) ? built-in ad converter with 10-bit resolution ? 4 types of adc clock source selection: 256k/128k/64k/32k ? built-in 3.3v voltage regulator ? for udc power supply ? pull-up source for the external usb resistor on d+ pin ? package type ? 44-pin qfp (EM78M680 (a/d) aq) ? 40-pin dip 600mil (EM78M680 (a/d) ap) ? 24-pin dip 600mil (e m78m680 (a/d) cp) ? 24-pin sop 300mil (EM78M680 (a/d) cm) ? 20-pin dip 300mil (EM78M680 (a/d) bp) ? 20-pin sop 300mil (EM78M680 (a/d) bm) contents ? product specification (v1.11) 02.10.2007 4 3 pin assignment 3.1 function type description the EM78M680 series has four types of packaging. each type is divided into two modules, namely; original, and with both e 2 prom and a/d converter. hence, packaging configuration for each series is defined. table 3.1 below summarizes which series of the EM78M680 belong to which module. table 3-1 packaging summary of EM78M680 series ic original with both EM78M680a EM78M680d 3.2 pin configuration 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 p56 p57 p60 p61 p62 p63 p77 vdd osci osco vss v3.3 d+ d- p92/se1/pwm1 p93/se2/pwm2 p94/vpp vnn p54 p55 fig. 3-1 EM78M680*bp/*bm (20-pin dip/sop) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 19 20 21 22 23 24 osco vss v3.3 d+ d- p92/se1/pwm1 p93/se2/pwm2 p94/vpp vnn p54 p61 p62 p63 p64 p65 p66 p77 p76 vdd osci 15 16 17 18 p55 p56 p60 p57 fig. 3-2 EM78M680*cp/*cm (24-pin dip/sop) contents product specification (v1.11) 02.10.2007 ? 5 1 2 3 4 5 6 7 8 9 10 11 12 29 30 35 36 37 38 39 40 vss v3.3 d+ d- p90 p91 p92/se1/pwm1 p93/se2/pwm2 p94/vpp vnn p64 p65 p66 p67 p72 p71 p70 vdd osci osco 31 32 33 34 p50 p51 p63 p62 13 14 15 16 17 18 19 20 28 27 26 25 24 23 22 21 p52 p53 p54 p55 p56 p57 p80 p81 p61 p60 p87 p86 p85 p84 p83 p82 fig. 3-3 EM78M680*ap (40-pin dip) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 43 p91 p92/se1/pwm1 p93/se2/pwm2 p94/vpp p95 p96 vnn p50 p51 p52 p53 p87 p60 p61 p62 p63 p64 p65 p66 p67 p72 p71 p54 p55 p56 p57 p80 p81 p82 p83 p84 p85 p86 p90 d- d+ v3.3 vss osco osci vdd p76 p77 p70 contents ? product specification (v1.11) 02.10.2007 6 fig. 3-4 EM78M680*aq (44-pin qfp) 4 pin description symbol i/o function p50 ~ p57 i/o general 8-bit bidirectional input/output port. all pins on this port can be internally pulled-high by register ioce bit 0. all port 5 input/output pins can be used for adc function. p60 ~ p67 i/o general 8-bit bidirectional input/output port. all pins on this port can be internally pulled-high by register ioce bit 1. all port 6 input/output pins can be used for adc function. p70 ~ p72 p76 ~ p77 i/o general 8-bit bidirectional input/output port. all pins on this port can be internally pulled-high by register ioce bit 3. the sink current of p70 ~ p7 2 are used for driving led. p80 ~ p87 i/o general 8-bit bidirectional input/output port. all pins on this port can be internally pulled-high by register ioce bit 2. all port 8 input/output pins can be used for adc function. p94 / vpp i mtp program pin. used in programming the on-chip rom. p94 functions as an input pin only (without an internally pulled-high resistor). p90 ~ p93 p95 ~ p96 i/o general bidirectional input/outpu port. each pin can be internally pulled-high by register iocd. p92 ~ p93 can be used for pwm (pulse width modulation) or pda (serial signal transmission application) function. usb d+ i/o usb d+ pin. built-in intern al 1.5k pulled-high resistor to v3.3 usb d- i/o usb d- pin. osci i 4mhz crystal resonator input. osco i/o return path for 4mhz crystal resonator. vnn ? mtp program pin. used in programmi ng the on-chip rom. during normal operation, this pin is connected to ground. v3.3 o 3.3v dc voltage output from an internal re gulator. this pin has to be tied to a 4.7sf capacitor. vdd ? connect to the usb power source or to a nominal 5v-power supply. actual vdd range can vary between 4.4v and 5.25v. vss ? connect to ground. contents product specification (v1.11) 02.10.2007 ? 7 5 block diagram oscillator timing control built-in rc prescaler r1 (tcc) wdt timer data & control bus osci osco r2 (pc) stack1 alu acc r3 (status) rom instruction register instruction decoder interrupt control reset & sleep & wake up control 3.3v regulator usb device controller vdd v3.3 transceiver d+ d- tcc wdt ram r4 (rsr) stack2 stack3 stack4 stack5 rc,rd prescaler i/o port 8 p80/ad p81/ad p82/ad p83/ad p84/ad p85/ad p86/ad p87/ad i/o port 9 p90 p91 p92/pwm1/se1 p94/vpp p95 p96 i/o port 7 pattern detect application adc pwm stack6 stack7 p70 p71 p72 p93/pwm2/se2 i/o port 6 p60/ad p61/ad p62/ad p63/ad p64/ad p65/ad p66/ad p67/ad i/o port 5 p50/ad p51/ad p52/ad p53/ad p54/ad p55/ad p56/ad p57/ad p76 p77 stack8 ep fifo eeprom 6 function description the EM78M680 memory is organized into four spaces, namely; user program memory in 6k 13 bits rom space, data memory in 271 bytes sram space, eeprom space, and usb application fifos for endpoint 0, endpoint 1, endpoint 2, endpoint 3, endpoint 4, endpoint 5. furthermore, several registers are used for special purposes. 6.1 program memory the program space of the EM78M680 is 6k bytes, and is divided into six pages. each page is 1k bytes long. after a reset, the 13-bit program counter (pc) points to location zero of the program space. the interrupt vectors are at 0x0008 (usb and tcc interrupts), 0x0010 (rf interrupt), 0x0018 (p76 p77 port change interrupt) and 0x020 (ep1~5 output endpoint interrupt). contents ? product specification (v1.11) 02.10.2007 8 after an interrupt, the mcu will auto pu sh the ram bank value (rsr bits 6, 7) (ra,7), page selector (status bits 5, 6, 7), and accumulator (a) and fetch the next instruction from the corresponding addres s as illustrated in the following diagram. after reset address 0x0000 reset vector 0x0008 0x0010 0x0018 0x0020 0x03ff first set of interrupt vector second set of interrupt vector third set of interrupt vector fourth set of interrupt vector page 0 0x0400 0x07ff page 1 0x0800 0x0bff page 2 0x0c00 0x0fff page 3 0x1000 0x13ff page 4 0x1400 0x17ff page 5 fig 6-1 EM78M680 data ram organization 6.2 data memory the data memory has 271 bytes sram space. it is also equipped with usb application fifo space for usb application. figure 6.2 shows the organization of the data memory space. pc contents product specification (v1.11) 02.10.2007 ? 9 " # $ % & ' 3 3 5 $ $ 3 1 $ 3 4 u b u v t 3 3 4 3 3 1 p s u 3 1 p s u 1 1 p s u 3 1 p s u 3 1 p s u 3 " & |