Part Number Hot Search : 
K2201GRP 2SD2525 4700A K2201GRP 60NF06 CJ3404 TMS200 MSK103B
Product Description
Full Text Search
 

To Download M37702E2AFS Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  advanced and ever advancing mitsubishi electric mitsubishi 16-bit single-chip microcomputer 7700 family / 7700 series 7702/7703 group users manual mitsubishi electric
keep safety first in your circuit designs ! l mitsubishi electric corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. trouble with semiconductors may lead to personal injury, fire or property damage. remember to give due consideration to safety when making your circuit designs, with appropriate measures such as (i) placement of substitutive, auxiliary circuits, (ii) use of non-flammable material or (iii) prevention against any malfunction or mishap. notes regarding these materials l these materials are intended as a reference to assist our customers in the selection of the mitsubishi semiconductor product best suited to the customers application; they do not convey any license under any intellectual property rights, or any other rights, belonging to mitsubishi electric corporation or a third party. l mitsubishi electric corporation assumes no responsibility for any damage, or infringement of any third-partys rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in these materials. l all information contained in these materials, including product data, diagrams and charts, represent information on products at the time of publication of these materials, and are subject to change by mitsubishi electric corporation without notice due to product improvements or other reasons. it is therefore recommended that customers contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for the latest product information before purchasing a product listed herein. l mitsubishi electric corporation semiconductors are not designed or manufactured for use in a device or system that is used under circumstances in which human life is potentially at stake. please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor when considering the use of a product contained herein for any specific purposes, such as apparatus or systems for transportation, vehicular, medical, aerospace, nuclear, or undersea repeater use. l the prior written approval of mitsubishi electric corporation is necessary to reprint or reproduce in whole or in part these materials. l if these products or technologies are subject to the japanese export control restrictions, they must be exported under a license from the japanese government and cannot be imported into a country other than the approved destination. any diversion or reexport contrary to the export control laws and regulations of japan and/or the country of destination is prohibited. l please contact mitsubishi electric corporation or an authorized mitsubishi semiconductor product distributor for further details on these materials or the products contained therein.
this manual describes the hardware of the mitsubishi cmos 16-bit microcomputers 7702 group and 7703 group. after reading this manual, the user will be able to understand the functions, so that they can utilize their capabilities fully. for details concerning the software, refer to the 7700 family software manual. preface
1 before using this manual 1. constitution this users manual consists of the following chapters. refer to the chapters relevant to used products and the processor mode. l chapter 1. description to chapter 17. application functions which are common to all products and all processor modes are explained, using the m37702m2bxxxfp as an example. when there are functional differences between the low voltage version, prom version and the 7703 group, the referential section is indicated. refer to that section about differences and to chapter. 1 to chapter. 17 about the common functions. l chapter 18. low voltage version refer to this chapter when using the products of which difference of electrical characteristics identification code (see on page 1C2) is l, the m37702m2 lxxxgp for example. this chapter mainly explains the differences from the m37702m2bxxxfp, using the m37702m2lxxxgp as an example. l chapter 19. prom version refer to this chapter when using the products of which memory identification code (see on page 1C 2) is e, the m37702 e2bxxxfp for example. this chapter mainly explains the differences from the m37702m2bxxxfp, using the m37702e2bxxxfp as an example. l chapter 20. 7703 group refer to this chapter when using the 7703 group. this chapter mainly explains the differences from the 7702 group, using the m37703m2bxxxsp as an example. l appendix useful information for 7702 and 7703 groups usage is shown. 2. remark l 25 mhz version and 16 mhz version the 25 mhz version products are distinguished from the 16 mhz version products in part of chapters as the case may be. refer to it as follows: ?products of which difference of electrical characteristics identification code is b, m37702m2 bxxxfp as an example ..................................................... column of 25 mhz version ?products of which difference of electrical characteristics identification code is a, m37702m2 axxxfp as an example ..................................................... column of 16 mhz version l product expansion see the latest data book and data sheets. additionally, ask the contact addresses on the last page. l electrical characteristics see also the latest data book or data sheet. l development support tools see the latest data book and data sheet. l software see 7700 family software manual.
2 l mask rom confirmation form, prom confirmation form, mark specification form copy the form in the latest data book and use it. or, ask the contact addresses on the last page. 3. register structure the view of the register structure is described below: 0 1 0 xxx register (address xx 16 ) b1 b0 b2 b3 b4 b5 b6 b7 0 ] 1 ] 2 ] 3 2 3 ... select bit 0 : ... 1 : ... ... select bit 0 : ... 1 : ... the value is 0 at reading. 0 : ... 1 : ... fix this bit to 0. 4 7 to 5 nothing is assigned. 5 rw wo ro rw rw C 0 0 0 bit bit name this bit is ignored in ... mode. functions at reset rw ... flag undefined undefined ] 1 blank 0 1 5 : this bit is not used in the specific mode or state. it may be either 0 or 1. : nothing is assigned. ] 2 0 1 undefined ] 3 rw data. ro invalid. accordingly, the written value may be either 0 or 1. wo the value is undefined at reading. however, the bit with the commentaries of the value is 0 at reading in the functions column or the notes is always 0 at reading.(see to ] 4 above.) it is no possible to read the bit state. the value is undefined at reading. however, the bit with the commentaries of the value is 0 at reading in the functions column or the notes is always 0 at reading.(see to ] 4 above.) the written value becomes invalid. accordingly, the written value may be 0 or 1. ] 4 : set to 0 or 1 to meet the purpose. : set to 0 at writing. : set to 1 at writing. : 0 immediately after a reset. : 1 immediately after a reset. :undefined immediately after a reset. : it is possible to read the bit state at reading. the written value becomes valid it is possible to read the bit state at reading. the written value becomes : : the written value becomes valid data. it is not possible to read the bit state. :
table of contents i 7702/7703 group users manual table of contents chapter 1. description 1.1 performance overview .......................................................................................................... 1-3 1.2 pin configuration ................................................................................................................... 1-4 1.3 pin description ...................................................................................................................... 1-6 1.3.1 example for processing unused pins .......................................................................... 1-9 1.4 block diagram ...................................................................................................................... 1-12 chapter 2. central processing unit (cpu) 2.1 central processing unit ....................................................................................................... 2-2 2.1.1 accumulator (acc) ......................................................................................................... 2-3 2.1.2 index register x (x) ....................................................................................................... 2-3 2.1.3 index register y (y) ....................................................................................................... 2-3 2.1.4 stack pointer (s) ............................................................................................................ 2-4 2.1.5 program counter (pc) ................................................................................................... 2-5 2.1.6 program bank register (pg) ......................................................................................... 2-5 2.1.7 data bank register (dt) ................................................................................................ 2-6 2.1.8 direct page register (dpr) ........................................................................................... 2-6 2.1.9 processor status register (ps) ..................................................................................... 2-8 2.2 bus interface unit ............................................................................................................... 2-10 2.2.1 overview ....................................................................................................................... 2-10 2.2.2 functions of bus interface unit (biu) ........................................................................ 2-12 2.2.3 operation of bus interface unit (biu) ........................................................................ 2-14 2.3 access space ....................................................................................................................... 2-16 2.3.1 banks ............................................................................................................................ 2-17 2.3.2 direct page ................................................................................................................... 2-17 2.4 memory assignment ........................................................................................................... 2-18 2.4.1 memory assignment in internal area ......................................................................... 2-18 2.5 processor modes ................................................................................................................ 2-21 2.5.1 single-chip mode ......................................................................................................... 2-22 2.5.2 memory expansion and microprocessor modes ....................................................... 2-22 2.5.3 setting processor modes ............................................................................................ 2-25 [precautions when selecting processor mode] ................................................................... 2-27 chapter 3. input/output pins 3.1 programmable i/o ports ...................................................................................................... 3-2 3.1.1 direction register ............................................................................................................ 3-3 3.1.2 port register .................................................................................................................... 3-4 3.2 i/o pins of internal peripheral devices ............................................................................ 3-8 chapter 4. interrupts 4.1 overview .................................................................................................................................. 4-2 4.2 interrupt sources ................................................................................................................... 4-4
table of contents ii 7702/7703 group users manual 4.3 interrupt control .................................................................................................................... 4-6 4.3.1 interrupt disable flag (i) ................................................................................................ 4-8 4.3.2 interrupt request bit ....................................................................................................... 4-8 4.3.3 interrupt priority level select bits and processor interrupt priority level (ipl) ....... 4-8 4.4 interrupt priority level ........................................................................................................ 4-10 4.5 interrupt priority level detection circuit ........................................................................ 4-11 4.6 interrupt priority level detection time ............................................................................ 4-13 4.7 sequence from acceptance of interrupt request to execution of interrupt routine ........................... 4-14 4.7.1 change in ipl at acceptance of interrupt request .................................................. 4-16 4.7.2 storing registers ........................................................................................................... 4-17 4.8 return from interrupt routine ........................................................................................... 4-18 4.9 multiple interrupts ............................................................................................................... 4-18 ____ 4.10 external interrupts (int i interrupt) ................................................................................ 4-20 ____ 4.10.1 function of int i interrupt request bit ...................................................................... 4-23 ____ 4.10.2 switch of occurrence factor of int i interrupt request ........................................... 4-25 4.11 precautions when using interrupts ............................................................................... 4-26 chapter 5. timer a 5.1 overview ..................................................................................................................................5-2 5.2 block description .................................................................................................................. 5-3 5.2.1 counter and reload register (timer ai register) ......................................................... 5-4 5.2.2 count start register ........................................................................................................ 5-5 5.2.3 timer ai mode register ................................................................................................. 5-6 5.2.4 timer ai interrupt control register ............................................................................... 5-7 5.2.5 port p5 and port p6 direction registers ..................................................................... 5-8 5.3 timer mode ............................................................................................................................ 5-9 5.3.1 setting for timer mode ................................................................................................ 5-11 5.3.2 count source ................................................................................................................ 5-13 5.3.3 operation in timer mode ............................................................................................. 5-14 5.3.4 select function ............................................................................................................. 5-15 5.4 event counter mode ........................................................................................................... 5-19 5.4.1 setting for event counter mode ................................................................................. 5-22 5.4.2 operation in event counter mode .............................................................................. 5-24 5.4.3 select functions ............................................................................................................ 5-26 5.5 one-shot pulse mode ......................................................................................................... 5-30 5.5.1 setting for one-shot pulse mode ............................................................................... 5-32 5.5.2 count source ................................................................................................................ 5-34 5.5.3 trigger ........................................................................................................................... 5-35 5.5.4 operation in one-shot pulse mode ............................................................................ 5-36 5.6 pulse width modulation (pwm) mode ............................................................................ 5-39 5.6.1 setting for pwm mode ............................................................................................... 5-41 5.6.2 count source ................................................................................................................ 5-43 5.6.3 trigger ........................................................................................................................... 5-43 5.6.4 operation in pwm mode ............................................................................................ 5-44 chapter 6. timer b 6.1 overview ..................................................................................................................................6-2 6.2 block description .................................................................................................................. 6-2 6.2.1 counter and reload register (timer bi register) ......................................................... 6-3 6.2.2 count start register ........................................................................................................ 6-4 6.2.3 timer bi mode register ................................................................................................. 6-5 6.2.4 timer bi interrupt control register ............................................................................... 6-6
table of contents iii 7702/7703 group users manual 6.2.5 port p6 direction register ............................................................................................. 6-7 6.3 timer mode ............................................................................................................................ 6-8 6.3.1 setting for timer mode ................................................................................................ 6-10 6.3.2 count source ................................................................................................................ 6-11 6.3.3 operation in timer mode ............................................................................................. 6-12 6.4 event counter mode ........................................................................................................... 6-14 6.4.1 setting for event counter mode ................................................................................. 6-16 6.4.2 operation in event counter mode .............................................................................. 6-17 6.5 pulse period/pulse width measurement mode ............................................................. 6-19 6.5.1 setting for pulse period/pulse width measurement mode ...................................... 6-21 6.5.2 count source ................................................................................................................ 6-23 6.5.3 operation in pulse period/pulse width measurement mode ................................... 6-24 chapter 7. serial i/o 7.1 overview .................................................................................................................................. 7-2 7.2 block description .................................................................................................................. 7-3 7.2.1 uarti transmit/receive mode register ........................................................................ 7-4 7.2.2 uarti transmit/receive control register 0 .................................................................. 7-6 7.2.3 uarti transmit/receive control register 1 .................................................................. 7-7 7.2.4 uarti transmit register and uarti transmit buffer register ................................... 7-9 7.2.5 uarti receive register and uarti receive buffer register .................................... 7-11 7.2.6 uarti baud rate register (brgi) .............................................................................. 7-13 7.2.7 uarti transmit interrupt control and uarti receive interrupt control registers 7-14 7.2.8 port p8 direction register ........................................................................................... 7-16 7.3 clock synchronous serial i/o mode ............................................................................... 7-17 7.3.1 transfer clock (synchronizing clock) ......................................................................... 7-18 7.3.2 method of transmission ............................................................................................... 7-19 7.3.3 transmit operation ....................................................................................................... 7-23 7.3.4 method of reception .................................................................................................... 7-25 7.3.5 receive operation ........................................................................................................ 7-29 7.3.6 process on detecting overrun error ........................................................................... 7-32 [precautions when operating in clock synchronous serial i/o mode] ............................. 7-33 7.4 clock asynchronous serial i/o (uart) mode ............................................................... 7-35 7.4.1 transfer rate (frequency of transfer clock) .............................................................. 7-36 7.4.2 transfer data format .................................................................................................... 7-38 7.4.3 method of transmission ............................................................................................... 7-40 7.4.4 transmit operation ....................................................................................................... 7-44 7.4.5 method of reception .................................................................................................... 7-46 7.4.6 receive operation ........................................................................................................ 7-49 7.4.7 process on detecting error ......................................................................................... 7-51 7.4.8 sleep mode .................................................................................................................. 7-52 [precautions when operating in clock asynchronous serial i/o mode] ........................... 7-53 chapter 8. a-d converter 8.1 overview .................................................................................................................................. 8-2 8.2 block description .................................................................................................................. 8-3 8.2.1 a-d control register ....................................................................................................... 8-4 8.2.2 a-d sweep pin select register ...................................................................................... 8-6 8.2.3 a-d register i (i = 0 to 7) ............................................................................................. 8-7 8.2.4 a-d conversion interrupt control register .................................................................... 8-8 8.2.5 port p7 direction register ............................................................................................. 8-9
table of contents iv 7702/7703 group users manual 8.3 a-d conversion method ..................................................................................................... 8-10 8.4 absolute accuracy and differential non-linearity error .............................................. 8-12 8.4.1 absolute accuracy ....................................................................................................... 8-12 8.4.2 differential non-linearity error ..................................................................................... 8-13 8.5 one-shot mode .................................................................................................................... 8-14 8.5.1 settings for one-shot mode ........................................................................................ 8-14 8.5.2 one-shot mode operation description ....................................................................... 8-16 8.6 repeat mode ........................................................................................................................ 8-17 8.6.1 settings for repeat mode ............................................................................................ 8-17 8.6.2 repeat mode operation description .......................................................................... 8-19 8.7 single sweep mode ............................................................................................................ 8-20 8.7.1 settings for single sweep mode ................................................................................ 8-20 8.7.2 single sweep mode operation description ................................................................ 8-22 8.8 repeat sweep mode ........................................................................................................... 8-24 8.8.1 settings for repeat sweep mode ............................................................................... 8-24 8.8.2 repeat sweep mode operation description .............................................................. 8-26 8.9 precautions when using a-d converter ......................................................................... 8-28 chapter 9. watchdog timer 9.1 block description .................................................................................................................. 9-2 9.1.1 watchdog timer .............................................................................................................. 9-3 9.1.2 watchdog timer frequency select register .................................................................. 9-4 9.2 operation description .......................................................................................................... 9-5 9.2.1 basic operation .............................................................................................................. 9-5 9.2.2 operation in stop mode ............................................................................................... 9-7 9.2.3 operation in hold state ................................................................................................. 9-7 9.3 precautions when using watchdog timer ........................................................................ 9-8 chapter 10. stop mode 10.1 clock generating circuit .................................................................................................. 10-2 10.2 operation description ...................................................................................................... 10-3 10.2.1 termination by interrupt request occurrence ......................................................... 10-4 10.2.2 termination by hardware reset ................................................................................ 10-5 10.3 precautions for stop mode ............................................................................................ 10-6 chapter 11. wait mode 11.1 clock generating circuit .................................................................................................. 11-2 11.2 operation description ...................................................................................................... 11-3 11.2.1 termination by interrupt request occurrence ......................................................... 11-4 11.2.2 termination by hardware reset ................................................................................ 11-4 11.3 precautions for wait mode ............................................................................................. 11-5 chapter 12. connection with external devices 12.1 signals required for accessing external devices ...................................................... 12-2 12.1.1 descriptions of signals .............................................................................................. 12-2 12.1.2 operation of bus interface unit (biu) ..................................................................... 12-8 12.2 software wait ................................................................................................................... 12-11 12.3 ready function ................................................................................................................ 12-13 12.3.1 operation description .............................................................................................. 12-14 12.4 hold function ................................................................................................................... 12-16 12.4.1 operation description .............................................................................................. 12-17
table of contents v 7702/7703 group users manual chapter 13. reset 13.1 hardware reset .................................................................................................................. 13-2 13.1.1 pin state ..................................................................................................................... 13-3 13.1.2 state of cpu, sfr area, and internal ram area ................................................. 13-4 13.1.3 internal processing sequence after reset ............................................................... 13-9 ______ 13.1.4 time supplying l level to reset pin ................................................................ 13-10 13.2 software reset .................................................................................................................. 13-12 chapter 14. clock generating circuit 14.1 oscillation circuit example ............................................................................................. 14-2 14.1.1 connection example using resonator/oscillator ...................................................... 14-2 14.1.2 input example of externally generated clock ......................................................... 14-2 14.2 clock .................................................................................................................................... 14-3 14.2.1 clock generated in clock generating circuit ........................................................... 14-4 chapter 15. electrical characteristics 15.1 absolute maximum ratings ............................................................................................. 15-2 15.2 recommended operating conditions ............................................................................ 15-3 15.3 electrical characteristics ................................................................................................. 15-4 15.4 a-d converter characteristics ........................................................................................ 15-5 15.5 internal peripheral devices ............................................................................................. 15-6 15.6 ready and hold ............................................................................................................... 15-12 15.7 single-chip mode ............................................................................................................ 15-15 15.8 memory expansion mode and microprocessor mode : with no wait ................ 15-17 15.9 memory expansion mode and microprocessor mode : with wait ...................... 15-21 _ 15.10 testing circuit for ports p0 to p8, f 1 , and e ........................................................ 15-25 chapter 16. standard characteristics 16.1 standard characteristics ................................................................................................. 16-2 16.1.1 port standard characteristics .................................................................................... 16-2 16.1.2 i cc Cf(x in ) standard characteristics ............................................................................ 16-3 16.1.3 aCd converter standard characteristics .................................................................. 16-4 chapter 17. applications 17.1 memory expansion ............................................................................................................ 17-2 17.1.1 memory expansion model ......................................................................................... 17-2 17.1.2 how to calculate timing ............................................................................................ 17-4 17.1.3 points in memory expansion .................................................................................... 17-8 17.1.4 example of memory expansion .............................................................................. 17-20 17.1.5 example of i/o expansion ...................................................................................... 17-26 17.2 sample program execution rate comparison ........................................................... 17-29 17.2.1 difference depending on data bus width and software wait ............................. 17-29 17.2.2 comparison software wait (f(x in ) = 20 mhz) with software wait + ready (f(x in ) = 25 mhz) .. 17-31 chapter 18. low voltage version 18.1 performance overview ..................................................................................................... 18-3 18.2 pin configuration .............................................................................................................. 18-4 18.3 functional description ..................................................................................................... 18-6 18.3.1 power-on reset conditions ........................................................................................ 18-7
table of contents vi 7702/7703 group users manual 18.4 electrical characteristics ................................................................................................. 18-8 18.4.1 absolute maximum ratings ....................................................................................... 18-8 18.4.2 recommended operating conditions ....................................................................... 18-9 18.4.3 electrical characteristics ......................................................................................... 18-10 18.4.4 a-d converter characteristics ................................................................................. 18-11 18.4.5 internal peripheral devices ..................................................................................... 18-12 18.4.6 ready and hold ....................................................................................................... 18-18 18.4.7 single-chip mode ..................................................................................................... 18-21 18.4.8 memory expansion mode and microprocessor mode : with no wait ............... 18-23 18.4.9 memory expansion mode and microprocessor mode : with wait ..................... 18-27 _ 18.4.10 testing circuit for ports p0 to p8, f 1 , and e ................................................... 18-31 18.5 standard characteristics ............................................................................................... 18-32 18.5.1 port standard characteristics .................................................................................. 18-32 18.5.2 i cc Cf(x in ) standard characteristics .......................................................................... 18-33 18.5.3 aCd converter standard characteristics ................................................................ 18-34 18.6 application ....................................................................................................................... 18-35 18.6.1 memory expansion ................................................................................................... 18-35 18.6.2 memory expansion example on minimum model ................................................ 18-37 18.6.3 memory expansion example on medium model a .............................................. 18-39 18.6.4 memory expansion example on maximum model ............................................... 18-41 18.6.5 ready generating circuit example ......................................................................... 18-43 chapter 19. prom version 19.1 overview ............................................................................................................................. 19-2 19.2 eprom mode ..................................................................................................................... 19-4 19.2.1 write method .............................................................................................................. 19-4 19.2.2 pin description ........................................................................................................... 19-5 19.3 1m mode ............................................................................................................................. 19-6 19.3.1 read/program/erase ................................................................................................. 19-9 19.3.2 programming algorithm of 1m mode ..................................................................... 19-10 19.3.3 electrical characteristics of programming algorithm in 1m mode ..................... 19-11 19.4 256k mode ........................................................................................................................ 19-12 19.4.1 read/program/erase ............................................................................................... 19-15 19.4.2 programming algorithm of 256k mode ................................................................. 19-16 19.4.3 electrical characteristics of programming algorithm in 256k mode ................. 19-17 19.5 usage precaution ............................................................................................................ 19-18 19.5.1 precautions on all prom versions ....................................................................... 19-18 19.5.2 precautions on one time prom version ............................................................. 19-18 19.5.3 precautions on eprom version ............................................................................ 19-18 19.5.4 bus timing and eprom mode ............................................................................... 19-19 chapter 20. 7703 group 20.1 description ......................................................................................................................... 20-2 20.2 performance overview ..................................................................................................... 20-3 20.3 pin configuration .............................................................................................................. 20-4 20.4 functional description ..................................................................................................... 20-5 20.4.1 i/o pin ......................................................................................................................... 20-6 20.4.2 timer a ....................................................................................................................... 20-7 20.4.3 timer b ....................................................................................................................... 20-7 20.4.4 serial i/o .................................................................................................................... 20-8 20.4.5 a-d converter ........................................................................................................... 20-10
table of contents vii 7702/7703 group users manual 20.5 electrical characteristics ............................................................................................... 20-12 20.6 prom version .................................................................................................................. 20-13 20.6.1 eprom mode .......................................................................................................... 20-13 20.6.2 bus timing and eprom mode ............................................................................... 20-15 appendix appendix 1. memory assignment ........................................................................................... 21-2 appendix 2. memory assignment in sfr area ................................................................... 21-7 appendix 3. control registers ............................................................................................... 21-11 appendix 4. package outlines .............................................................................................. 21-32 appendix 5. countermeasures against noise ................................................................... 21-35 appendix 6. q & a .................................................................................................................. 21-45 appendix 7. hexadecimal instruction code table ............................................................. 21-55 appendix 8. machine instructions ....................................................................................... 21-58 glossary
table of contents viii 7702/7703 group users manual memorandum
chapter 1 description 1.1 performance overview 1.2 pin configuration 1.3 pin description 1.4 block diagram
description 7702/7703 group users manual 1C2 the 16-bit single-chip microcomputers 7702 group and 7703 group are suitable for office, business, and industrial equipment controllers that require high-speed processing of large amounts of data. these microcomputers develop with the m37702m2bxxxfp as the base chip. this manual describes the functions about the m37702m2bxxxfp unless there is a specific difference and refers to the m37702m2bxxxxfp as m37702. notes 1: about details concerning each microcomputers development status of the 7702/7703 group, inquire of contact addresses for further information described last. notes 2: how the 7702/7703 groups type name see is described below. m 3 77 02 m 2 b xxx fp mitsubishi integrated prefix represent an original single-chip microcomputer series designation using 2 digits circuit function identification code using 2 digits memory identification code using a digit m: mask rom e: eprom s: external rom memory size identification code using a digit difference of electrical characteristics identification code using a digit mask rom number package style fp: plastic molded qfp gp: plastic molded qfp hp: plastic molded fine-pitch qfp sp: plastic molded sdip fs: ceramic qfn
description 7702/7703 group users manual 1C3 1.1 performance overview functions 103 160 ns (the minimum instruction at f(x in ) = 25 mhz) 250 ns (the minimum instruction at f(x in ) = 16 mhz) 25 mhz (maximum) 16 mhz (maximum) 16384 bytes 512 bytes 8 bits 5 8 4 bits 5 1 16 bits 5 5 16 bits 5 3 (uart or clock synchronous serial i/o) 5 2 8-bit successive approximation method 5 1 (8 channels) 12 bits 5 1 3 external, 16 internal (priority levels 0 to 7 can be set for each interrupt with software) built-in (externally connected to a ceramic resonator or a quartz-crystal oscillator) 5 v 10 % 60 mw (at f(x in ) = 16 mhz frequency, typ.) 5 v 5 ma maximum 16 mbytes C20c to 85c cmos high-performance silicon gate process 80-pin plastic molded qfp parameters number of basic instructions instruction execution time external clock input frequency f(x in ) memory size programmable input/output ports multifunction timers serial i/o a-d converter watchdog timer interrupts clock generating circuit supply voltage power dissipation port input/output characteristics memory expansion operating temperature range device structure m37702m2bxxxfp m37702m2axxxfp m37702m2bxxxfp m37702m2axxxfp rom ram p0Cp2, p4Cp8 p3 ta0Cta4 tb0Ctb2 uart0, uart1 notes 1: all of the 7702 group microcomputers are the same except for the package type, memory type, memory size, and electric characteristics. 2: for the low voltage version, refer to chapter 18. low voltage version. 1.1 performance overview table 1.1.1 shows the performance overview of the m37702. 7703 group refer to chapter 20. 7703 group. table 1.1.1 m37702 performance overview input/output withstand voltage output current package
description 7702/7703 group users manual 1C4 1.2 pin configuration figure 1.2.1 shows the m37702m2bxxxfp pin configuration. figure 1.2.2 shows the m37702m2bxxxhp pin configuration. note : for the low voltage version of the 7702 group, refer to chapter 18. low voltage version. 7703 group refer to chapter 20. 7703 group. 1.2 pin configuration fig. 1.2.1 m37702m2bxxxfp pin configuration (top view) 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 0 /hold byte cnv ss reset x in x out e v ss p3 3 /hlda p3 2 /ale p3 1 /bhe p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p7 4 /an 4 p7 5 /an 5 p7 6 /an 6 p7 7 /an 7 /ad trg v ss av ss v ref av cc v cc p8 0 /cts 0 /rts 0 p8 1 /clk 0 p8 2 /r x d 0 p8 3 /t x d 0 p8 4 /cts 1 /rts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 1 4 3 2 5 6 7 8 9 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 outline 80p6n-a p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 p2 2 /a 18 /d 2 p2 3 /a 19 /d 3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 m37702m2bxxxfp 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 p4 1 /rdy p4 7 p4 6 p4 5 p4 4 p4 3 p4 2 / 1 p7 1 /an 1 p7 2 /an 2 p7 3 /an 3
description 7702/7703 group users manual 1C5 1.2 pin configuration p3 2 /ale p3 1 /bhe p3 3 /hlda x out e cnv ss reset p4 0 /hold 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 outline 80p6d-a p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 60 59 58 75 74 73 72 71 69 68 67 66 65 70 80 79 78 77 76 64 63 62 61 30 26 27 28 29 31 32 33 34 35 36 21 23 22 24 25 37 38 39 40 p4 1 /rdy p4 2 / 1 byte x in v ss p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p2 3 /a 19 /d 3 p2 2 /a 18 /d 2 p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 7 p8 5 /clk 1 p8 4 /cts 1 /rts 1 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 p7 0 /an 0 p6 7 /tb2 in m37702m2bxxxhp p4 3 p4 4 p4 5 p4 6 p7 7 /an 7 /ad trg ] : the m37702m2bxxxhp have the pin configuration shifted to 2 pins assignment from the m37702m2bxxxfp. ] ] ] ] 1 2 3 4 5 fig. 1.2.2 m37702m2bxxxhp pin configuration (top view)
description 7702/7703 group users manual 1C6 1.3 pin description tables 1.3.1 to 1.3.3 list the pin description. however, the pin description in the eprom mode of the built- in prom version is described to section 19.2 eprom mode. 7703 group the 7703 group does not have part of pins. refer to chapter 20. 7703 group. table 1.3.1 pin description (1) 1.3 pin description functions supply 5 v 10 % ] to vcc pin and 0 v to vss pin. this pin controls the processor mode. [single-chip mode] [memory expansion mode] connect to vss pin. [microprocessor mode] connect to vcc pin. the microcomputer is reset when supplying l level to this pin. these are i/o pins of the internal clock generating circuit. connect a ceramic resonator or quartz-crystal oscillator between pins x in and x out . when using an external clock, the clock source should be input to x in pin and x out pin should be left open. _ this pin outputs e signal. data/instruction code read or data write is performed when output from this pin is l level. [single-chip mode] connect to vss. [memory expansion mode] [microprocessor mode] input level to this pin determines whether the external data bus has a 16-bit width or 8-bit width. the width is 16 bits when the level is l, and 8 bits when the level is h. the power supply pin for the a-d converter. externally connect avcc to vcc pin. the power supply pin for the a-d converter. externally connect avss to vss pin. this is a reference voltage input pin for the a-d converter. pin vcc, vss cnvss ______ reset x in x out _ e byte avcc avss v ref input/output input input input output output input input ] : in the low voltage version, supply 2.7C5.5v to vcc. name power supply cnvss reset input clock input clock output enable output bus width selection input analog supply reference voltage input
description 7702/7703 group users manual 1C7 table 1.3.2 pin description (2) 1.3 pin description functions [single-chip mode] port p0 is an 8-bit cmos i/o port. this port has an i/o direction register and each pin can be programmed for input or output. [memory expansion mode] [microprocessor mode] low-order 8 bits (a 0 Ca 7 ) of the address are output. [single-chip mode] port p1 is an 8-bit i/o port with the same function as p0. [memory expansion mode] [microprocessor mode] l external bus width = 8 bits (when the byte pin is h level) middle-order 8 bits (a 8 Ca 15 ) of the address are output. l external bus width = 16 bits (when the byte pin is l level) data (d 8 to d 15 ) input/output and output of the middle- order 8 bits (a 8 Ca 15 ) of the address are performed with the time sharing system. [single-chip mode] port p2 is an 8-bit i/o port with the same function as p0. [memory expansion mode] [microprocessor mode] data (d 0 to d 7 ) input/output and output of the high- order 8 bits (a 16 Ca 23 ) of the address are performed with the time sharing system. [single-chip mode] port p3 is a 4-bit i/o port with the same function as p0. [memory expansion mode] [microprocessor mode] __ ____ _____ p3 0 Cp3 3 respectively output r/w, bhe, ale, and hlda signals. __ l r/w the read/write signal indicates the data bus state. the state is read while this signal is h level, and write while this signal is l level. ____ l bhe l level is output when an odd-numbered address is accessed. l ale this is used to obtain only the address from address and data multiplex signals. _____ l hlda this is the signal to externally indicate the state when the microcomputer is in hold state. l level is output during hold state. input/output i/o output i/o i/o i/o output pin p0 0 Cp0 7 a 0 Ca 7 p1 0 Cp1 7 a 8 /d 8 C a 15 /d 15 p2 0 Cp2 7 a 16 /d 0 C a 23 /d 7 p3 0 Cp3 3 ] __ r/w, ____ bhe, ale, _____ hlda ] _____ \ : the 7703 group does not have the p3 3 /hlda pin. name i/o port p0 i/o port p1 i/o port p2 i/o port p3
description 7702/7703 group users manual 1C8 1.3 pin description table 1.3.3 pin description (3) pin p4 0 Cp4 7 \ _____ hold, ____ rdy, p4 2 Cp4 7 \ _____ hold, ____ rdy, f 1 , p4 3 Cp4 7 \ p5 0 Cp5 7 p6 0 Cp6 7 \ p7 0 Cp7 7 \ p8 0 Cp8 7 \ functions [single-chip mode] port p4 is an 8-bit i/o port with the same function as p0. p4 2 can be programmed as the clock f 1 output pin. [memory expansion mode] _____ ____ p4 0 functions as the hold input pin, p4 1 as the rdy input pin. the microcomputer is in hold state while l _____ level is input to the hold pin. the microcomputer is in ready state while l level is ____ input to the rdy pin. p4 2 Cp4 7 function as i/o ports with the same functions as p0. p4 2 can be programmed for the clock f 1 output pin. [microprocessor mode] _____ ____ p4 0 functions as the hold input pin, p4 1 as the rdy input pin. p4 2 always functions as the clock f 1 output pin. p4 3 Cp4 7 function as i/o ports with the same functions as p0. port p5 is an 8-bit i/o port with the same function as p0. these pins can be programmed as i/o pins for timers a0Ca3. port p6 is an 8-bit i/o port with the same function as p0. these pins can be programmed as i/o pins for timer a4, input pins for external interrupt and input pins for timers b0Cb2. port p7 is an 8-bit i/o port with the same function as p0. these pins can be programmed as input pins for a-d converter. port p8 is an 8-bit i/o port with the same function as p0. these pins can be programmed as i/o pins for serial i/o. name i/o port p4 i/o port p5 i/o port p6 i/o port p7 i/o port p8 \ : the 7703 group does not have the p4 3 Cp4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 Cp7 6 , p8 4 , and p8 5 pins. input/output i/o input input i/o input input output i/o i/o i/o i/o i/o
description 7702/7703 group users manual 1C9 1.3 pin description 1.3.1 example for processing unused pins examples for processing unused pins are described below. these descriptions are just examples. the user shall modify them according to the users actual application and test them. (1) in single-chip mode table 1.3.4 example for processing unused pins in single-chip mode example of processing set for input mode and connect these pins to vcc or vss via a resistor; or set for output mode and leave these pins open. (notes 1, 3) leave it open. connect this pin to vcc. connect these pins to vss. pin name ports p0 to p8 _ e x out (note 2) avcc avss, v ref , byte notes 1: when setting these ports to the output mode and leave them open, they remain set to the input mode until they are switched to the output mode by software after reset. while ports remain set to the input mode, consequently, voltage levels of pins are unstable, and a power source current can increase. the contents of the direction register can be changed by noise or a program runaway generated by noise. to improve its reliability, we recommend to periodically set the contents of the direction register by software. when processing unused pins, use the possible shortest wiring (within 20 mm from the microcomputer). 2: this applies when a clock externally generated is input to the x in pin. 3: in the 7703 group, the following ports does not have the corresponding pins and have only the direction registers. fix the bit of these direction registers to 1 (output mode). ?ports p3 3 , p4 3 Cp4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 Cp7 6 , p8 4 , p8 5 p0Cp8 av ss v ref byte m37702 v ss av cc e x out v cc p0Cp8 av ss v ref m37702 v ss av cc e x out v cc left open l when setting ports for input mode l when setting ports for output mode left open left open byte fig. 1.3.1 example for processing unused pins in single-chip mode
description 7702/7703 group users manual 1C10 1.3 pin description (2) in memory expansion mode table 1.3.5 example for processing unused pins in memory expansion mode pin name ports p4 2 to p4 7 , p5 to p8 ____ bhe ( note 2 ) ale ( note 3 ) _____ hlda ( note 6 ) x out ( note 5 ) _____ ____ hold, rdy (note 8) avcc avss, v ref example of processing set for input mode and connect these pins to vcc or vss via a resistor; or set for output mode and leave these pins open. (notes 1, 6, 7) leave them open. (note 4) leave it open. connect these pins to vcc via a resistor (pull-up). connect this pin to vcc. connect these pins to vss. notes 1: when setting these ports to the output mode and leave them open, they remain set to the input mode until they are switched to the output mode by software after reset. while ports remain set to the input mode, consequently, voltage levels of pins are unstable, and a power source current can increase. the contents of the direction register can be changed by noise or a program runaway generated by noise. to improve its reliability, we recommend to periodically set the contents of the direction register by software. when processing unused pins, use the possible shortest wiring (within 20 mm from the microcomputer). 2: this applies when h level is input to the byte pin. 3: this applies when h level is input to the byte pin and the access space is 64 kbytes. 4: when supplying vss level to the cnvss pin, these pins remain set to the input mode until they are switched to the output mode by software after reset. while pins remain set to the input mode, consequently, voltage levels of pins are unstable, and a power source current can increase. 5: this applies when a clock externally generated is input to the x in pin. 6: in the 7703 group, the following ports does not have the corresponding pins and have only the direction registers. fix the bit of these direction registers to 1 (output mode). ?ports p4 3 Cp4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 Cp7 6 , p8 4 , p8 5 _____ there is not the hlda pin. 7: set the p4 2 / f 1 pin to the p4 2 function (clock f 1 output disabled), and perform the same processing as ports p4 3 Cp4 7 , p5Cp8. 8: when processing unused pins, use the possible shortest wiring (within 20 mm from the microcomputer). p4 2 Cp4 7 , p5Cp8 av ss v ref hold rdy m37702 v cc v ss av cc x out bhe ale hlda p4 2 Cp4 7 , p5Cp8 av ss v ref hold rdy v ss av cc x out bhe ale hlda v cc m37702 left open l when setting ports for input mode l when setting ports for output mode left open left open left open left open fig. 1.3.2 example for processing unused pins in memory expansion mode
description 7702/7703 group users manual 1C11 1.3 pin description (3) in microprocessor mode table 1.3.6 example for processing unused pins in microprocessor mode example of processing set for input mode and connect these pins to vcc or vss via a resistor; or set for output mode and leave these pins open. (notes 1, 6) leave it open. (note 4) leave it open. connect these pins to vcc via a resistor (pull-up). connect this pin to vcc. connect these pins to vss. pin name ports p4 3 to p4 7 , p5 to p8 ____ bhe ( note 2 ) ale ( note 3 ) _____ hlda, f 1 ( note 6 ) x out ( note 5 ) _____ ____ hold, rdy ( note 7 ) avcc avss, v ref notes 1: when setting these ports to the output mode and leave them open, they remain set to the input mode until they are switched to the output mode by software after reset. while ports remain set to the input mode, consequently, voltage levels of pins are unstable, and a power source current can increase. the contents of the direction register can be changed by noise or a program runaway generated by noise. to improve its reliability, we recommend to periodically set the contents of the direction register by software. when processing unused pins, use the possible shortest wiring (within 20 mm from the microcomputer). 2: this applies when h level is input to the byte pin. 3: this applies when h level is input to the byte pin and the access space is 64 kbytes. 4: when supplying vss level to the cnvss pin, these pins remain set to the input mode until they are switched to the output mode by software after reset. while pins remain set to the input mode, consequently, voltage levels of pins are unstable, and a power source current can increase. 5: this applies when a clock externally generated is input to the x in pin. 6: in the 7703 group, the following ports does not have the corresponding pins and have only the direction registers. fix the bit of these direction registers to 1 (output mode). ?ports p4 3 Cp4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 Cp7 6 , p8 4 , p8 5 _____ there is not the hlda pin. 7: when processing unused pins, use the possible shortest wiring (within 20 mm from the microcomputer). fig. 1.3.3 example for processing unused pins in microprocessor mode p4 3 Cp4 7 , p5Cp8 1 av ss v ref hold rdy m37702 v cc v ss av cc x out bhe ale hlda p4 3 Cp4 7 , p5Cp8 1 av ss v ref hold rdy v ss av cc x out bhe ale hlda v cc m37702 l when setting ports for input mode l when setting ports for output mode left open left open left open left open left open
description 7702/7703 group users manual 1C12 1.4 block diagram figure 1.4.1 shows the m37702 block diagram. 1.4 block diagram fig. 1.4.1 m37702 block diagram clock input clock output enable output x in x out e reset input reset reference voltage input v ref clock generating circuit p8(8) p7(8) p5(8) p6(8) p4(8) p3(4) data buffer db h (8) data buffer db l (8) instruction queue buffer q 0 (8) instruction queue buffer q 1 (8) instruction queue buffer q 2 (8) data bank register dt(8) program counter pc(16) incrementer/decrementer(24) program bank register pg(8) input buffer register ib(16) direct page register dpr(16) stack pointer s(16) index register y(16) index register x(16) arithmetic logic unit(16) accumulator b(16) accumulator a(16) instruction register(8) data bus(even) data bus(odd) input/output port p8 input/output port p7 input/output port p6 input/output port p5 input/output port p3 input/output port p4 p2(8) input/output port p2 p1(8) input/output port p0 watchdog timer cnvss byte external data bus width selection input timer tb1(16) timer tb2(16) p0(8) input/output port p1 timer tb0(16) timer ta1(16) timer ta2(16) timer ta3(16) timer ta4(16) timer ta0(16) rom 16 kbytes ram 512 bytes uart1(9) uart0(9) av ss (0v) av cc central processing unit (cpu) incrementer(24) program address register pa(24) data address register da(24) address bus bus interface unit (biu) (0v) v ss v cc processor status register ps(1 1) a-d converter(8) note: the 7703 group does not have the p3 3 , p4 3 Cp4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 Cp7 6 , p8 4 , and p8 5 pins.
chapter 2 central processing unit (cpu) 2.1 central processing unit 2.2 bus interface unit 2.3 access space 2.4 memory assignment 2.5 processor modes
central processing unit (cpu) 2.1 central processing unit 2C2 7702/7703 group users manual 2.1 central processing unit the cpu (central processing unit) has the ten registers as shown in figure 2.1.1. fig. 2.1.1 cpu registers structure b0 b7 b8 b15 a h a l b0 b7 b8 b15 b h b l b0 b7 b8 b15 x h x l b0 b7 b8 b15 y h y l b0 b7 b8 b15 s h s l b0 b7 b8 b15 b7 b0 b8 b23 b16 b15 b7 b0 pc h pc l pg b0 b7 dt b0 b7 b8 b15 b0 b1 b2 b3 b4 b5 b6 b7 b8 b10 00000 c z i d x m v n ipl accumulator a (a) accumulator b (b) index register x (x) index register y (y) stack pointer (s) data bank register (dt) program counter (pc) program bank register (pg) direct page register (dpr) processor status register (ps) processor interrupt priority level carry flag zero flag interrupt disable flag index register length flag decimal mode flag data length flag overflow flag negative flag dpr l dpr h ps l ps h b9 b15
7702/7703 group users manual 2.1 central processing unit central processing unit (cpu) 2C3 2.1.1 accumulator (acc) accumulators a and b are available. (1) accumulator a (a) accumulator a is the main register of the microcomputer. the transaction of data such as calculation, data transfer, and input/output are performed mainly through accumulator a. it consists of 16 bits, and the low-order 8 bits can also be used separately. the data length flag (m) determines whether the register is used as a 16-bit register or as an 8-bit register. flag m is a part of the processor status register which is described later. when an 8-bit register is selected, only the low-order 8 bits of accumulator a are used and the contents of the high-order 8 bits is unchanged. (2) accumulator b (b) accumulator b is a 16-bit register with the same function as accumulator a. accumulator b can be used instead of accumulator a. the use of accumulator b, however except for some instructions, requires more instruction bytes and execution cycles than that of accumulator a. accumulator b is also controlled by the data length flag (m) just as in accumulator a. 2.1.2 index register x (x) index register x consists of 16 bits and the low-order 8 bits can also be used separately. the index register length flag (x) determines whether the register is used as a 16-bit register or as an 8-bit register. flag x is a part of the processor status register which is described later. when an 8-bit register is selected, only the low-order 8 bits of index register x are used and the contents of the high-order 8 bits is unchanged. in an addressing mode in which index register x is used as an index register, the address obtained by adding the contents of this register to the operands contents is accessed. in the mvp or mvn instruction, a block transfer instruction, the contents of index register x indicates the low-order 16 bits of the source address. the third byte of the instruction is the high-order 8 bits of the source address. note: refer to 7700 family software manual for addressing modes. 2.1.3 index register y (y) index register y is a 16-bit register with the same function as index register x. just as in index register x, the index register length flag (x) determines whether this register is used as a 16-bit register or as an 8-bit register. in the mvp or mvn instruction, a block transfer instruction, the contents of index register y indicate the low-order 16 bits of the destination address. the second byte of the instruction is the high-order 8 bits of the destination address.
central processing unit (cpu) 2.1 central processing unit 2C4 7702/7703 group users manual 2.1.4 stack pointer (s) the stack pointer (s) is a 16-bit register. it is used for a subroutine call or an interrupt. it is also used when addressing modes using the stack are executed. the contents of s indicate an address (stack area) for storing registers during subroutine calls and interrupts. bank 0 16 is specified for the stack area. (refer to 2.1.6 program bank register (pg). ) when an interrupt request is accepted, the microcomputer stores the contents of the program bank register (pg) at the address indicated by the contents of s and decrements the contents of s by 1. then the contents of the program counter (pc) and the processor status register (ps) are stored. the contents of s after accepting an interrupt request is equal to the contents of s decremented by 5 before the accepting of the interrupt request. (refer to figure 2.1.2.) when completing the process in the interrupt routine and returning to the original routine, the contents of registers stored in the stack area are restored into the original registers in the reverse sequence (ps ? pc ? pg) by executing the rti instruction. the contents of s is returned to the state before accepting an interrupt request. the same operation is performed during a subroutine call, however, the contents of ps is not automatically stored. (the contents of pg may not be stored. this depends on the addressing mode.) the user should store registers other than those described above with software when the user needs them during interrupts or subroutine calls. additionally, initialize s at the beginning of the program because its contents are undefined at reset. the stack area changes when subroutines are nested or when multiple interrupt requests are accepted. therefore, make sure of the subroutines nesting depth not to destroy the necessary data. note: refer to 7700 family software manual for addressing modes. fig. 2.1.2 stored registers of the stack area l ??is the initial address that the stack pointer (s) indicates at accepting an interrupt request. the s? contents become ???after storing the above registers. address s? s? s? s? s stack area s? processor status register? low-order byte (ps l ) processor status register? high-order byte (ps h ) program counter? low-order byte (pc l ) program counter? high-order byte (pc h ) program bank register (pg)
7702/7703 group users manual 2.1 central processing unit central processing unit (cpu) 2C5 2.1.5 program counter (pc) the program counter is a 16-bit counter that indicates the low-order 16 bits of the address (24 bits) at which an instruction to be executed next (in other words, an instruction to be read out from an instruction queue buffer next) is stored. the contents of the high-order program counter (pc h ) become ff 16 , and the low-order program counter (pc l ) becomes fe 16 at reset. the contents of the program counter becomes the contents of the resets vector address (addresses fffe 16 , ffff 16 ) immediately after reset. figure 2.1.3 shows the program counter and the program bank register. fig. 2.1.3 program counter and program bank register 2.1.6 program bank register (pg) the program bank register is an 8-bit register. this register indicates the high-order 8 bits of the address (24 bits) at which an instruction to be executed next (in other words, an instruction to be read out from an instruction queue buffer next) is stored. these 8 bits are called bank. when a carry occurs after adding the contents of the program counter or adding the offset value to the contents of the program counter in the branch instruction and others, the contents of the program bank register is automatically incremented by 1. when a borrow occurs after subtracting the contents of the program counter, the contents of the program bank register is automatically decremented by 1. accordingly, there is no need to consider bank boundaries in programming, usually. in the single-chip mode, make sure to prevent the program bank register from being set to the value other than 00 16 by executing the branch instructions and others. it is because the access space of the single- chip mode is the internal area within the bank 0 16 . this register is cleared to 00 16 at reset. pc h pc l b7 b0 b15 b8 b7 b0 (b16) (b23) pg
central processing unit (cpu) 2.1 central processing unit 2C6 7702/7703 group users manual 2.1.7 data bank register (dt) the data bank register is an 8-bit register. in the following addressing modes using the data bank register, the contents of this register is used as the high-order 8 bits (bank) of a 24-bit address to be accessed. use the ldt instruction to set a value to this register. in the single-chip mode, make sure to fix this register to 00 16 . it is because the access space of the single-chip mode is the internal area within the bank 0 16 . this register is cleared to 00 16 at reset. l addressing modes using data bank register ?direct indirect ?direct indexed x indirect ?direct indirect indexed y ?absolute ?absolute bit ?absolute indexed x ?absolute indexed y ?absolute bit relative ?stack pointer relative indirect indexed y 2.1.8 direct page register (dpr) the direct page register is a 16-bit register. the contents of this register indicate the direct page area which is allocated in bank 0 16 or in the space across banks 0 16 and 1 16 . the following addressing modes use the direct page register. the contents of the direct page register indicate the base address (the lowest address) of the direct page area. the space which extends to 256 bytes above that address is specified as a direct page. the direct page register can contain a value from 0000 16 to ffff 16 . when it contains a value equal to or more than ff01 16 , the direct page area spans the space across banks 0 16 and 1 16 . when the contents of low-order 8 bits of the direct page register is 00 16 , the number of cycles required to generate an address is 1 cycle smaller than the number when its contents are not 00 16 . accordingly, the access efficiency can be enhanced in this case. this register is cleared to 0000 16 at reset. figure 2.1.4 shows a setting example of the direct page area. l addressing modes using direct page register ?direct ?direct bit ?direct indexed x ?direct indexed y ?direct indirect ?direct indexed x indirect ?direct indirect indexed y ?direct indirect long ?direct indirect long indexed y ?direct bit relative
7702/7703 group users manual 2.1 central processing unit central processing unit (cpu) 2C7 direct page area when dpr = 0000 16 direct page area when dpr = 0123 16 (note 1) direct page area when dpr = ff10 16 (note 2) bank 0 16 bank 1 16 0 16 ff 16 123 16 222 16 ff10 16 1000f 16 0 16 ffff 16 10000 16 notes 1 : the number of cycles required to generate an address is 1 cycle smaller when the low-order 8 bits of the dpr are 00 16 . 2: the direct page area spans the space across banks 0 16 and 1 16 when the dpr is ff01 16 or more. fig. 2.1.4 setting example of direct page area
central processing unit (cpu) 2.1 central processing unit 2C8 7702/7703 group users manual 2.1.9 processor status register (ps) the processor status register is an 11-bit register. figure 2.1.5 shows the structure of the processor status register. note : 0 is always read from each of bits 15C11. b15 b8 b7 b0 b1 b2 b3 b4 b5 b6 b14 b9 b10 b11 b12 b13 0nc z i d x m v 0 ipl 0 0 0 processor staus register (ps) fig. 2.1.5 processor status register structure (1) bit 0: carry flag (c) it retains a carry or a borrow generated in the arithmetic and logic unit (alu) during an arithmetic operation. this flag is also affected by shift and rotate instructions. when the bcc or bcs instruction is executed, this flags contents determine whether the program causes a branch or not. use the sec or sep instruction to set this flag to 1, and use the clc or clp instruction to clear it to 0. (2) bit 1: zero flag (z) it is set to 1 when a result of an arithmetic operation or data transfer is 0, and cleared to 0 when otherwise. when the bne or beq instruction is executed, this flags contents determine whether the program causes a branch or not. use the sep instruction to set this flag to 1, and use the clp instruction to clear it to 0. note: this flag is invalid in the decimal mode addition (the adc instruction). (3) bit 2: interrupt disable flag (i) it disables all maskable interrupts (interrupts other than watchdog timer, the brk instruction, and zero division). interrupts are disabled when this flag is 1. when an interrupt request is accepted, this flag is automatically set to 1 to avoid multiple interrupts. use the sei or sep instruction to set this flag to 1, and use the cli or clp instruction to clear it to 0. this flag is set to 1 at reset. (4) bit 3: decimal mode flag (d) it determines whether addition and subtraction are performed in binary or decimal. binary arithmetic is performed when this flag is 0. when it is 1, decimal arithmetic is performed with each word treated as two or four digits decimal (determined by the data length flag). decimal adjust is automatically performed. decimal operation is possible only with the adc and sbc instructions. use the sep instruction to set this flag to 1, and use the clp instruction to clear it to 0. this flag is cleared to 0 at reset. (5) bit 4: index register length flag (x) it determines whether each of index register x and index register y is used as a 16-bit register or an 8-bit register. that register is used as a 16-bit register when this flag is 0, and as an 8-bit register when it is 1. use the sep instruction to set this flag to 1, and use the clp instruction to clear it to 0. this flag is cleared to 0 at reset. note: when transferring data between registers which are different in bit length, the data is transferred with the length of the destination register, but except for the txa , tya , txb , tyb and txs instructions. refer to 7700 family software manual for details.
7702/7703 group users manual 2.1 central processing unit central processing unit (cpu) 2C9 (6) bit 5: data length flag (m) it determines whether to use a data as a 16-bit unit or as an 8-bit unit. a data is treated as a 16- bit unit when this flag is 0, and as an 8-bit unit when it is 1. use the sem or sep instruction to set this flag to 1, and use the clm or clp instruction to clear it to 0. this flag is cleared to 0 at reset. note: when transferring data between registers which are different in bit length, the data is transferred with the length of the destination register, but except for the txa , tya , txb , tyb and txs instructions. refer to 7700 family software manual for details. (7) bit 6: overflow flag (v) it is used when adding or subtracting with a word regarded as signed binary. when the data length flag (m) is 0, the overflow flag is set to 1 when the result of addition or subtraction exceeds the range between C32768 and +32767, and cleared to 0 in all other cases. when the data length flag (m) is 1, the overflow flag is set to 1 when the result of addition or subtraction exceeds the range between C128 and +127, and cleared to 0 in all other cases. the overflow flag is also set to 1 when a result of division exceeds the register length to be stored in the div instruction, a division instruction. when the bvc or bvs instruction is executed, this flags contents determine whether the program causes a branch or not. use the sep instruction to set this flag to 1, and use the clv or clp instruction to clear it to 0. note: this flag is invalid in the decimal mode. (8) bit 7: negative flag (n) it is set to 1 when a result of arithmetic operation or data transfer is negative. (bit 15 of the result is 1 when the data length flag (m) is 0, or bit 7 of the result is 1 when the data length flag (m) is 1.) it is cleared to 0 in all other cases. when the bpl or bmi instruction is executed, this flag determines whether the program causes a branch or not. use the sep instruction to set this flag to 1, and use the clp instruction to clear it to 0. note: this flag is invalid in the decimal mode. (9) bits 10 to 8: processor interrupt priority level (ipl) these three bits can determine the processor interrupt priority level to one of levels 0 to 7. the interrupt is enabled when the interrupt priority level of a required interrupt, which is set in each interrupt control register, is higher than ipl. when an interrupt request is accepted, ipl is stored in the stack area, and ipl is replaced by the interrupt priority level of the accepted interrupt request. there are no instruction to directly set or clear the bits of ipl. ipl can be changed by storing the new ipl into the stack area and updating the processor status register with the pul or plp instruction. the contents of ipl is cleared to 000 2 at reset.
central processing unit (cpu) 7702/7703 group users manual 2C10 2.2 bus interface unit 2.2 bus interface unit a bus interface unit (biu) is built-in between the central p rocessing unit (cpu) and memory?i/o devices. bius function and operation are described below. when externally connecting devices, refer to chapter 12. connection with external devices. 2.2.1 overview transfer operation between the cpu and memory?i/o devices is always performed via the biu. figure 2.2.1 shows the bus and bus interface unit (biu). the biu reads an instruction from the memory before the cpu executes it. when the cpu reads data from the memory ? i/o device, the cpu first specifies the address from which data is read to the biu. the biu reads data from the specifi ed address and passes it to the cpu. a when the cpu writes data to the memory i/o device, the cpu first specifies the address to which dat a is written to the biu and write data. the biu writes the dat a to the specified address. ? to perform the above operations to a , the biu inputs and outputs the control signals, and contro l the bus. ?
central processing unit (cpu) 7702/7703 group users manual 2C11 2.2 bus interface unit fig. 2.2.1 bus and bus interface unit (biu) m377 0 2 internal bus d 8 to d 15 central processing unit (cpu) sfr : special function register notes 1: the cpu bus, internal bus, and external bus are independent of one another. 2: refer to chapter 12. connection with external devices about control signals of the external bus. internal bus a 0 to a 23 external device internal control signal cpu bus internal bus internal bus d 0 to d 7 internal memory internal peripheral device (sfr) external bus a 0 to a 7 a 16 /d 0 to a 23 /d 7 control signals bus interface unit (biu) a 8 /d 8 to a 15 /d 15 bus conversion circuit
central processing unit (cpu) 7702/7703 group users manual 2C12 2.2 bus interface unit 2.2.2 functions of bus interface unit (biu) the bus interface unit (biu) consists of four registers shown in figure 2.2.2. table 2.2.1 lists the functions of each register. program address register instruction queue buffer data address register data buffer pa da q 0 q 1 q 2 db h db l b23 b0 b0 b0 b0 b23 b15 b7 table 2.2.1 functions of each register functions indicates the storage address for the instruction which is next taken into the instruction queue buffer. temporarily stores the instruction which has been taken in. indicates the address for the data which is next read from or written to. temporarily stores the data which is read from the memory?i/o device by the biu or which is written to the memory?i/o device by the cpu. name program address register instruction queue buffer data address register data buffer fig. 2.2.2 register structure of bus interface unit (biu)
central processing unit (cpu) 7702/7703 group users manual 2C13 2.2 bus interface unit the cpu and the bus send or receive data via biu because each operates based on different clocks (note). the biu allows the cpu to operate at high speed without waiting for access to the memory ? i/ o devices that require a long access time. the bius functions are described bellow. note: the cpu operates based on f cpu . the period of f cpu is normally the same as that of the internal clock f . the internal bus operates based on the e signal. the period of the e signal is twice that of the internal clock f at a minimum. (1) reading out instruction (instruction prefetch) when the cpu does not require to read or write data, that is, when the bus is not in use, the biu reads instructions from the memory and stores them in the instruction queue buffer. this is called instruction prefetch. the cpu reads instructions from the instruction queue buffer and executes them, so that the cpu can operate at high speed without waiting for access to the memory which requires a long access time. when the instruction queue buffer becomes empty or contains only 1 byte of an instruction, the biu performs instruction prefetch. the instruction queue buffer can store instructions up to 3 bytes. the contents of the instruction queue buffer is initialized when a branch or jump instruction is executed, and the biu reads a new instruction from the destination address. when instructions in the instruction queue buffer are insufficient for the cpus needs, the biu extends the pulse duration of clock f cpu in order to keep the cpu waiting until the biu fetches the required number of instructions or more. (2) reading data from memory?i/o device the cpu specifies the storage address of data to be read to the bius data address register, and requires data. the cpu waits until data is ready in the biu. the biu outputs the address received from the cpu onto the address bus, reads contents at the specified address, and takes it into the data buffer. the cpu continues processing, using data in the data buffer. however, if the biu uses the bus for instruction prefetch when the cpu requires to read data, the biu keeps the cpu waiting. (3) writing data to memory?i/o device the cpu specifies the address of data to be written to the bius data address register. then, the cpu writes data into the data buffer. the biu outputs the address received from the cpu onto the address bus and writes data in the data buffer into the specified address. the cpu advances to the next processing without waiting for completion of bius write operation. however, if the biu uses the bus for instruction prefetch when the cpu requires to write data, the biu keeps the cpu waiting. (4) bus control to perform the above operations (1) to (3), the biu inputs and outputs the control signals, and controls the address bus and the data bus. the cycle in which the biu controls the bus and accesses the memory?i/o device is called the bus cycle. refer to chapter 12. connection with external devices about the bus cycle at accessing the external devices.
central processing unit (cpu) 7702/7703 group users manual 2C14 2.2 bus interface unit 2.2.3 operation of bus interface unit (biu) figure 2.2.3 shows the basic operating waveforms of the bus interface unit (biu). about signals which are input/output externally when accessing external devices, refer to chapter 12. connection with external devices. (1) when fetching instructions into the instruction queue buffer when the instruction which is next fetched is located at an even address, the biu fetches 2 bytes at a time with the timing of waveform (a). however, when accessing an external device which is connected with the 8-bit external data bus width (byte = h), only 1 byte is fetched. when the instruction which is next fetched is located at an odd address, the biu fetches only 1 byte with the timing of waveform (a). the contents at the even address are not taken. (2) when reading or writing data to and from the memory?i/o device when accessing a 16-bit data which begins at an even address, waveform (a) is applied. the 16 bits of data are accessed at a time. when accessing a 16-bit data which begins at an odd address, waveform (b) is applied. the 16 bits of data are accessed separately in 2 operations, 8 bits at a time. invalid data is not fetched into the data buffer. a when accessing an 8-bit data at an even address, waveform (a) is applied. the data at the odd address is not fetched into the data buffer. ? when accessing an 8-bit data at an odd address, waveform (a) is applied. the data at the even address is not fetched into the data buffer. for instructions that are affected by the data length flag (m) and the index register length flag (x), operation or is applied when flag m or x = 0; operation a or ? is applied when flag m or x = 1.
central processing unit (cpu) 7702/7703 group users manual 2C15 2.2 bus interface unit fig. 2.2.3 basic operating waveforms of bus interface unit (biu) address (a) data ( even address ) data ( odd address ) e internal address bus (a 0 to a 23 ) internal data bus (d 0 to d 7 ) internal data bus (d 8 to d 15 ) (b) address (odd address) address (even address) data (even address) data (odd address) invalid data invalid data internal address bus (a 0 to a 23 ) internal data bus (d 0 to d 7 ) internal data bus (d 8 to d 15 ) e
7702/7703 group users manual central processing unit (cpu) 2C16 2.3 access space 2.3 access space figure 2.3.1 shows the m37702s access space. by combination of the program counter (pc), which is 16 bits of structure, and the program bank register (pg), a 16-mbyte space from addresses 000000 16 to ffffff 16 can be accessed. for details about access of an external area, refer to chapter 12. connection with external devices. the memory and i/o devices are allocated in the same access space. accordingly, it is possible to perform transfer and arithmetic operations using the same instructions without discrimination of the memory from i/o devices. : indicates the memory allocaton of the internal areas. : indicates that nothing is allocated. note : memory assignment of internal area varies according to the type of microcomputer. this figure shows the case of the m37702m2bxxxfp. refer to appendix 1. memory assignment for other products. sfr : special function register 000000 16 000080 16 00ffff 16 010000 16 0e0000 16 ff0000 16 ffffff 16 sfr area internal ram area bank 0 16 internal rom area 020000 16 00027f 16 00007f 16 bank 1 16 bank ff 16 bank fe 16 00c000 16 fig. 2.3.1 m37702s access space
central processing unit (cpu) 7702/7703 group users manual 2C17 2.3.1 banks the access space is divided in units of 64 kbytes. this unit is called bank. the high-order 8 bits of address (24 bits) indicate a bank, which is specified by the program bank register (pg) or data bank register (dt). each bank can be accessed efficiently by using an addressing mode that uses the data bank register (dt). if the program counter (pc) overflows at a bank boundary, the contents of the program bank register (pg) is incremented by 1. if a borrow occurs in the program counter (pc) as a result of subtraction, the contents of the program bank register (pg) is decremented by 1. normally, accordingly, the user can program without concern for bank boundaries. sfr (special function register), internal ram, and internal rom are assigned in bank 0 16 . for details, refer to section 2.4 memory assignment. 2.3.2 direct page a 256-byte space specified by the direct page register (dpr) is called direct page. a direct page is specified by setting the base address (the lowest address) of the area to be specified as a direct page into the direct page register (dpr). by using a direct page addressing mode, a direct page can be accessed with less instruction cycles than otherwise. note: refer also to section 2.1 central processing unit. 2.3 access space
7702/7703 group users manual central processing unit (cpu) 2C18 2.4 memory assignment 2.4 memory assignment this section describes the internal areas memory assignment. for more information about the external area, refer also to section 2.5 processor modes. 2.4.1 memory assignment in internal area sfr (special function register), internal ram, and internal rom are assigned in the internal area. figure 2.4.1 shows the internal areas memory assignment. (1) sfr area the registers for setting internal peripheral devices are assigned at addresses 0 16 to 7f 16 . this area is called sfr (special function register). figure 2.4.2 shows the sfr areas memory assignment. for each register in the sfr area, refer to each functional description in this manual. for the state of the sfr area immediately after a reset, refer to section 13.1.2 state of cpu, sfr area, and internal ram area. (2) internal ram area the m37702m2bxxxfp (see note ) assigns the 512-byte static ram at addresses 80 16 to 27f 16 . the internal ram area is used as a stack area, as well as an area to store data. accordingly, note that set the nesting depth of a subroutine and multiple interrupts level not to destroy the necessary data. (3) internal rom area the m37702m2bxxxfp (see note ) assigns the 16-kbyte mask ram at addresses c000 16 to ffff 16 . its addresses ffd6 16 to ffff 16 are the vector addresses, which are called the interrupt vector table, for reset and interrupts. in the microprocessor mode and the external rom version where use of the internal rom area is inhibited, assign a rom at addresses ffd6 16 to ffff 16 . note : refer to appendix 1. memory assignment for other products.
central processing unit (cpu) 7702/7703 group users manual 2C19 2.4 memory assignment timer a0 l h l h l h l h l h l h l h h l h timer a4 l h l timer a3 h timer a2 l h timer a1 l h l h l h l h l h l h timer b2 l h timer b1 l h timer b0 l h a-d conversion uart1 transmit uart1 recieve uart0 transmit uart0 recieve int 2 int 1 int 0 watchdog timer dbc (note 1) brk instruction zero divide reset ffd6 16 ffd8 16 ffda 16 ffdc 16 ffde 16 ffe0 16 ffe2 16 ffe8 16 ffec 16 ffe4 16 ffe6 16 ffea 16 ffee 16 fff0 16 fff2 16 fff4 16 fff6 16 fff8 16 fffa 16 fffc 16 fffe 16 interrupt vector table 00007f 16 000000 16 000080 16 00ffff 16 00ffd6 16 internal ram area refer to figure 2.4.2. l notes 1: dbc is an interrupt only for debugging; do not use this interrupt. 2: access to the internal rom area is disabled in the microprocessor mode. (refer to section 2.5 processor modes. ) 3: memory assignment of internal area varies according to the type of microcomputer. refer to appendix 1. memory assignment for other products. internal rom area sfr area 00c000 16 00027f 16 m37702m2bxxxfp : the internal memory is not allocated. fig. 2.4.1 internal areas memory assignment
7702/7703 group user?s manual central processing unit (cpu) 2C20 2.4 memory assignment fig. 2.4.2 sfr areas memory map 0 16 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16 16 16 17 16 18 16 19 16 1a 16 1b 16 1c 16 1d 16 1e 16 1f 16 20 16 21 16 22 16 23 16 24 16 25 16 26 16 27 16 28 16 29 16 2a 16 2b 16 2c 16 2d 16 2e 16 2f 16 30 16 31 16 32 16 33 16 34 16 35 16 36 16 37 16 38 16 39 16 3a 16 3b 16 3c 16 3d 16 3e 16 3f 16 b 16 c 16 d 16 e 16 f 16 a 16 address 50 16 51 16 52 16 53 16 54 16 55 16 56 16 57 16 58 16 59 16 5a 16 5b 16 5c 16 5d 16 5e 16 5f 16 60 16 61 16 62 16 63 16 64 16 65 16 66 16 67 16 68 16 69 16 6a 16 6b 16 6c 16 6d 16 6e 16 6f 16 70 16 71 16 72 16 73 16 74 16 75 16 76 16 77 16 78 16 79 16 7a 16 7b 16 7c 16 7d 16 7e 16 7f 16 address 4e 16 4f 16 4c 16 4d 16 4a 16 4b 16 48 16 49 16 46 16 47 16 44 16 45 16 42 16 43 16 40 16 41 16 port p8 direction register timer a1 register timer a4 register timer a2 register timer a3 register timer b0 register timer b1 register timer b2 register count start register one-shot start register up-down register timer a0 register timer a0 mode register timer a1 mode register timer a2 mode register timer a3 mode register timer a4 mode register timer b0 mode register timer b1 mode register timer b2 mode register processor mode register watchdog timer register watchdog timer frequency select register a-d conversion interrupt control register uart0 receive interrupt control register uart1 receive interrupt control register timer a0 interrupt control register timer a1 interrupt control register timer a2 interrupt control register timer a3 interrupt control register timer a4 interrupt control register timer b0 interrupt control register timer b1 interrupt control register timer b2 interrupt control register port p4 register port p5 register port p4 direction register port p5 direction register port p6 register port p7 register port p6 direction register port p7 direction register port p8 register a-d control register uart0 transmit/receive mode register uart0 baud rate register (brg0) uart0 transmit/receive control register 0 uart0 transmit/receive control register 1 uart0 transmit buffer register uart1 transmit/receive control register 0 uart1 transmit/receive mode register uart1 baud rate register (brg1) uart1 transmit/receive control register 1 uart0 receive buffer register uart1 transmit buffer register uart1 receive buffer register a-d sweep pin select register a-d register 0 a-d register 1 a-d register 2 a-d register 3 a-d register 4 a-d register 5 uart0 transmit interrupt control register uart1 transmit interrupt control register int 0 interrupt control register int 1 interrupt control register int 2 interrupt control register a-d register 6 a-d register 7 port p0 register port p 1 register port p0 direction register port p1 direction register port p2 register port p3 register port p2 direction register port p3 direction register
central processing unit (cpu) 7702/7703 group users manual 2C21 2.5 processor modes the m37702 can operate in 3 processor modes: single-chip mode, memory expansion mode, and microprocessor mode. some pins functions, memory assignment, and access space vary according to the processor modes. this section describes the differences between the processor modes. figure 2.5.1 shows a memory assignment in each processor mode. 2.5 processor modes 000000 16 00ffff 16 000080 16 sfr area internal rom area single-chip mode internal ram area sfr area memory expansion mode 010000 16 ffffff 16 sfr area microprocessor mode not used internal ram area internal ram area internal rom area 000002 16 000009 16 (note 1) : external area; accessing this area make it possible to access external connected devices. notes 1: addresses 2 16 to 9 16 become a external area in the memory expansion mode and microprocessor mode. 2: refer to appendix 1. memory assignment for products other than m37702m2bxxxfp. 00027f 16 00c000 16 000280 16 00bfff 16 memory expansion mode microprocessor mode fig. 2.5.1 memory assignment in each processor mode for m37702m2bxxxfp
7702/7703 group users manual central processing unit (cpu) 2C22 2.5.1 single-chip mode use this mode when not using external devices. in this mode, ports p0 to p8 function as programmable i/o ports (when using an internal peripheral device, they function as its i/o pins). in the single-chip mode, only the internal area (sfr, internal ram, and internal rom) can be accessed. 2.5.2 memory expansion and microprocessor modes use these modes when connecting devices externally. in these modes, an external device can be connected to any required location in the 16-mbyte access space. for access to external devices, refer to chapter 12. connection with external devices. the memory expansion and microprocessor modes have the same functions except for the following: ?in the microprocessor mode, access to the internal rom area is disabled by force, and the internal rom area is handled as an external area. ?in the microprocessor mode, port p4 2 always functions as the clock f 1 output pin. in the memory expansion and microprocessor modes, p0 to p3, p4 0 , and p4 1 when the external data bus width is 16 bits function as the i/o pins for the signals required for accessing external devices. consequently, these pins cannot be used as programmable i/o ports. if an external device is connected with an area with which the internal area overlaps, when this overlapping area is read, data in the internal area is taken in the cpu, but data in the external area is not taken in. if data is written to an overlapping area, the data is written to the internal area, and a signal is output externally at the same timing as writing to the internal area. figure 2.5.2 shows a pin configuration in each processor mode. table 2.5.1 lists the functions of p0 to p4 in each processor mode. for the function of each pin, refer to section 1.3 pin description, chapter 3. input/output pins, each descriptions of internal peripheral devices and chapter 12. connection with external devices. 2.5 processor modes
central processing unit (cpu) 7702/7703 group users manual 2C23 2.5 processor modes fig. 2.5.2 pin configuration in each processor mode (top view) p8 4 /c ts 1 /r ts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /in t 2 p6 3 /in t 1 p6 2 /in t 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 14 3 25 p2 4 p2 5 p2 6 p2 7 p3 0 p3 1 p3 2 p3 3 v ss e x out x in reset cnv ss ] 1 byte p4 0 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /c lk 0 p8 0 /c ts 0 /r ts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad tr g p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 p1 3 p1 4 p1 5 p1 6 p1 7 p2 0 p2 1 p2 2 p2 3 43 42 41 m37702m2bxxxfp 22 23 24 p4 1 p4 7 p4 6 p4 5 p4 4 p4 3 p4 2 / 1 p0 0 p0 1 p0 2 p0 3 p0 4 p0 5 p0 6 p0 7 p1 0 p1 1 p1 2 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /in t 2 p6 3 /in t 1 p6 2 /in t 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 1 4 3 2 5 a 20 /d 4 a 21 /d 5 a 22 /d 6 a 23 /d 7 r/w bhe ale hlda v ss e x out x in reset cnv ss byte hold 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 a 11 /d 11 a 12 /d 12 a 13 /d 13 a 14 /d 14 a 15 /d 15 a 16 /d 0 a 17 /d 1 a 18 /d 2 a 19 /d 3 43 42 41 m37702m2 bxxxfp 22 23 24 rdy p4 7 p4 6 p4 5 p4 4 p4 3 ] 2 p4 2 / 1 p8 4 /c ts 1 /r ts 1 p8 5 /c lk 1 p8 6 /r x d 1 p8 7 /t x d 1 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 /d 8 a 9 /d 9 a 10 /d 10 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /c lk 0 p8 0 /c ts 0 /r ts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad tr g p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 ] 1 connect these pins to vss pin in the single-chip mode. : these pins have different functions between the single-chip and the memory expansion/micropro- cessor modes. ] 2 this pin functions as 1 in the microprocessor mode. : these pins have different functions between the single-chip and the memory expansion/micropro- cessor modes. l memory expansion/microprocessor mode l single-chip mode
7702/7703 group users manual central processing unit (cpu) 2C24 table 2.5.1 functions of ports p0 to p4 in each processor mode 2.5 processor modes p0 pins p1 processor modes p4 p2 p: functions as a programmable i/o port. (note 2) p p: functions as a programmable i/o port. p single-chip mode p: functions as a programmable i/o port. p p3 ? when external data bus width is 16 bits (byte = l) memory expansion/microprocessor mode d(even) d (even): data at even address d(odd) d (odd): data at odd address a 0 C a 7 (note 1) hlda p3 1 p3 2 p3 0 p3 3 ale bhe notes 1: p4 2 also functions as the clock 1 output pin. (refer to chapter 12. connection with external devices. ) 2: p4 2 functions as a programmable i/o port in the memory expansion mode, and that functions as the clock 1 output pin by software selection. (refer to chapter 12. connection with external devices. ) 3: this table lists a switch of pins functions by switching the processor mode. refer to the following section about the input/output timing of each signal: ? chapter 12. connection with external devices. ? chapter 15. electrical characteristics. 4: the 7703 group does not have p3 3 / hlda pin. p: functions as a programmable i/o port. p p: functions as a programmable i/o port. p ? when external data bus width is 8 bits (byte = h) a 8 C a 15 a 8 C a 15 ? when external data bus width is 16 bits (byte = l) ? when external data bus width is 8 bits (byte = h) a 16 C a 23 a 16 C a 23 r/w p: functions as a programmable i/o port. rdy hold p4 1 p4 2 p4 0 1 p4 3 C p4 7 p (note 4) d d : data
central processing unit (cpu) 7702/7703 group users manual 2C25 2.5.3 setting processor modes the voltage supplied to the cnvss pin and the processor mode bits (bits 1 and 0 at address 5e 16 ) set the processor mode. l when vss level is supplied to cnvss pin after a reset, the microcomputer starts operating in the single-chip mode. the processor mode is switched by the processor mode bits after the microcomputer starts operating. when the processor mode bits are set to 01 2 , the microcomputer enters the memory expansion mode; when these bits are set to 10 2 , the microcomputer enters the microprocessor mode. _ the processor mode is switched at the rising edge of signal e after writing to the processor mode bits. figure 2.5.3 shows the timing when pin functions are switched by switching the processor mode from the single-chip mode to the memory expansion or microprocessor mode with the processor mode bits. when the processor mode is switched during the program execution, the contents of the instruction queue buffer is not initialized. (refer to appendix 6. q & a. ) l when vcc level is supplied to cnvss pin after a reset, the microcomputer starts operating in the microprocessor mode. in this case, the microcomputer cannot operate in the other modes. (fix the processor mode bits to 10 2 .) table 2.5.2 lists the methods for setting processor modes. figure 2.5.4 shows the structure of processor mode register (address 5e 16 ). 2.5 processor modes external address bus a 0 p0 0 e written to processor mode bits programmable i/o port p0 0 note: functions of pins p0 1 to p0 7 , p1 to p3, p4 0 to p4 2 are switched at the same timing shown above. function of pin p4 2 is, however, switched only when the processor mode is switched to the microprocessor mode. fig. 2.5.3 timing when pin functions are switched
7702/7703 group users manual central processing unit (cpu) 2C26 processor mode cnvss pin level processor mode bits b1 b0 single-chip mode vss (0 v) ( note 1 ) 0 memory expansion mode vss (0 v) ( note 1 ) 0 microprocessor mode vss (0 v) ( note 1 ) 1 vcc (5 v) ( note 2 ) 2.5 processor modes notes 1: the microcomputer starts operating in the single-chip mode after a reset. the microcomputer can be switched to the other processor modes by setting the processor mode bits. 2: the microcomputer starts operating in the microprocessor mode after a reset. the microcomputer cannot operate in the other modes, so that fix the processor mode bits as follows: ?b1 = 1 and b0 = 0. table 2.5.2 methods for setting processor modes bit bit name functions at reset rw 0 1 2 3 4 5 6 7 processor mode bits software reset bit interrupt priority detection time select bits clock 1 output select bit (note 2) 0 0 0 0 0 0 : single-chip mode 0 1 : memory expansion mode 1 0 : microprocessor mode 1 1 : not selected the microcomputer is reset by writing 1 to this bit. the value is 0 at reading. 0 0 : 7 cycles of 0 1 : 4 cycles of 1 0 : 2 cycles of 1 1 : not selected 0 : clock 1 output disabled (p4 2 functions as a programmable i/o port.) 1 : clock 1 output enabled (p4 2 functions as a clock 1 out- put pin.) 0 0 b1 b0 b5 b4 processor mode register (address 5e 16 ) (note1) notes 1: while supplying the vcc level to the cnvss pin, this bit becomes 1 after a reset. (fixed to 1.) 2: this bit is ignored in the microprocessor mode. (it may be either 0 or 1.) b1 b0 b2 b3 b4 b5 b6 b7 0 rw rw wait bit rw wo 0 rw 0 rw fix this bit to 0. rw rw 0 : software wait is inserted when accessing external area. 1 : no software wait is inserted when accessing external area. : bits 7 to 2 are not used for setting of the processor mode. fig. 2.5.4 structure of processor mode register 1 0 0
central processing unit (cpu) 7702/7703 group users manual 2C27 [precautions when selecting the processor mode] [precautions when selecting processor mode] 1. for the products operating only in the single-chip mode, be sure to set the following: ?connect the cnvss pin with vss. ?fix the processor mode bits (bits 1 and 0 at address 5e 16 ) to 00 2 . 2. the external rom version is only for the microprocessor mode. accordingly, be sure to set the following: ?connect the cnvss pin with vcc. ?fix the processor mode bits (bits 1 and 0 at address 5e 16 ) to 10 2 . 3. when using the memory expansion mode or microprocessor mode, be sure to set bits 0 and 1 of the port p4 direction register to 0. _____ _____ ____ ____ set the above setting whether using p4 0 /hold pin as hold pin and p4 1 /rdy pin as rdy pin. for also the external rom version, set the above setting. additionally, it is not need to set the port p0 to p3 direction registers.
7702/7703 group users manual central processing unit (cpu) 2C28 [precautions when selecting the processor mode] memorandum
chapter 3 input/output pins 3.1 programmable i/o ports 3.2 i/o pins of internal peripheral devices
input/output pins 3C2 7702/7703 group users manual this chapter describes the programmable i/o ports in the single-chip mode. for p0 to p4, which change their functions according to the processor mode, refer also to the section 2.5 processor modes and chapter 12. connection with external devices. p4 2 and p5 to p8 also function as the i/o pins of the internal peripheral devices. for the functions, refer to the section 3.2 i/o pins of internal peripheral devices and relevant sections of each internal peripheral devices. 7703 group the 7703 group varies with the 7702 group in the number of pins, pins assignment and others. refer to the section chapter 20. 7703 group . 3.1 programmable i/o ports the 7702 group has 68 programmable i/o ports, p0 to p8. the programmable i/o ports have direction registers and port registers in the sfr area. figure 3.1.1 shows the memory map of direction registers and port registers. fig. 3.1.1 memory map of direction registers and port registers 3.1 programmable i/o ports port p4 register port p5 register port p4 direction register port p5 direction register port p6 register port p7 register port p6 direction register port p7 direction register port p8 register port p8 direction register 8 16 9 16 a 16 b 16 c 16 d 16 e 16 f 16 10 16 11 16 12 16 13 16 14 16 addresses port p0 register port p1 register port p0 direction register port p1 direction register port p2 register port p3 register port p2 direction register port p3 direction register 2 16 3 16 4 16 5 16 6 16 7 16
7702/7703 group users manual 3C3 input/output pins 3.1.1 direction register this register determines the input/output direction of the programmable i/o port. each bit of this register corresponds one for one to each pin of the microcomputer. figure 3.1.2 shows the structure of port pi (i = 0 to 8) direction register. 3.1 programmable i/o ports bit bit name functions 0 1 2 3 4 5 6 7 port pi 0 direction bit port pi 2 direction bit port pi 3 direction bit port pi 4 direction bit port pi 6 direction bit 0 : input mode (functions as an input port) 1 : output mode (functions as an output port) port pi 5 direction bit port pi direction register (i = 0 to 8) (addresses 4 16 , 5 16 , 8 16 , 9 16 , c 16 , d 16 , 10 16 , 11 16 , 14 16 ) b1 b0 b2 b3 b4 b5 b6 b7 port pi 1 direction bit port pi 7 direction bit at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw notes 1: bits 7 to 4 of the port p3 direction register cannot be written (they may be either ??or ?? and are fixed to ??at reading. 2: in the memory expansion mode or the microprocessor mode, fix bits 0 and 1 of the port p4 direction register to ?? 7703 group fix the following bits which do not have the corresponding pin to ?? ?bit 3 of port p3 direction register ?bits 3 to 6 of port p4 direction register ?bits 0, 1, 6, and 7 of port p6 direction register ?bits 3 to 6 of port p7 direction register ?bits 4 and 5 of port p8 direction register bit corresponding pin b7 b6 b5 b4 b3 b2 b1 b0 pi 7 pi 6 pi 5 pi 4 pi 3 pi 2 pi 1 pi 0 fig. 3.1.2 structure of port pi (i = 0 to 8) direction register
input/output pins 3C4 7702/7703 group users manual 3.1.2 port register data is input/output to/from externals by writing/reading data to/from the port register. the port register consists of a port latch which holds the output data and a circuit which reads the pin state. each bit of the port register corresponds one for one to each pin of the microcomputer. figure 3.1.3 shows the structure of the port pi (i = 0 to 8) register. l when outputting data from programmable i/o ports set to output mode by writing data to the corresponding bit of the port register, the data is written into the port latch. the data is output from the pin according to the contents of the port latch. by reading the port register of a port set to output mode, the contents of the port latch is read out, instead of the pin state. accordingly, the output data is correctly read without being affected by an external load. (refer to figures 3.1.4 and 3.1.5.) l when inputting data from programmable i/o ports set to input mode the pin which is set to input mode enters the floating state. by reading the corresponding bit of the port register, the data which is input from the pin can be read out. by writing data to the port register of a programmable i/o port set to input mode, the data is only written into the port latch and is not output to externals. the pin retains floating. 3.1 programmable i/o ports
7702/7703 group users manual 3C5 input/output pins 3.1 programmable i/o ports bit bit name functions 0 1 2 3 4 5 6 7 port pi 0 port pi 2 port pi 3 port pi 4 port pi 6 data is input/output to/from a pin by reading/writing from/to the corres- ponding bit. port pi 5 port pi register (i = 0 to 8) (addresses 2 16 , 3 16 , 6 16 , 7 16 , a 16 , b 16 , e 16 , f 16 , 12 16 ) b1 b0 b2 b3 b4 b5 b6 b7 port pi 1 port pi 7 at reset rw undefined note: bits 7 to 4 of the port p3 register cannot be written (they may be either ??or ?? and are fixed to ??at reading. undefined undefined undefined undefined undefined undefined undefined 0 : ??level 1 : ??level rw rw rw rw rw rw rw rw fig. 3.1.3 port pi (i = 0 to 8) register structure
input/output pins 3C6 7702/7703 group users manual figures 3.1.4 and 3.1.5 show the port peripheral circuits. 3.1 programmable i/o ports fig. 3.1.4 port peripheral circuits (1) ports p0 0 /a 0 to p0 7 /a 7 , p1 0 /a 8 /d 8 to p1 7 /a 15 /d 15 , p2 0 /a 16 /d 0 to p2 7 /a 23 /d 7 , p3 0 /r/w to p3 3 /hlda, p4 3 to p4 6 [inside dotted-line not included] data bus direction register port latch ports p4 2 / 1 , p8 3 /txd 0 , p8 7 /txd 1 [inside dotted-line not included. ] ports p5 0 /ta0 out , p5 2 /ta1 out , p5 4 /ta2 out , p5 6 /ta3 out , p6 0 /ta4 out [inside dotted-line included. ] data bus 1 output port latch direction register p8 2 /rxd 0 , p8 6 /rxd 1 ports p4 0 /hold, p4 1 /rdy, p4 7 , p5 1 /ta0 in , p5 3 /ta1 in , p5 5 /ta2 in , p5 7 /ta3 in , [inside dotted-line included] p6 1 /ta4 in , p6 2 /int 0 to p6 4 /int 2 , p6 5 /tb0 in to p6 7 /tb2 in , (there is no hysteresis for p8 2 /rxd 0 and p8 6 /rxd 1 .) ports p7 0 /an 0 to p7 6 /an 6 port p7 7 /an 7 /ad trg data bus analog input direction register port latch [inside dotted-line not included. ] [inside dotted-line included. ] 7703 group there are not pins p3 3 , p4 3 C p4 6 , p6 0 , p6 1 , p6 6 , p6 7 , p7 3 C p7 6 .
7702/7703 group users manual 3C7 input/output pins e output pin ports p8 0 /cts 0 /rts 0 , p8 1 /clk 0 , p8 4 /cts 1 /rts 1 , p8 5 /clk 1 a a a ? output ? direction register port latch data bus 7703 group there are not pins p8 4 and p8 5 . 3.1 programmable i/o ports fig. 3.1.5 port peripheral circuits (2)
input/output pins 3C8 7702/7703 group users manual 3.2 i/o pins of internal peripheral devices p4 2 and p5 to p8 also function as the i/o pins of the internal peripheral devices. table 3.2.1 lists i/o pins for the internal peripheral devices. for their functions, refer to relevant sections of each internal peripheral devices. for the clock f 1 output pin, refer to chapter 12. connection with external devices. table 3.2.1 i/o pins for internal peripheral devices i/o pins for internal peripheral devices clock f 1 output pin i/o pins of timer a input pins of external interrupts input pins of timer b input pins of a-d converter i/o pins of serial i/o port p4 2 p5 p6 0 , p6 1 p6 2 to p6 4 p6 5 to p6 7 p7 p8 3.2 i/o pins of internal peripheral devices
chapter 4 interrupts 4.1 overview 4.2 interrupt sources 4.3 interrupt control 4.4 interrupt priority level 4.5 interrupt priority level detection circuit 4.6 interrupt priority level detection time 4.7 sequence from acceptance of interrupt request to execution of interrupt routine 4.8 return from interrupt routine 4.9 multiple interrupts ____ 4.10 external interrupts (int i interrupt) 4.11 precautions when using interrupts
7702/7703 group users manual interrupts 4C2 the suspension of the current operation in order to perform another operation owing to a certain factor is referred to as interrupt. this chapter describes the interrupts. 4.1 overview the m37702 has 19 interrupt sources to generate interrupt requests. figure 4.1.1 shows the interrupt processing sequence. when an interrupt request is accepted, a branch is made to the start address of the interrupt routine set in the interrupt vector table (addresses ffd6 16 to ffff 16 ). set the start address of each interrupt routine at each interrupt vector address in the interrupt vector table. 4.1 overview fig. 4.1.1 interrupt processing sequence interrupt routine accept interrupt request resume processing suspend processing return to original routine rti instruction process interrupt executing routine branch to start address of interrupt routine
7702/7703 group users manual 4C3 interrupts when an interrupt request is accepted, the contents of the registers listed below immediately preceding the acceptance of the interrupt request are automatically saved to the stack area in order of registers ? ? a . program bank register (pg) program counter (pc l , pc h ) a processor status register (ps l , ps h ) figure 4.1.2 shows the state of the stack area just before entering the interrupt routine. execute the rti instruction at the end of this interrupt routine to return to the routine that the microcomputer was executing before the interrupt request was accepted. as the rti instruction is executed, the register contents saved in the stack area are restored in order of registers a ? ? , and a return is made to the routine executed before the acceptance of interrupt request and processing is resumed from it. when an interrupt request is accepted and the rti instruction is executed, the only above registers to a are automatically saved and restored. when there are any other registers of which contents are necessary to be kept, use software to save and restore them. fig. 4.1.2 state of stack area just before entering interrupt routine 4.1 overview [s] is an initial value that the stack pointer (s) indicates at accepting an interrupt request. the s? contents become [s] ?5 after saving the above registers. address [s] ?4 [s] ?3 [s] ?2 [s] ?1 [s] ] processor status register? low-order byte (ps l ) stack area [s] ?5 processor status register? high-order byte (ps h ) program counter? low-order byte (pc l ) program counter? high-order byte (pc h ) program bank register (pg) ]
7702/7703 group users manual interrupts 4C4 remarks non-maskable non-maskable software interrupt non-maskable software interrupt not used usually non-maskable interrupt ____ external interrupt due to int 0 pin input signal ____ external interrupt due to int 1 pin input signal ____ external interrupt due to int 2 pin input signal internal interrupt from timer a0 internal interrupt from timer a1 internal interrupt from timer a2 internal interrupt from timer a3 internal interrupt from timer a4 internal interrupt from timer b0 internal interrupt from timer b1 internal interrupt from timer b2 internal interrupt from uart0 internal interrupt from uart1 internal interrupt from a-d converter 4.2 interrupt sources table 4.2.1 lists the interrupt sources and the interrupt vector addresses. when programming, set the start address of each interrupt routine at the vector addresses listed in this table. 4.2 interrupt sources low-order address fffe 16 fffc 16 fffa 16 fff8 16 fff6 16 fff4 16 fff2 16 fff0 16 ffee 16 ffec 16 ffea 16 ffe8 16 ffe6 16 ffe4 16 ffe2 16 ffe0 16 ffde 16 ffdc 16 ffda 16 ffd8 16 ffd6 16 interrupt vector address table 4.2.1 interrupt sources and interrupt vector addresses high-order address ffff 16 fffd 16 fffb 16 fff9 16 fff7 16 fff5 16 fff3 16 fff1 16 ffef 16 ffed 16 ffeb 16 ffe9 16 ffe7 16 ffe5 16 ffe3 16 ffe1 16 ffdf 16 ffdd 16 ffdb 16 ffd9 16 ffd7 16 interrupt source reset zero division brk instruction ____ dbc (note) watchdog timer ____ int 0 ____ int 1 ____ int 2 timer a0 timer a1 timer a2 timer a3 timer a4 timer b0 timer b1 timer b2 uart0 receive uart0 transmit uart1 receive uart1 transmit a-d conversion ____ note: the dbc interrupt source is used exclusively for debugger control.
7702/7703 group users manual 4C5 interrupts table 4.2.2 lists occurrence factors of internal interrupt request, which occur due to internal operation. 4.2 interrupt sources table 4.2.2 occurrence factors of internal interrupt request interrupt zero division interrupt brk instruction interrupt watchdog timer interrupt timer ai interrupt (i = 0 to 4) timer bi interrupt (i = 0 to 2) uarti receive interrupt (i = 0, 1) uarti transmit interrupt (i = 0, 1) a-d conversion interrupt interrupt request occurrence factors occurs when 0 is specified as the divisor for the div instruction (division instruction). (refer to 7700 family software manual. ) occurs when the brk instruction is executed. (refer to 7700 family software manual. ) occurs when the most significant bit of the watchdog timer becomes 0. (refer to chapter 9. watchdog timer. ) differs according to the timer ais operating modes. (refer to chapter 5. timer a. ) differs according to the timer bis operating modes. (refer to chapter 6. timer b. ) occurs at serial data reception. (refer to chapter 7. serial i/o. ) occurs at serial data transmission. (refer to chapter 7. serial i/o. ) occurs when a-d conversion is completed. (refer to chapter 8. a-d converter. )
7702/7703 group users manual interrupts 4C6 4.3 interrupt control the enabling and disabling of maskable interrupts are controlled by the following : ?interrupt request bit ?interrupt priority level select bits ?processor interrupt priority level (ipl) ?interrupt disable flag (i) the interrupt disable flag (i) and the processor interrupt priority level (ipl) are assigned to the processor status register (ps). the interrupt request bit and the interrupt priority level select bits are assigned to the interrupt control register of each interrupt. figure 4.3.1 shows the memory assignment of the interrupt control registers, and figure 4.3.2 shows their structure. l maskable interrupt: an interrupt of which requests acceptance can be disabled by software. l non-maskable interrupt (including zero division, brk instruction, watchdog timer interrupts) : an interrupt which is certain to be accepted when its request occurs. these interrupts do not have their interrupt control registers and are independent of the interrupt disable flag (i). 4.3 interrupt control fig. 4.3.1 memory assignment of interrupt control registers a-d conversion interrupt control register uart0 transmit interrupt control register uart0 receive interrupt control register uart1 transmit interrupt control register uart1 receive interrupt control register timer a0 interrupt control register timer a1 interrupt control register timer a2 interrupt control register timer a3 interrupt control register timer a4 interrupt control register timer b0 interrupt control register timer b1 interrupt control register timer b2 interrupt control register int 0 interrupt control register int 1 interrupt control register int 2 interrupt control register address 70 16 71 16 72 16 73 16 74 16 75 16 76 16 77 16 78 16 79 16 7a 16 7b 16 7c 16 7d 16 7e 16 7f 16
7702/7703 group users manual 4C7 interrupts 4.3 interrupt control fig. 4.3.2 structure of interrupt control register b7 b6 b5 b4 b3 b2 b1 b0 int 0 to int 2 interrupt control registers (addresses 7d 16 to 7f 16 ) bit 4 interrupt request bit (note 1 ) 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request 0 : edge sense 1 : level sense notes 1: the int 0 to int 2 interrupt request bits are invalid when selecting the level sense. 2: use the seb or the clb instruction to set the int 0 to int 2 interrupt control registers. interrupt priority level select bits 3 7, 6 5 rw rw rw rw rw rw C 0 0 undefined 0 0 0 polarity select bit 0 : set the interrupt request bit at h level for level sense and at falling edge for edge sense. 1 : set the interrupt request bit at l level for level sense and at rising edge for edge sense. level sense/edge sense select bit nothing is allocated. b7 b6 b5 b4 b3 b2 b1 b0 a-d conversion, uart0 and 1 transmit, uart0 and 1 receive, timers a0 to a4, timers b0 to b2 interrupt control registers (addresses 70 16 to 7c 16 ) bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request note: use the seb or clb instruction to set each interrupt control register. interrupt priority level select bits 3 rw rw rw rw C undefined 0 0 0 nothing is allocated.
7702/7703 group users manual interrupts 4C8 4.3.1 interrupt disable flag (i) all maskable interrupts can be disabled by this flag. when this flag is set to 1, all maskable interrupts are disabled; when the flag is cleared to 0, those interrupts are enabled. because this flag is set to 1 at reset, clear the flag to 0 when enabling interrupts. 4.3.2 interrupt request bit when an interrupt request occurs, this bit is set to 1. the bit remains set to 1 until the interrupt request is accepted, and it is cleared to 0 when the interrupt request is accepted. this bit also can be set to 0 or 1 by software. use the seb or clb instruction to set this bit. ____ ____ for the int i interrupt request bit (i = 0 to 2), when using the int i interrupt with level sense, the bit is ignored. 4.3.3 interrupt priority level select bits and processor interrupt priority level (ipl) the interrupt priority level select bits are used to determine the priority level of each interrupt. use the seb or clb instruction to set these bits. when an interrupt request occurs, its interrupt priority level is compared with the processor interrupt priority level (ipl). the requested interrupt is enabled only when the comparison result meets the following condition. accordingly, an interrupt can be disabled by setting its interrupt priority level to 0. each interrupt priority level > processor interrupt priority level (ipl) table 4.3.1 lists the setting of interrupt priority level, and table 4.3.2 lists the interrupt enabled level corresponding to ipl contents. all the interrupt disable flag (i), interrupt request bit, interrupt priority level select bits, and processor interrupt priority level (ipl) are independent of one another; they do not affect one another. interrupt requests are accepted only when the following conditions are satisfied. ?interrupt disable flag (i) = 0 ?interrupt request bit = 1 ?interrupt priority level > processor interrupt priority level (ipl) 4.3 interrupt control
7702/7703 group users manual 4C9 interrupts b0 0 1 0 1 0 1 0 1 b2 0 0 0 0 1 1 1 1 table 4.3.1 setting of interrupt priority level b1 0 0 1 1 0 0 1 1 level 0 (interrupt disabled) level 1 level 2 level 3 level 4 level 5 level 6 level 7 low high 4.3 interrupt control interrupt priority level interrupt priority level select bits priority ipl 2 0 0 0 0 1 1 1 1 enabled interrupt priority level enable level 1 and above interrupts. enable level 2 and above interrupts. enable level 3 and above interrupts. enable level 4 and above interrupts. enable level 5 and above interrupts. enable level 6 and level 7 interrupts. enable only level 7 interrupt. disable all maskable interrupts. ipl 1 0 0 1 1 0 0 1 1 ipl 0 0 1 0 1 0 1 0 1 table 4.3.2 interrupt enabled level corresponding to ipl contents ipl 0 : bit 8 in processor status register (ps) ipl 1 : bit 9 in processor status register (ps) ipl 2 : bit 10 in processor status register (ps)
7702/7703 group users manual interrupts 4C10 4.4 interrupt priority level when two or more interrupt requests are detected at the same sampling timing, at which whether an interrupt request exists or not is checked, in the case of the interrupt disable flag (i) = 0 (interrupts enabled); they are accepted in order of priority levels, with the highest priority interrupt request accepted first. among a total of 19 interrupt sources, the user can set the desired priority levels for 16 interrupt sources except software interrupts (zero division and brk instruction interrupts) and the watchdog timer interrupt. use the interrupt priority level select bits to set their priority levels. additionally, the reset, which is handled as one that has the highest priority of all interrupts, and the watchdog timer interrupt have their priority levels set by hardware. figure 4.4.1 shows the interrupt priority levels set by hardware. note that software interrupts are not affected by interrupt priority levels. whenever the instruction is executed, a branch is certain to be made to the interrupt routine. fig. 4.4.1 interrupt priority levels set by hardware 4.4 interrupt priority level watchdog timer reset 16 interrupt sources except software interrupts and watchdog timer interrupt the user can set the desired priority levels inside of the dotted line. priority levels determined by hardware high low priority level
7702/7703 group users manual 4C11 interrupts 4.5 interrupt priority level detection circuit the interrupt priority level detection circuit selects the interrupt having the highest priority level when more than one interrupt request occurs at the same sampling timing. figure 4.5.1 shows the interrupt priority level detection circuit. 4.5 interrupt priority level detection circuit fig. 4.5.1 interrupt priority level detection circuit a-d conversion uart1 transmit uart1 receive uart0 transmit uart0 receive timer b2 timer b1 timer b0 timer a4 timer a3 timer a2 timer a1 timer a0 int 2 int 1 int 0 ipl processor interrupt priority level the highest priority level interrupt interrupt disable flag (i) watchdog timer interrupt reset accepting of interrupt request interrupt priority level interrupt priority level level 0 (initial value)
7702/7703 group user?s manual interrupts 4C12 the following explains the operation of the interrupt priori ty detection circuit using figure 4.5.2. the interrupt priority level of a requested interrupt (y in figure 4.5.2) is compared with the resultant priority level sent from the preceding comparator (x in figure 4.5.2) ; whichever interrupt of the higher priority level is sent to the next comparator (z in figure 4.5.2). (initial comparison value is 0.) for interrupts for which no interrupt request occurs, the priority level sent from th e preceding comparator is forwarded to the next comparator. when the two priority levels are found the same by compariso n, the priority level sent from the preceding comparator is forwarded to the next comparator. accordingly, when the same priority level is set by software, the interrupt requests are subject to the follo wing relation about priority: a-d conversion > uart1 transmit > uart1 receive > uart0 tran smit > uart0 receive > timer b2 ____ ____ ____ > timer b1 > timer b0 > timer a4 > timer a3 > timer a2 > ti mer a1 > timer a0 > int 2 > int 1 > int 0 among the multiple interrupt requests sampled at the same ti me, one that has the highest priority level is detectedd by the above comparison. then this highest interrupt priority level is compared with the processor interrupt priority level (ipl). when this interrupt priority level is higher than the processor i nterrupt priority level (ipl) and the interrupt disable flag (i) is 0, the interrupt request is accepted. a interr upt request which is not accepted here is retained until it is accepted or its interrupt request bit is cleared to 0 by software. the interrupt priority is detected when the cpu fetches an o p code, which is called the cpus op-code fetch cycle. however, when an op-code fetch cycle is generated dur ing detection of an interrupt priority, new detection of that does not start. (refer to figure 4.6.1.) s ince the state of the interrupt request bit and interrupt priority levels are latched during detection of in terrupt priority, even if the bit state and priority levels change, the detection is performed on the previous st ate before it has changed. 4.5 interrupt priority level detection circuit fig. 4.5.2 interrupt priority level detection model y x z comparator (priority level comparison) l when x y then z = x l when x y then z = y interrupt source y x : resultant priority level sent from the preceding comparator (highest priority at this point) y : priority level of interrupt source y z : highest priority at this point time
7702/7703 group users manual interrupts 4C13 4.6 interrupt priority level detection time after sampling had started, an interrupt priority level detection time has elapses before an interrupt request is accepted. the interrupt priority level detection time can be selected by software. figure 4.6.1 shows the interrupt priority level detection time. as the interrupt priority level detection time, normally select 2 cycles of internal clock f . 4.6 interrupt priority level detection time fig. 4.6.1 interrupt priority level detection time (2) interrupt priority level detection time op code fetch cycle sampling pulse (a) 7 cycles (b) 4 cycles (c) 2 cycles interrupt priority level detection time (note) note: pulse exists when 2 cycles of is selected. b7 b6 b5 b4 b3 b2 b1 b0 0 0 0 0 1 1 0 1 1 processor mode register (address 5e 16 ) processor mode bits software reset bit fix to 0. clock 1 output select bit 7 cycles of [(a) shown below] 4 cycles of [(b) shown below] 2 cycles of [(c) shown below] interrupt priority detection time select bits do not select (1) interrupt priority detection time select bits b5, b4 wait bit
7702/7703 group users manual interrupts 4C14 4.7 sequence from acceptance of interrupt request to execution of interrupt routine the sequence from the acceptance of interrupt request to the execution of the interrupt routine is described below. when an interrupt request is accepted, the interrupt request bit which corresponds to the accepted interrupt is cleared to 0, and then the interrupt processing starts from the next cycle of completion of the instruction which is being executed at accepting the interrupt request. figure 4.7.1 shows the sequence from acceptance of interrupt request to execution of interrupt routine. after execution of an instruction at accepting the interrupt request is completed, an intack (interrupt acknowledge) sequence is executed, and a branch is made to the start address of the interrupt routine allocated in addresses 0 16 to ffff 16 . the intack sequence is automatically performed in the following order. the contents of the program bank register (pg) just before performing the intack sequence are stored to stack. the contents of the program counter (pc) just before performing the intack sequence are stored to stack. a the contents of the processor status register (ps) just before performing the intack sequence is stored to stack. ? the interrupt disable flag (i) is set to 1. ? the interrupt priority level of the accepted interrupt is set into the processor interrupt priority level (ipl). ? the contents of the program bank register (pg) are cleared to 00 16 , and the contents of the interrupt vector address are set into the program counter (pc). performing the intack sequence requires at least 13 cycles of internal clock f . figure 4.7.2 shows the intack sequence timing. execution is started beginning with an instruction at the start address of the interrupt routine after completing the intack sequence. 4.7 sequence from acceptance of interrupt request to execution of interrupt routine
7702/7703 group users manual interrupts 4C15 4.7 sequence from acceptance of interrupt request to execution of interrupt routine fig. 4.7.2 intack sequence timing (at minimum) fig. 4.7.1 sequence from acceptance of interrupt request to execution of interrupt routine @ @ : duration for detecting interrupt priority level interrupt request occurs. interrupt request is accepted. instruction 1 instruction 2 intack sequence instructions in interrupt routine interrupt response time time @ time from the occurrence of an interrupt request until the completion of executing an instruction which is being executed at the occurrence. time from the instruction next to (note) until the completion of executing an instruction which is being done at the end of priority detection note : at this time, interrupt priority detection starts. a time required to execute the intack sequence (13 cycles of at minimum) a l when stack pointer (s)s contents is even and no wait pg pc h 00 00 00 00 00 00 00 00 00 00 ([s]C1) h ff 16 ad h pc h ps h ff 16 d h a p a h interrupt disable flag (i) internal clock cpu pc l pg ps l xx 16 d l ad h ad l pc l 00 xx 16 a l ad l 00 [s] h [s] l intack sequence op-code op-code : not used [s] xx 16 ad h ad l : contents of stack pointer (s) : low-order 8 bits of vector address : contents of vector address (high-order address) : contents of vector address (low-order address) cpu a p a h a l d h d l ([s]C2) h ([s]C3) h ([s]C4) h ([s]C5) h ([s]C5) h ([s]C1) l ([s]C2) l ([s]C3) l ([s]C4) l ([s]C5) l ([s]C5) l : cpu standard clock : high-order 8 bits of cpu internal address bus : middle-order 8 bits of cpu internal address bus : low-order 8 bits of cpu internal address bus : cpu internal data bus for odd address : cpu internal data bus for even address
7702/7703 group users manual interrupts 4C16 4.7.1 change in ipl at acceptance of interrupt request when an interrupt request is accepted, the processor interrupt priority level (ipl) is replaced with the interrupt priority level of the accepted interrupt. this results in easy control of multiple interrupts. (refer to section 4.9 multiple interrupts. ) when at reset or the watchdog timer or the software interrupt is accepted, the value shown in table 4.7.1 is set in the ipl. table 4.7.1 change in ipl at interrupt request acceptance change in ipl level 0 (000 2 ) is set. level 7 (111 2 ) is set. no change no change interrupt priority level of the accepted interrupt request is set. interrupt source reset watchdog timer zero division brk instruction other interrupts 4.7 sequence from acceptance of interrupt request to execution of interrupt routine
7702/7703 group users manual interrupts 4C17 4.7.2 storing registers the register storing operation performed during intack sequence depends on whether the contents of the stack pointer (s) at accepting interrupt request are even or odd. when the contents of the stack pointer (s) are even, the contents of the program counter (pc) and the processor status register (ps) are stored as a 16-bit unit simultaneously at each other. when the contents of the stack pointer (s) are odd, they are stored with twice by an 8-bit unit for each. figure 4.7.3 shows the register storing operation. in the intack sequence, only the contents of the program bank register (pg), program counter (pc), and processor status register (ps) are stored to the stack area. the other necessary registers must be stored by software at the beginning of the interrupt routine. using the psh instruction can store all cpu registers except the stack pointer (s). 4.7 sequence from acceptance of interrupt request to execution of interrupt routine fig. 4.7.3 register storing operation storing is completed with 3 times. a stores 16 bits at a time. stores 16 bits at a time. (1) content of stack pointer (s) is even low-order byte of processor status register (ps l ) program bank register (pg) address [s] ?4 (even) [s] ?3 (odd) [s] ?2 (even) [s] ?1 (odd) [s] (even) storing order [s] ?5 (odd) address [s] ?4 (odd) [s] ?3 (even) [s] ?2 (odd) [s] ?1 (even) [s] (odd) a ? ? stores by each 8 bits. storing order storing is completed with 5 times. [s] ?5 (even) high-order byte of processor status register (ps h ) low-order byte of program counter (pc l ) high-order byte of program counter (pc h ) (2) content of stack pointer (s) is odd low-order byte of processor status register (ps l ) program bank register (pg) high-order byte of processor status register (ps h ) low-order byte of program counter (pc l ) high-order byte of program counter (pc h ) [s] is an initial value that the stack pointer (s) indicates at accepting an interrupt request. the s? contents become [s] ?5 after storing the above registers. ]
7702/7703 group users manual interrupts 4C18 4.8 return from interrupt routine when the rti instruction is executed at the end of the interrupt routine, the contents of the program bank register (pg), program counter (pc), and processor status register (ps) immediately before performing the intack sequence, which were saved to the stack area, are automatically restored, and control returns to the routine executed before the acceptance of interrupt request and processing is resumed from it left off. for any register that is saved by software in the interrupt routine, restore it with the same data length and same register length as it was saved by using the pul instruction and others before executing the rti instruction. 4.9 multiple interrupts when a branch is made to the interrupt routine, the microcomputer becomes the following situation: ?interrupt disable flag (i) = 1 (interrupts disabled) ?interrupt request bit of the accepted interrupt = 0 ?processor interrupt priority level (ipl) = interrupt priority level of the accepted interrupt accordingly, as long as the ipl remains unchanged, the microcomputer can accept the interrupt request that has higher priority than the interrupt request being executed now by clearing the interrupt disable flag (i) to 0 in the interrupt routine. this is multiple interrupts. figure 4.9.1 shows the multiple interrupt mechanism. the interrupt requests that have not been accepted owing to their low priority levels are retained. when the rti instruction is executed, the interrupt priority level of the routine that the microcomputer was executing before accepting the interrupt request is restored to the ipl. therefore, one of the interrupt requests being retained is accepted when the following condition is satisfied at next detection of interrupt priority level: interrupt priority level of interrupt request being retained > restored processor interrupt priority level (ipl) 4.8 return from interrupt routine 4.9 multiple interrupts
7702/7703 group users manual interrupts 4C19 4.9 multiple interrupts fig. 4.9.1 multiple interrupt mechanism main routine reset i = 1 ipl = 0 i = 0 interrupt 1 i = 1 ipl = 3 i = 0 i = 1 ipl = 5 rti i = 0 ipl = 3 rti i = 0 ipl = 0 i = 1 ipl = 2 rti i = 0 ipl = 0 interrupt 1 interrupt priority level=3 this request cannot be accepted because its priority level is lower than interrupt 1s. request nesting time : they are set automatically. : set by software. i : interrupt disable flag ipl : processor interrupt priority level multiple interrupt interrupt 2 interrupt priority level=5 interrupt 3 interrupt priority level=2 interrupt 2 interrupt 3 interrupt 3 the instruction of main routine is not executed then.
7702/7703 group users manual interrupts 4C20 ___ 4.10 external interrupts (int i interrupt) ___ an external interrupt request occurs by input signals to the int i (i = 0 to 2) pin. the occurrence factor of interrupt request can be selected by the level sense/edge sense select bit and the polarity select bit (bits ___ 5 and 4 at addresses 7d 16 to 7f 16 ) shown in figure 4.10.1. table 4.10.1 lists the occurrence factor of int i interrupt request. ___ ___ when using p6 2 /int 0 to p6 4 /int 2 pins as input pins of external interrupts, set the corresponding bits at address 10 16 (port p6 direction register) to 0. (refer to figure 4.10.2.) ___ the signals input to the int i pin require h or l level width of 250 ns or more independent of the f(x in ). ___ ___ additionally, even when using the pins p6 2 /int 0 to p6 4 /int 2 as the input pins of external interrupt, the user can obtain the pins state by reading bits 2 to 4 at address e 16 (port p6 register). note: when selecting an input signals falling or l level as the occurrence factor of an interrupt request, make sure that the input signal is held l for 250 ns or more. when selecting an input signals rising or h level as that, make sure that the input signal is held h for 250 ns or more. ___ 4.10 external interrupts (int i interrupt) ___ table 4.10.1 occurrence factor of int i interrupt request b4 0 1 0 1 b5 0 0 1 1 ___ int i interrupt request occurrence factor ___ ___ the int i interrupt request occurs by always detecting the int i pins state. accordingly, when the user does ___ ___ not use the int i interrupt, set the int i interrupts priority level to level 0. ___ interrupt request occurs at falling of the signal input to the int i pin (edge sense). ___ interrupt request occurs at rising of the signal input to the int i pin (edge sense). ___ interrupt request occurs while the int i pin level is h (level sense). ___ interrupt request occurs while the int i pin level is l (level sense).
7702/7703 group users manual interrupts 4C21 ___ 4.10 external interrupts (int i interrupt) b7 b6 b5 b4 b3 b2 b1 b0 int 0 to int 2 interrupt control registers (addresses 7d 16 to 7f 16 ) bit 4 interrupt request bit (note 1) 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request 0 : edge sense 1 : level sense notes 1: the int 0 to int 2 interrupt request bits are invalid when selecting the level sense. 2: use the seb or clb instruction to set the int 0 to int 2 interrupt control registers. interrupt priority level select bits 3 7, 6 5 rw rw rw rw rw rw C 0 0 undefined 0 0 0 polarity select bit 0 : set the interrupt request bit at h level for level sense and at falling edge for edge sense. 1 : set the interrupt request bit at l level for level sense and at rising edge for edge sense. level sense/edge sense select bit nothing is allocated. ___ fig. 4.10.1 structure of int i (i=0 to 2) interrupt control register
7702/7703 group users manual interrupts 4C22 ___ 4.10 external interrupts (int i interrupt) bit corresponding pin functions 0 1 2 3 4 5 6 7 ta4 out pin int 0 pin int 1 pin int 2 pin tb1 in pin tb0 in pin port p6 direction register (address 10 16 ) b1 b0 b2 b3 b4 b5 b6 b7 ta4 in pin tb2 in pin at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw 0 : input mode 1 : output mode when using pins as external interrupt input pins,set the corresponding bits to ?. : bits 0, 1 and bits 5 to 7 are not used for external interrupts. fig. 4.10.2 relationship between port p6 direction register and input pins of external interrupt
7702/7703 group user?s manual interrupts 4C23 ___ 4.10.1 function of int i interrupt request bit (1) selecting edge sense mode the interrupt request bit has the same function as that of i nternal interrupts. that is, when an interrupt request occurs, the interrupt request bit is set t o 1. the bit remains set to 1 until the interrupt request is accepted; it is cleared to 0 when the interrupt request is accepted. by software, this bit also can be set to 0 in order to clear the interr upt request or 1 in order to generate the interrupt request. (2) selecting level sense mode ___ the int i interrupt request bit becomes ignored. ___ in this case, the interrupt request occurs continuously whil e the level of the int i pin is valid level ] 1 . ___ ___ when the int i pin level changes from the valid level to the invalid level ] 2 before the int i interrupt request is accepted, this interrupt request is not retained. (refer to figure 4.10.4.) valid level ] 1 : this means the level which is selected by the polarity sel ect bit (bit 4 at addresses 7d 16 to 7f 16 ). invalid level ] 2 : this means the reversed level of a valid level. ___ 4.10 external interrupts (int i interrupt) int i pin edge detection circuit interrupt request level sense/edge sense select bit data bus interrupt request bit 0 1 ___ fig. 4.10.3 circuit of int i interrupt
7702/7703 group users manual interrupts 4C24 ___ fig. 4.10.4 occurrence of int i interrupt request in level sense mode ___ 4.10 external interrupts (int i interrupt) first interrupt routine int i pin level valid invalid main routine interrupt request is accepted. return to main routine. second interrupt routine third interrupt routine main routine when the int i pin? level changes to an invalid level before an interrupt request is accepted, the interrupt request is not retained.
7702/7703 group users manual interrupts 4C25 ___ 4.10 external interrupts (int i interrupt) ___ 4.10.2 switch of occurrence factor of int i interrupt request ___ to switch the occurrence factor of int i interrupt request from the level sense to the edge sense, set the ___ int i interrupt control register in the sequence shown in figure 4.10.5 (1). to change the polarity, set the ___ int i interrupt control register in the sequence shown in figure 4.10.5 (2). clear level sense/edge sense select bit to 0 ( select edge sense ) clear interrupt request bit to 0 set the interrupt priority level to level 0 ( disable int i interrupt ) set polarity select bit clear interrupt request bit to 0 (2) changing polarity (1) switching from level sense to edge sense set the interrupt priority level to level 1C7 (enable acceptance of int i interrupt request) set the interrupt priority level to level 1C7 (enable acceptance of int i interrupt request) set the interrupt priority level to level 0 ( disable int i interrupt ) notes 1: use the seb or clb instruction when setting the int i interrupt control register (i = 0 to 2). 2: perform the above setting separately. do not perform 2 or more setting at the same time, with 1 instruction. ___ fig. 4.10.5 switching flow of occurrence factor of int i interrupt request
7702/7703 group users manual interrupts 4C26 4.11 precautions when using interrupts 4.11 precautions when using interrupts 1. use the seb or clb instruction when setting the interrupt control registers (addresses 70 16 to 7f 16 .) 2. to change the interrupt priority level select bits (bits 0 to 2 at addresses 70 16 to 7f 16 ), 2 to 7 cycles of f are required after executing an write-instruction until completion of the interrupt priority levels change. accordingly, it is necessary to reserve enough time by software when changing the interrupt priority level of which interrupt source is the same within a very short execution time consisting of a few instructions. figure 4.11.1 shows a program example to reserve time required for changing interrupt priority level. the time for change depends on the interrupt priority detection timer select bits (bits 4 and 5 at address 5e 16 ). table 4.11.1 lists the relation between the number of instructions to be inserted with program example of figure 4.11.1 and the interrupt priority detection time select bits. fig. 4.11.1 program example to reserve time required for changing interrupt priority level table 4.11.1 relation between number of instructions to be inserted with program example of figure 4.11.1 and interrupt priority detection time select bits ; write to interrupt priority level select bits ; insert nop instruction (note) ; ; ; write to interrupt priority level select bits note: all instructions (other than instructions for writing to address 7x 16 ) which have the same cycles as nop instruction can also be inserted. confirm the number of instructions to be inserted by table 4.11.1. : seb .b #0xh, 007xh nop nop nop clb.b #0xh, 007xh : interrupt priority detection time select bits (note) interrupt priority level detection time 7 cycles of f 4 cycles of f 2 cycles of f do not select. number of inserted instructions nop instruction 4 or more nop instruction 2 or more nop instruction 1 or more b5 0 0 1 1 b4 0 1 0 1 note: we recommend [b5 = 1, b4 = 0].
chapter 5 timer a 5.1 overview 5.2 block description 5.3 timer mode 5.4 event counter mode 5.5 one-shot pulse mode 5.6 pulse width modulation (pwm) mode
7702/7703 group users manual timer a 5.1 overview 5C2 timer a is used primarily for output to externals. it consists of five counters, timers a0 to a4, each equipped with a 16-bit reload function. timers a0 to a4 operate independently of one another. 7703 group timer a4s function of the 7703 group varies from the 7702 groups. refer to chapter 20. 7703 group . 5.1 overview timer ai (i = 0 to 4) has four operating modes listed below. except for the event counter mode, timers a0 to a4 all have the same functions. l timer mode the timer counts an internally generated count source. following functions can be used in this mode: ?gate function ?pulse output function l event counter mode the timer counts an external signal. following functions can be used in this mode: ?pulse output function ?two-phase pulse signal processing function (timers a2, a3, and a4) l one-shot pulse mode the timer outputs a pulse which has an arbitrary width once. l pulse width modulation (pwm) mode timer outputs pulses which have an arbitrary width in succession. the timer functions as which pulse width modulator as follows: ?16-bit pulse width modulator ?8-bit pulse width modulator
timer a 7702/7703 group users manual 5C3 5.2 block description 5.2 block description figure 5.2.1 shows the block diagram of timer a. explanation of relevant registers to timer a is described below. however, for the following registers, refer to the relevant section: ?up-down register (address 44 16 ) ....................... 5.4.2 operation in event counter mode ?one-shot start register (address 42 16 ) ............. 5.5.3 trigger fig. 5.2.1 block diagram of timer a data bus (odd) data bus (even) f 2 f 16 f 64 f 512 count source timer mode one- shot pulse mode pwm mode polarity switching timer mode (gate function) event counter mode trigger count start bit down-count up-down bit ( low-order 8 bits ) (high-order 8 bits) timer ai reload register (16) timer ai counter(16) timer ai interrupt request bit up-count/down-count switching (always down-count except for event counter mode) toggle f.f. pulse output function select bit tai in tai out select bits
timer a 7702/7703 group users manual 5C4 5.2 block description 5.2.1 counter and reload register (timer ai register) each of timer ai counter and reload register consists of 16 bits. the counter down-counts each time the count source is input. in the event counter mode, it can also function as an up-counter. the reload register is used to store the initial value of the counter. when the counter underflows or overflows, the reload registers contents are reloaded into the counter. values are set to the counter and reload register by writing a value to the timer ai register. table 5.2.1 lists the memory assignment of the timer ai register. the value written into the timer ai register when counting is not in progress is set to the counter and reload register. the value written into the timer ai register when counting is in progress is set to only the reload register. in this case, the reload registers updated contents are transferred to the counter at the next reload time. the value got when reading out the timer ai register varies according to the operating mode. table 5.2.2 lists reading and writing from and to the timer ai register. table 5.2.2 reading and writing from and to timer ai register write written to only reload register. written to both counter and reload register. operating mode timer mode event counter mode one-shot pulse mode pulse width modulation (pwm) mode note: when reset, the contents of the timer ai register are undefined. notes 1: also refer to [precautions when operating in timer mode] and [precautions when oper- ating in event counter mode]. 2: when reading and writing to/from the timer ai register, perform them in an unit of 16 bits. read counter value is read out. ( note 1 ) undefined value is read out. table 5.2.1 memory assignment of timer ai register timer ai register high-order byte low-order byte timer a0 register address 47 16 address 46 16 timer a1 register address 49 16 address 48 16 timer a2 register address 4b 16 address 4a 16 timer a3 register address 4d 16 address 4c 16 timer a4 register address 4f 16 address 4e 16
timer a 7702/7703 group users manual 5C5 5.2 block description 5.2.2 count start register this register is used to start and stop counting. each bit of this register corresponds to each timer. figure 5.2.2 shows the structure of the count start register. bit timer b2 count start bit timer b1 count start bit timer b0 count start bit timer a4 count start bit timer a3 count start bit timer a2 count start bit timer a1 count start bit timer a0 count start bit bit name at reset 0 0 0 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 count start register (address 40 16 ) 0 : stop counting 1 : start counting rw rw rw rw rw rw rw rw 0 1 2 3 4 5 6 7 : bits 7 to 5 are not used for timer a. fig. 5.2.2 structure of count start register
timer a 7702/7703 group users manual 5C6 5.2 block description 5.2.3 timer ai mode register figure 5.2.3 shows the structure of the timer ai mode register. operating mode select bits are used to select the operating mode of timer ai. bits 2 to 7 have different functions according to the operating mode. these bits are described in the paragraph of each operating mode. fig. 5.2.3 structure of timer ai mode register bit 7 5 4 3 1 bit name at reset 0 0 0 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 0 0 : timer mode 0 1 : event counter mode 1 0 : one-shot pulse mode 1 1 : pulse width modulation (pwm) mode b1 b0 these bits have different functions according to the operating mode. operating mode select bits 6 2 0 rw rw rw rw rw rw rw rw
timer a 7702/7703 group users manual 5C7 5.2 block description 5.2.4 timer ai interrupt control register figure 5.2.4 shows the structure of the timer ai interrupt control register. for details about interrupts, refer to chapter 4. interrupts. fig. 5.2.4 structure of timer ai interrupt control register (1) interrupt priority level select bits (bits 2 to 0) these bits select a timer ai interrupts priority level. when using timer ai interrupts, select priority levels 1 to 7. when a timer ai interrupt request occurs, its priority level is compared with the processor interrupt priority level (ipl), so that the requested interrupt is enabled only when its priority level is higher than the ipl. (however, this applies when the interrupt disable flag (i) = 0.) to disable timer ai interrupts, set these bits to 000 2 (level 0). (2) interrupt request bit (bit 3) this bit is set to 1 when the timer ai interrupt request occurs. this bit is automatically cleared to 0 when the timer ai interrupt request is accepted. this bit can be set to 1 or 0 by software. b7 b6 b5 b4 b3 b2 b1 b0 bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request interrupt priority level select bits 3 rw rw rw rw undefined 0 0 0 nothing is assigned. note: use the seb or clb instruction to set each interrupt control register. timer ai interrupt control registers (i = 0 to 4) (addresses 75 16 to 79 16 )
timer a 7702/7703 group users manual 5C8 5.2 block description 5.2.5 port p5 and port p6 direction registers the i/o pins of timers a0 to a3 are shared with port p5, and the i/o pins of timer a4 are shared with port p6. when using these pins as timer ais input pins, set the corresponding bits of the port p5 and port p6 direction registers to 0 to set these ports for the input mode. when used as timer ais output pins, these pins are forcibly set to output pins of timer ai regardless of the direction registerss contents. figure 5.2.5 shows the relationship between the port p5 and port p6 direction registers and the timer ais i/o pins. fig. 5.2.5 relationship between port p5 and port p6 direction registers and timer ais i/o pins bit corresponding pin name functions 0 1 2 3 4 5 6 7 ta0 out pin ta1 out pin ta1 in pin ta2 out pin ta3 out pin 0: input mode 1: output mode when usi ng these pins as timer a is input pins, se t the corresponding bits to 0. ta2 in pin port p5 direction register (address d 16 ) b1 b0 b2 b3 b4 b5 b6 b7 ta0 in pin ta3 in pin at reset rw 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 ta4 out pin in t 0 pin in t 1 pin in t 2 pin tb1 in pin tb0 in pin port p6 dir ection regist er (addr ess 10 16 ) b1 b0 b2 b3 b4 b5 b6 b7 ta4 in pin tb2 in pin rw 0 0 0 0 0 0 0 0 : bits 7 to 2 are not used for timer a. corresponding pin name functions bit at reset 0: input mode 1: output mode when usi ng these pins as timer a is input pins, se t the corresponding bits to 0. rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw
timer a 7702/7703 group users manual 5C9 5.3 timer mode 5.3 timer mode in this mode, the timer counts an internally generated count source. (refer to table 5.3.1.) figure 5.3.1 shows the structures of the timer ai mode register and timer ai register in the timer mode. table 5.3.1 specifications of timer mode item count source count operation divide ratio count start condition count stop condition interrupt request occurrence timing tai in pin function tai out pin function read from timer ai register write to timer ai register specifications f 2 , f 16 , f 64 , or f 512 ? down-count ? when the counter underflows, reload registers contents are reloaded and counting continues. when count start bit is set to 1. when count start bit is cleared to 0. when the counter underflows. programmable i/o port or gate input programmable i/o port or pulse output counter value can be read out. l while counting is stopped when a value is written to timer ai register, it is written to both reload register and counter. l while counting is in progress when a value is written to timer ai register, it is written to only reload register. (transferred to counter at next reload timing.) n : timer ai register setting value 1 (n + 1)
timer a 7702/7703 group users manual 5C10 5.3 timer mode fig. 5.3.1 structures of timer ai mode register and timer ai register in timer mode b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0000 16 to ffff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined rw gate function select bits pulse output function select bit 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 0 0 : timer mode 0 : no pulse output (tai out pin functions as a programmable i/o port.) 1 : pulse output (tai out pin functions as a pulse output pin.) 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b4 b3 0 0 0 0 : no gate function 0 1 : (tai in pin functions as a prog- rammable i/o port.) 1 0 : gate function (counter counts only while tai in pins input signal is l level.) 1 1 : gate function (counter counts only while tai in pins input signal is h level.) bit 4 at reset rw 0 2 0 rw 0 rw 0 rw 3 0 rw 0 rw 5 0 rw 6 7 0 rw 0 rw fix this bit to 0 in the timer mode. 0
timer a 7702/7703 group users manual 5C11 5.3 timer mode 5.3.1 setting for timer mode figures 5.3.2 and 5.3.3 show an initial setting example for registers relevant to the timer mode. note that when using interrupts, set up to enable the interrupts. for details, refer to section chapter 4. interrupts. fig. 5.3.2 initial setting example for registers relevant to timer mode (1) note : counter divides the count source frequency by n + 1. setting divide ratio b7 b0 can be set to ?000 16 ?to ?fff 16 ?(n). (b15) (b8) b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) continue to figure 5.3.3 on next page. b7 b0 pulse output function select bit 0: no pulse output. 1: pulses output. 00 selecting timer mode and each function timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) count source select bits 0 0: f 2 0 1: f 16 1 0: f 64 1 1: f 512 b7 b6 gate function select bits 0 0: 0 1: 1 0: gate function (counter counts only while tai in pin? input signal is ??level.) 1 1: gate function (counter counts only while tai in pin? input signal is ??level.) b4 b3 selection of timer mode no gate function 0
timer a 7702/7703 group users manual 5C12 5.3 timer mode fig. 5.3.3 initial setting example for registers relevant to timer mode (2) aaaa aaaa aaaa count starts setting count start bit to ?. b7 b0 count start register (address 40 16 ) timer a0 count start bit timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit setting interrupt priority level b7 b0 timer ai interrupt control register (i = 0 to 4) (addresses 75 16 to 79 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1?. when disabling interrupts, set these bits to level 0. from preceding figure 5.3.2 . setting port p5 and port p6 direction registers b7 b0 port p5 direction register (address d 16 ) ta0 in pin ta1 in pin ta2 in pin b7 b0 port p6 direction register (address 10 16 ) when gate function is selected, set the bit corresponding to the tai in pin to 0. ta4 in pin ta3 in pin
timer a 7702/7703 group users manual 5C13 5.3 timer mode 5.3.2 count source in the timer mode, the count source select bits (bits 6 and 7 at addresses 56 16 to 5a 16 ) select the count source. table 5.3.2 lists the count source frequency. table 5.3.2 count source frequency count source select bits b7 b6 00 01 10 11 count source frequency f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz 4 mhz 8 mhz 12.5 mhz 500 khz 1 mhz 1.5625 mhz 125 khz 250 khz 390.625 khz 15625 hz 31250 hz 48.8281 khz count source f 2 f 16 f 64 f 512
timer a 7702/7703 group users manual 5C14 5.3 timer mode 5.3.3 operation in timer mode when the count start bit is set to 1, the counter starts counting of the count source. when the counter underflows, the reload registers contents are reloaded and counting continues. a the timer ai interrupt request bit is set to 1 when the counter underflows in . the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. figure 5.3.4 shows an example of operation in the timer mode. fig. 5.3.4 example of operation in timer mode (without pulse output and gate functions) stops counting. restarts counting. ffff 16 n 0000 16 time count start bit timer ai interrupt request bit 1 1 counter contents (hex.) n = reload registers contents cleared to 0 when interrupt request is accepted or cleared by software. set to 1 by software. starts counting. 0 0 1 / f i 5 (n+1) fi = frequency of count source (f 2 , f 16 , f 64 , f 512 ) cleared to 0 by software. set to 1 by software.
timer a 7702/7703 group users manual 5C15 5.3 timer mode 5.3.4 select function the following describes the selective gate and pulse output functions. (1) gate function the gate function is selected by setting the gate function select bits (bits 4 and 3 at addresses 56 16 to 5a 16 ) to 10 2 or 11 2 . the gate function makes it possible to start or stop counting depending on the tai in pins input signal. table 5.3.3 lists the count valid levels. figure 5.3.5 shows an example of operation selecting the gate function. when selecting the gate function, set the port p5 and port p6 direction registers bits which correspond to the tai in pin for the input mode. additionally, make sure that the tai in pins input signal has a pulse width equal to or more than two cycles of the count source. table 5.3.3 count valid levels gate function select bits count valid level (duration when counter counts) b4 b3 1 0 while tai in pins input signal is l level 1 1 while tai in pins input signal is h level note: the counter does not count while the tai in pins input signal is not at the count valid level.
timer a 7702/7703 group users manual 5C16 5.3 timer mode ffff 16 n 0000 16 time 1 1 0 0 starts counting. n = reload registers contents counter contents (hex.) stops counting. set to 1 by software. count start bit tai in pins input signal count valid level timer ai interrupt request bit cleared to 0 when interrupt request is accepted or cleared by software. the counter counts when the count start bit = 1 and the tai in pins input signal is at the count valid level. the counter stops counting while the tai in pins input signal is not at the count valid level, and the counter value is retained. invalid level fig. 5.3.5 example of operation selecting gate function
timer a 7702/7703 group users manual 5C17 5.3 timer mode (2) pulse output function the pulse output function is selected by setting the pulse output function select bit (bit 2 at addresses 56 16 to 5a 16 ) to 1. when this function is selected, the tai out pin is forcibly set for the pulse output pin regardless of the corresponding bits of the port p5 and port p6 direction registers. the tai out pin outputs pulses of which polarity is inverted each time the counter underflows. when the count start bit (address 40 16 ) is 0 (count stopped), the tai out pin outputs l level. figure 5.3.6 shows an example of operation selecting the pulse output function. fig. 5.3.6 example of operation selecting pulse output function ffff 16 n 0000 16 time count start bit timer ai interrupt request bit ? ? counter contents (hex.) n = reload register? contents cleared to ??when interrupt request is accepted or cleared by software. set to ??by software. starts counting. pulse output from taiout pin ? ? ? ? set to ??by software. cleared to ??by software. starts counting. restarts counting.
timer a 7702/7703 group users manual 5C18 5.3 timer mode [precautions when operating in timer mode] by reading the timer ai register, the counter value can be read out at any timing while counting is in progress. however, if the timer ai register is read at the reload timing shown in figure 5.3.7, the value ffff 16 is read out. when reading the timer ai register after setting a value to the register while counting is not in progress and before the counter starts counting, the set value is read out correctly. fig. 5.3.7 reading timer ai register 210 n n ?1 counter value (hex.) 21 0 ffff n ?1 read value (hex.) reload time n = reload register? contents
timer a 7702/7703 group users manual 5C19 5.4 event counter mode (n + 1) 1 1 n: timer ai register setting value 5.4 event counter mode in this mode, the timer counts an external signal. (refer to tables 5.4.1 and 5.4.2.) figure 5.4.1 shows the structures of the timer ai mode register and timer ai register in the event counter mode. table 5.4.1 specifications of event counter mode (when not using two-phase pulse signal processing function) (ffff 16 C n + 1) item count source count operation divide ratio count start condition count stop condition interrupt request occurrence timing tai in pin function tai out pin function read from timer ai register write to timer ai register specifications l external signal input to the tai in pin l the count sources valid edge can be selected between the falling and the rising edges by software. l up-count or down-count can be switched by external signal or software. l when the counter overflows or underflows, reload registers contents are reloaded and counting continues. l for down-count l for up-count when count start bit is set to 1. when count start bit is cleared to 0. when the counter overflows or underflows. count source input programmable i/o port, pulse output, or up-count/down-count switch signal input counter value can be read out. l while counting is stopped when a value is written to timer ai register, it is written to both reload register and counter. l while counting is in progress when a value is written to timer ai register, it is written to only reload register. (transferred to counter at next reload time.)
timer a 7702/7703 group users manual 5C20 5.4 event counter mode item count source count operation divide ratio count start condition count stop condition interrupt request occurrence timing taj in , taj out (j = 2 to 4) pin function read from timer aj register write to timer aj register table 5.4.2 specifications of event counter mode (when using two-phase pulse signal processing function with timers a2, a3, and a4) (n + 1) 1 1 n: timer aj register setting value specifications external signal (two-phase pulse) input to the taj in or taj out pin (j = 2 to 4) l up-count or down-count can be switched by external signal (two- phase pulse). l when the counter overflows or underflows, reload registers contents are reloaded and counting is continued. l for down-count l for up-count when count start bit is set to 1. when count start bit is cleared to 0. when the counter overflows or underflows. two-phase pulse input counter value can be read out. l while counting is stopped when a value is written to timer a2, a3, or a4 register, it is written to both reload register and counter. l while counting is in progress when a value is written to timer a2, a3, or a4 register, it is written to only reload register. (transferred to counter at next reload time.) (ffff 16 C n + 1)
timer a 7702/7703 group users manual 5C21 5.4 event counter mode fig. 5.4.1 structures of timer ai mode register and timer ai register in event counter mode b7 b6 b5 b4 b3 b2 b1 b0 001 bit up-down switching factor select bit count polarity select bit bit name these bits are ignored in event counter mode. fix this bit to ??in event counter mode. 5 : it may be either ??or ?. 7 functions 0 : counts at falling edge of external signal 1 : counts at rising edge of external signal 0 : contents of up-down register 1 : input signal to tai out pin at reset 0 0 0 0 0 rw pulse output function select bit operating mode select bits 1 0 : no pulse output (tai out pin functions as a programmable i/o port.) 1 : pulse output (tai out pin functions as a pulse output pin.) 0 1 : event counter mode b1 b0 0 0 0 55 0 2 rw rw 3 4 5 6 rw rw rw rw rw rw timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) rw 15 to 0 bit functions at reset rw these bits can be set to ?000 16 ?to ?fff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1 when down-counting, or by ffff 16 ?n + 1 when up-counting. when reading, the register indicates the counter value. undefined
timer a 7702/7703 group users manual 5C22 5.4 event counter mode 5.4.1 setting for event counter mode figures 5.4.2 and 5.4.3 show an initial setting example for registers relevant to the event counter mode. note that when using interrupts, set up to enable the interrupts. for details, refer to chapter 4. interrupts. fig. 5.4.2 initial setting example for registers relevant to event counter mode (1) ] the count er divides the count source frequency by n + 1 when down-counting, or by ffff 16 C n + 1 when up- counting. continue to figure 5.4.3 on next page. b7 b0 01 0 selecting event counter mode and each function timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) pulse output function select bit 0: no pulse output 1: pulse output count polarity select bit 0: counts at falling edge of external signal. 1: counts at rising edge of external signal. up-down switching factor select bit 0: contents of up-down register 1: input signal to tai out pin 5 : it may be either 0 or 1. selection of event counter mode setting divide ratio b7 b0 can be set to 0000 16 to ffff 16 (n). (b15) (b8) b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) 55 b7 b0 setting upCdown register upCdown register (address 44 16 ) timer a0 upCdown bit timer a1 upCdown bit timer a2 upCdown bit timer a3 upCdown bit timer a4 upCdown bit timer a2 twoCphase pulse signal processing select bit timer a3 twoCphase pulse signal processing select bit timer a4 twoCphase pulse signal processing select bit set the corresponding upCdown bit when the contents of the u p-down register are selected as the up-down sw itching factor. set the corresponding bit to 1 when the twoCphase pulse signal processing function is selected for timers a2 to a4. 0: downCcount 1: upCcount 0: twoCphase pulse signal processing function disabled 1: twoCphase pulse signal processing function enabled
timer a 7702/7703 group users manual 5C23 5.4 event counter mode aaaaa aaaaa setting the count start bit to ? b7 b0 count start register (address 40 16 ) timer a0 count start bit timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit aaaa aaaa aaaa aaaa count starts from preceding figure 5.4.2 . setting port p5 and port p6 direction registers b7 b0 port p5 direction register (address d 16 ) ta0 in pin ta1 out pin ta1 in pin ta2 out pin ta2 in pin ta3 out pin b7 b0 port p6 direction register (address 10 16 ) clear the bit corresponding to the tai in pin to ?. when selecting the tai out pin? input signal as up-down switching factor, set the bit corresponding to the tai out pin to ?. when selecting the two?hase pulse signal processing function, set the bit corresponding to the taj out (j = 2 to 4) pin to ?. ta4 out pin ta4 in pin ta3 in pin ta0 out pin setting interrupt priority level b7 b0 timer ai interrupt control register (i = 0 to 4) (addresses 75 16 to 79 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1-7. when disabling interrupts, set these bits to level 0. fig. 5.4.3 initial setting example for registers relevant to event counter mode (2)
timer a 7702/7703 group users manual 5C24 5.4 event counter mode timer ai interrupt request bit ffff 16 n 0000 16 time count start bit ? ? counter contents (hex.) n = reload register? contents cleared to ?? when interrupt request is accepted or cleared by software. set to ??by software. starts counting. up-down bit ? note: the above applies when the up-down bit? contents are selected as the up-down switching factor (i.e., up-down switching factor select bit = ??). ? ? ? set to ??by software. 5.4.2 operation in event counter mode when the count start bit is set to 1, the counter starts counting of the count source. the counter counts the count sources valid edges. a when the counter underflows or overflows, the reload registers contents are reloaded and counting continues. ? the timer ai interrupt request bit is set to 1 when the counter underflows or overflows in a . the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. figure 5.4.4 shows an example of operation in the event counter mode. fig. 5.4.4 example of operation in event counter mode (without pulse output function and two-phase pulse signal processing function)
timer a 7702/7703 group users manual 5C25 5.4 event counter mode (1) switching between up-count and down-count the up-down register (address 44 16 ) or the input signal from the tai out pin is used to switch the up- count from and to the down-count. this switching is performed by the up-down bit when the up-down switching factor select bit (bit 4 at addresses 56 16 to 5a 16 ) is 0, and by the input signal from the tai out pin when the up-down switching factor select bit is 1. when switching the up-count/down-count, this switching is actually performed when the count sources next valid edge is input. l switching by up-down bit the counter down-counts when the up-down bit is 0, and up-counts when the up-down bit is 1. figure 5.4.5 shows the structure of the up-down register. l switching by tai out pins input signal the counter down-counts when the tai out pins input signal is at l level, and up-counts when the tai out pins input signal is at h level. when using the tai out pin input signal to switch the up-count/down-count, set the port p5 and p6 direction registers bits which correspond to the tai out pin for the input mode. fig. 5.4.5 structure of up-down register bit bit name at reset 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 up-down register (address 44 16 ) 0 0 0 timer a4 up-down bit timer a3 up-down bit timer a2 up-down bit timer a1 up-down bit timer a0 up-down bit timer a2 two-phase pulse signal processing select bit (note) timer a3 two-phase pulse signal processing select bit (note) timer a4 two-phase pulse signal processing select bit (note) 0 : down-count 1 : up-count this function is valid when the contents of the up-down register are selected as the up-down switching factor. 0 : disabled two-phase pulse signal processing function 1 : enabled two-phase pulse signal processing function when not using the two-phase pulse signal processing function, make sure to set the bit to ?. the value is ??at reading. note: use the ldm or sta instruction when writing to bits 5 to 7. 0 1 2 3 4 5 6 7 rw rw rw rw rw wo wo wo
timer a 7702/7703 group users manual 5C26 5.4 event counter mode 5.4.3 select functions the following describes the selective pulse output, and two-phase pulse signal processing functions. (1) pulse output function the pulse output function is selected by setting the pulse output function select bit (bit 2 at addresses 56 16 to 5a 16 ) to 1. when this function is selected, the tai out pin is forcibly set for the pulse output pin regardless of the corresponding bits of the port p5 and port p6 direction registers. the tai out pin outputs pulses of which polarity is inverted each time the counter underflows or overflows. (refer to figure 5.3.6.) when the count start bit (address 40 16 ) is 0 (count stopped), the tai out pin outputs l level.
timer a 7702/7703 group users manual 5C27 5.4 event counter mode (2) two-phase pulse signal processing function (timers a2 to a4) for timers a2 to a4, the two-phase pulse signal processing function is selected by setting the two- phase pulse signal processing select bits (bits 5 to 7 at address 44 16 ) to 1. (refer to figure 5.4.5. ) figure 5.4.6 shows the timer a2, a3, and a4 mode registers when the two-phase pulse signal processing function is selected. with timers selecting the two-phase pulse signal processing function, the timer counts two kinds of pulses of which phases differ by 90 degrees. there are two types of the two-phase pulse signal processing: normal processing and quadruple processing. in timers a2 and a3, normal processing is performed; in timer a4, quadruple processing is performed. for some bits of the port p5 and p6 direction registers correspond to pins used for two-phase pulse input, set these bits for the input mode. l normal processing the timer up-counts the rising edges to the tak in pin when the phase has the relationship that the tak in pins input signal level goes from l to h while the tak out (k = 2 and 3) pins input signal is h level. the timer down-counts the falling edges to the tak in pin when the phase has the relationship that the tak in pins input signal level goes from h to l while the tak out pins input signal is h level. (refer to figure 5.4.7.) fig. 5.4.6 timer a2, a3, and a4 mode registers when two-phase pulse signal processing function is selected 1 00001 timer a2 mode register (address 58 16 ) timer a3 mode register (address 59 16 ) timer a4 mode register (address 5a 16 ) b7 b6 b5 b4 b3 b2 b1 b0 5 : it may be either ??or ?. 55 fig. 5.4.7 normal processing tak out tak in (k=2, 3) ? ? ? up count +1 +1 +1 ? ? ? down- count ? up- count up- count up- count down- count down- count
timer a 7702/7703 group users manual 5C28 5.4 event counter mode l quadruple processing the timer up-counts all rising and falling edges to the ta4 out and ta4 in pins when the phase has the relationship that the ta4 in pins input signal level goes from l to h while the ta4 out pins input signal is h level. the timer down-counts all rising and falling edges to the ta4 out and ta4 in pins when the phase has the relationship that the ta4 in pins input signal level goes from h to l while the ta4 out pins input signal is h level. (refer to figure 5.4.8.) table 5.4.3 lists the input signals to the ta4 out and ta4 in pins when the quadruple processing is selected. table 5.4.3 ta4 out and ta4 in pins input signals when quadruple operation is selected input signal to ta4 out pin input signal to ta4 in pin h level l level rising falling h level l level rising falling rising falling l level h level falling rising h level l level up-count down-count fig. 5.4.8 quadruple processing ta4 out ta4 in ? ? ? ? +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 up-count all edges ? ? ? ? ? ? ? ? ? ? down-count all edges up-count all edges down-count all edges
timer a 7702/7703 group users manual 5C29 5.4 event counter mode [precautions when operating in event counter mode] 1. by reading the timer ai register, the counter value can be read out at any timing while counting is in progress. however, when the timer ai register is read at the reload timing shown in figure 5.4.9, a value ffff 16 (at the underflow) or 0000 16 (at the overflow) is read out. when reading the timer ai register after setting a value to the register while counting is not in progress and before the counter starts counting, the set value is read out correctly. fig. 5.4.9 reading timer ai register 2. the tai out pin is used for all functions listed below. accordingly, only one of these functions can be selected for each timer. ?switching between up-count and down-count by tai out pins input signal ?pulse output function ?two-phase pulse signal processing function for timers a2 to a4 210 n n ?1 counter value (hex.) 210 ffff n ?1 read value (hex.) reload time n = reload register? contents (1) for down-count fffd fffe ffff n n + 1 fffd fffe ffff 0000 n + 1 (2) for up-count counter value (hex.) read value (hex.) reload time n = reload register? contents
timer a 7702/7703 group users manual 5C30 5.5 one-shot pulse mode 5.5 one-shot pulse mode in this mode, the timer outputs a pulse which has an arbitrary width once. (refer to table 5.5.1.) when a trigger occurs, the timer outputs h level from the tai out pin for an arbitrary time. figure 5.5.1 shows the structures of the timer ai mode register and timer ai register in the one-shot pulse mode. table 5.5.1 specifications of one-shot pulse mode [s] n : timer ai register setting value item count source count operation output pulse width (h) count start condition count stop condition interrupt request occurrence timing tai in pin function tai out pin function read from timer ai register write to timer ai register specifications f 2 , f 16 , f 64 , or f 512 l down-count l when the counter value becomes 0000 16 , reload registers con- tents are reloaded and counting stops. l if a trigger occurs during counting, reload registers contents are reloaded then and counting continues. l when a trigger occurs. ( note ) l internal or external trigger can be selected by software. l when the counter value becomes 0000 16 , l when count start bit is cleared to 0 when counting stops. programmable i/o port or trigger input one-shot pulse output an undefined value is read out. l while counting is stopped when a value is written to timer ai register, it is written to both reload register and counter. l while counting is in progress when a value is written to timer ai register, it is written to only reload register. (transferred to counter at next reload time.) note: the trigger is generated with the count start bit = 1. n f i
timer a 7702/7703 group users manual 5C31 5.5 one-shot pulse mode b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0001 16 to ffff 16 . assuming that the set value = n, the h level width of the one-shot pulse output from the tai out pin is expressed as follows : n / f i . undefined f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) wo trigger select bits fix this bit to 1 in one-shot pulse mode. 1 bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 1 0 : one-shot pulse mode 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b4 b3 fix this bit to 0 in one-shot pulse mode. 10 1 0 0 : writing 1 to one-shot start bit 0 1 : in pin functions as a progra- mmable i/o port.) 1 0 : falling edge of tai in pins input signal 1 1 : rising edge of tai in pins input signal bit at reset 0 0 0 0 0 0 0 0 rw 0 4 0 2 3 5 6 rw rw rw rw rw rw rw rw operating mode select bits fig. 5.5.1 structures of timer ai mode register and timer ai register in one-shot pulse mode (tai
timer a 7702/7703 group users manual 5C32 5.5 one-shot pulse mode 5.5.1 setting for one-shot pulse mode figures 5.5.2 and 5.5.3 show an initial setting example for registers relevant to the one-shot pulse mode. note that when using interrupts, set up to enable the interrupts. for details, refer to chapter 4. interrupts. fig. 5.5.2 initial setting example for registers relevant to one-shot pulse mode (1) continue to figure 5.5.3 . setting interrupt priority level b7 b0 timer ai interrupt control register (i = 0 to 4) (addresses 75 16 to 79 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1-7. when disabling interrupts, set these bits to level 0. b7 b0 10 0 selecting one-shot pulse mode and each function timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 1 trigger select bits 0 0 : 0 1 : 1 0 : falling of tai in pin? input signal: external trigger 1 1 : rising of tai in pin? input signal: external trigger b4 b3 count source select bits 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 selection of one-shot pulse mode setting ??level width of one-shot pulse b7 b0 can be set to ?001 16 ?to ?fff 16 ?(n). (b15) (b8) b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) ??level width = writing ??to one-shot start bit: internal trigger fi note . n
timer a 7702/7703 group users manual 5C33 5.5 one-shot pulse mode fig. 5.5.3 initial setting example for registers relevant to one-shot pulse mode (2) aaaa aaaa aaaa count starts trigger generated trigger input to tai in pin when internal trigger is selected when external trigger is selected from preceding figure 5.5.2 . b7 b0 one-shot start register (address 42 16 ) setting one-shot start bit to ? timer a0 one-shot start bit timer a1 one-shot start bit timer a2 one-shot start bit timer a3 one-shot start bit timer a4 one-shot start bit setting count start bit to ? b7 b0 timer a0 count start bit timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit count start register (address 40 16 ) b7 b0 port p5 direction register (address d 16 ) setting port p5 and port p6 direction registers ta0 in pin ta1 in pin ta2 in pin ta3 in pin port p6 direction register (address 10 16 ) ta4 in pin b7 b0 set the corresponding bit to ?. setting count start bit to ? b7 b0 timer a0 count start bit timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit count start register (address 40 16 )
timer a 7702/7703 group users manual 5C34 5.5 one-shot pulse mode 5.5.2 count source in the one-shot pulse mode, the count source select bits (bits 6 and 7 at addresses 56 16 to 5a 16 ) select the count source. table 5.5.2 lists the count source frequency. table 5.5.2 count source frequency count source select bits b7 b6 00 01 10 11 count source frequency f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz 4 mhz 8 mhz 12.5 mhz 500 khz 1 mhz 1.5625 mhz 125 khz 250 khz 390.625 khz 15625 hz 31250 hz 48.8281 khz count source f 2 f 16 f 64 f 512
timer a 7702/7703 group users manual 5C35 5.5 one-shot pulse mode 5.5.3 trigger the counter is enabled for counting when the count start bit (address 40 16 ) is set to 1. the counter starts counting when a trigger is generated after it has been enabled. an internal or an external trigger can be selected as that trigger. an internal trigger is selected when the trigger select bits (bits 4 and 3 at addresses 56 16 to 5a 16 ) are 00 2 or 01 2 ; an external trigger is selected when the bits are 10 2 or 11 2 . if a trigger is generated during counting, the reload registers contents are reloaded and the counter continues counting. if generating a trigger during counting, make sure that a certain time which is equivalent to one cycle of the timers count source or more has passed between the previous generated trigger and a new generated trigger. (1) when selecting internal trigger a trigger is generated when writing 1 to the one-shot start bit (address 42 16 ). figure 5.5.4 shows the structure of the one-shot start register. (2) when selecting external trigger a trigger is generated at the falling of the tai in pins input signal when bit 3 at addresses 56 16 to 5a 16 is 0, or at its rising when bit 3 is 1. when using an external trigger, set the port p5 and p6 direction registers bits which correspond to the tai in pins for the input mode. fig. 5.5.4 structure of one-shot start register bit 7 to 5 nothing is assigned. timer a4 one-shot start bit timer a3 one-shot start bit timer a2 one-shot start bit timer a1 one-shot start bit timer a0 one-shot start bit bit name at reset 0 0 undefined 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 one-shot start register (address 42 16 ) 1 : start outputting one-shot pulse (valid when selecting internal trigger.) the value is 0 at reading. 0 1 2 3 4 wo wo wo wo wo C
timer a 7702/7703 group users manual 5C36 5.5 one-shot pulse mode 5.5.4 operation in one-shot pulse mode when the one-shot pulse mode is selected with the operating mode select bits, the tai out pin outputs l level. when the count start bit is set to 1, the counter is enabled for counting. after that, counting starts when a trigger is generated. a when the counter starts counting, the tai out pin outputs h level. ? when the counter value becomes 0000 16 , the output from the tai out pin becomes l level. additionally, the reload registers contents are reloaded and the counter stops counting there. ? simultaneously at ? , the timer ai interrupt request bit is set to 1. this interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. figure 5.5.5 shows an example of operation in the one-shot pulse mode. when a trigger is generated after ? above, the counter and tai out pin perform the same operations beginning from again. furthermore, if a trigger is generated during counting, the counter down-counts once after this generated new trigger, and it continues counting with the reload registers contents reloaded. if generating a trigger during counting, make sure that a certain time which is equivalent to one cycle of the timers count source or more has passed between the previous generated trigger and a new generated trigger. the one-shot pulse output from the tai out pin can be disabled by clearing the timer ai mode registers bit 2 to 0. accordingly, timer ai can be also used as an internal one-shot timer that does not perform the pulse output. in this case, the tai out pin functions as a programmable i/o port.
timer a 7702/7703 group users manual 5C37 5.5 one-shot pulse mode fig. 5.5.5 example of operation in one-shot pulse mode (selecting external trigger) stops counting. starts counting. ffff 16 n 0001 16 time count start bit timer ai interrupt request bit 1 1 counter contents (hex.) n = reload registers contents cleared to 0 when interrupt request is accepted or cleared by software. set to 1 by software. starts counting. tai in pin input signal h one-shot pulse output from tai out pin h trigger during counting 1 / f i 5 (n) note: the above applies when an external trigger (rising of tai in pins input signal) is selected. 0 l l 0 1 / f i 5 (n+1) when the count start bit = 0 (counting stopped), the tai out pin outputs l level. when a trigger is generated during counting, the counter counts the count source n + 1 times after a new trigger is generated. fi = frequency of count source (f 2 , f 16 , f 64 , or f 512 ) stops counting. reloaded reloaded
timer a 7702/7703 group users manual 5C38 5.5 one-shot pulse mode [precautions when operating in one-shot pulse mode] 1. if the count start bit is cleared to 0 during counting, the counter stops counting and the reload registers contents are reloaded into the counter, and the tai out pins output level becomes l. at the same time, the timer ai interrupt request bit is set to 1. 2. a one-shot pulse is output synchronously with an internally generated count source. accordingly, when selecting an external trigger, there will be a delay equivalent to one cycle of count source at maximum from when a trigger is input to the tai in pin till when a one-shot pulse is output. fig. 5.5.6 output delay in one-shot pulse output 3. when setting the timers operating mode in one of the followings, the timer ai interrupt request bit is set to 1. l when the one-shot pulse mode is selected after a reset l when the operating mode is switched from the timer mode to the one-shot pulse mode l when the operating mode is switched from the event counter mode to the one-shot pulse mode therefore, when using the timer ai interrupt (interrupt request bit), be sure to clear the timer ai interrupt request bit to 0 after above setting. 4. do not set 0000 16 to the timer ai register. note: the above applies when an external trigger (falling of tai in pin? input signal) is selected. tai in pin? input signal ? ? count source trigger input starts outputting of one-shot pulse one-shot pulse output from tai out pin output delay
timer a 7702/7703 group users manual 5C39 5.6 pulse width modulation (pwm) mode 5.6 pulse width modulation (pwm) mode in this mode, the timer continuously outputs pulses which have an arbitrary width. (refer to table 5.6.1.) figure 5.6.1 shows the structures of the timer ai mode register and timer ai register in the pwm mode. table 5.6.1 specifications of pwm mode item count source count operation pmw period/h level width count start condition count stop condition interrupt request occurrence timing tai in pin function tai out pin function read from timer ai register write to timer ai register specifications f 2 , f 16 , f 64 , or f 512 l down-count (operating as an 8-bit or 16-bit pulse width modulator) l reload registers contents are reloaded at rising of pwm pulse and counting continues. l a trigger generated during counting does not affect the counting. <16-bit pulse width modulator> h level width = [s] n: timer ai register setting value <8-bit pulse width modulator> h level width = [s] m: timer ai register low-order 8 bits setting value n: timer ai register high-order 8 bits setting value l when a trigger is generated. (note) l internal or external trigger can be selected by software. when count start bit is cleared to 0. at falling of pwm pulse programmable i/o port or trigger input pwm pulse output an undefined value is read out. l while counting is stopped when a value is written to timer ai register, it is written to both reload register and counter. l while counting is in progress when a value is written to timer ai register, it is written to only reload register. (transferred to counter at next reload time.) period = [s] (2 16 C 1) f i period = [s] (m + 1)(2 8 C 1) f i n f i n(m + 1) f i note: the trigger is generated with the count start bit = 1.
timer a 7702/7703 group users manual 5C40 5.6 pulse width modulation (pwm) mode fig. 5.6.1 structures of timer ai mode registers and timer ai registers in pwm mode b7 b0 b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0000 16 to fffe 16 . assuming that the set value = n, the h level width of the pwm pulse output from the tai out pin is expressed as follows: pwm pulses period is expressed as follows: undefined (b15) (b8) wo n f i n 16 C 1 f i f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) (b15) b7 b0 b7 b0 (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 7 to 0 15 to 8 undefined undefined these bits can be set to 00 16 to ff 16 . assuming that the set value = m, pwm pulses period output from the tai out pin is expressed as follows: (m + 1)(2 8 C 1) f i wo these bits can be set to 00 16 to fe 16 . assuming that the set value = n, the h level width of the pwm pulse output from the tai out pin is expressed as follows: n(m + 1) f i wo f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits 11 1 at reset 0 rw trigger select bits fix this bit to 1 in pwm mode. 1 operating mode select bits bit name functions 1 1 : pwm mode b1 b0 b4 b3 16/8-bit pwm mode select bit 0 0 : writing 1 to count start bit 0 1 : (tai in pin functions as a pro- grammable i/o port.) 1 0 : falling edge of tai in pins input signal 1 1 : rising edge of tai in pins input signal bit 0 : as a 16-bit pulse width modulator 1 : as an 8-bit pulse width modulator 4 0 2 3 5 6 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw
timer a 7702/7703 group users manual 5C41 5.6 pulse width modulation (pwm) mode 5.6.1 setting for pwm mode figures 5.6.2 and 5.6.3 show an initial setting example for registers relevant to the pwm mode. note that when using interrupts, set up to enable the interrupts. for details, refer to chapter 4. interrupts. fig. 5.6.2 initial setting example for registers relevant to pwm mode (1) note: when operating as 8-bit pulse width modulator (m+1) (2 8 ?1) fi n(m+1) fi fi : frequency of count source however, if n = ?0 16 ? the pulse width modulator does not operate and the tai out pin outputs ?? level. at this time, no timer ai request occurs. b7 b0 count source select bits 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 11 selecting pwm mode and each function timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) b7 b6 1 16/8-bit pwm mode select bit 0 : operates as 16-bit pulse width modulator 1 : operates as 8-bit pulse width modulator continue to figure 5.6.3 . trigger select bits 0 0 : 0 1 : 1 0 : falling of tai in pin? input signal 1 1 : rising of tai in pin? input signal b3 b4 selection of pwm mode setting pwm pulse? period and ??level width b7 b0 can be set to ?000 16 ?to ?ffe 16 ?(n) (b15) (b8) b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) note: when operating as 16-bit pulse width modulator (2 16 ?1) fi n fi fi : frequency of count source however, if n = ?000 16 ? the pulse width modulator does not operate and the tai out pin outputs ??level. at this time, no timer ai request occurs. l when operating as 16-bit pulse width modulator b7 b0 can be set to ?0 16 ?to ?f 16 ?(m) (b15) (b8) b7 b0 l when operating as 8-bit pulse width modulator can be set to ?0 16 ?to ?e 16 ?(n) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) writing ??to count start bit: internal trigger : external trigger : external trigger period = ??level width = period = ??level width =
timer a 7702/7703 group users manual 5C42 5.6 pulse width modulation (pwm) mode aaa aaa aaa count starts trigger input to tai in pin when external trigger is selected when internal trigger is selected from preceding figure5.6.2. trigger generated b7 b0 port p5 direction register (address d 16 ) setting port p5 and port p6 direction registers ta0 in pin ta1 in pin ta2 in pin ta3 in pin ta4 in pin b7 b0 clear the corresponding bit to ?. port p6 direction register (address 10 16 ) setting interrupt priority level b7 b0 timer ai interrupt control register (i = 0 to 4) (addresses 75 16 to 79 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1 ?7. when disabling interrupts, set these bits to level 0. setting count start bit to ? b7 b0 count start register (address 40 16 ) timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit timer a0 count start bit setting count start bit to ? b7 b0 count start register (address 40 16 ) timer a1 count start bit timer a2 count start bit timer a3 count start bit timer a4 count start bit timer a0 count start bit fig. 5.6.3 initial setting example for registers relevant to pwm mode (2)
timer a 7702/7703 group users manual 5C43 5.6 pulse width modulation (pwm) mode 5.6.2 count source in the pwm mode, the count source select bits (bits 6 and 7 at addresses 56 16 to 5a 16 ) select the count source. table 5.6.2 lists the count source frequency. table 5.6.2 count source frequency count source select bits b7 b6 00 01 10 11 count source frequency f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz 4 mhz 8 mhz 12.5 mhz 500 khz 1 mhz 1.5625 mhz 125 khz 250 khz 390.625 khz 15625 hz 31250 hz 48.8281 khz count source f 2 f 16 f 64 f 512 5.6.3 trigger when a trigger is generated, the tai out pin starts outputting pwm pulses. an internal or an external trigger can be selected as that trigger. an internal trigger is selected when the trigger select bits (bits 4 and 3 at addresses 56 16 to 5a 16 ) are 00 2 or 01 2 ; an external trigger is selected when the bits are 10 2 or 11 2 . a trigger generated during outputting of pwm pulses is ignored and it does not affect the pulse output operation. (1) when selecting internal trigger a trigger is generated when writing 1 to the count start bit (at address 40 16 ). (2) when selecting external trigger a trigger is generated at the falling of the tai in pins input signal when bit 3 at addresses 56 16 to 5a 16 is 0, or at its rising when bit 3 is 1. however, the trigger input is accepted only when the count start bit is 1. when using an external trigger, set the port p5 and p6 direction registers bits which correspond to the tai in pins for the input mode.
timer a 7702/7703 group users manual 5C44 5.6 pulse width modulation (pwm) mode 5.6.4 operation in pwm mode when the pwm mode is selected with the operating mode select bits, the tai out pin outputs l level. when a trigger is generated, the counter (pulse width modulator) starts counting and the tai out pin outputs a pwm pulse ( notes 1 and 2 ). a the timer ai interrupt request bit is set to 1 each time the pwm pulse level goes from h to l. the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. ? each time a pwm pulse has been output for one period, the reload registers contents are reloaded and the counter continues counting. the following explains operation of the pulse width modulator. [16-bit pulse width modulator] when the 16/8-bit pwm mode select bit is set to 0, the counter operates as a 16-bit pulse width modulator. figures 5.6.4 and 5.6.5 show operation examples of the 16-bit pulse width modulator. [8-bit pulse width modulator] when the 16/8-bit pwm mode select bit is set to 1, the counter is divided into 8-bit halves. then, the high-order 8 bits operate as an 8-bit pulse width modulator, and the low-order 8 bits operate as an 8-bit prescaler. figures 5.6.6 and 5.6.7 show operation examples of the 8-bit pulse width modulator. notes 1: if a value 0000 16 is set into the timer ai register when the counter operates as a 16-bit pulse width modulator, the pulse width modulator does not operate and the output from the tai out pin remains l level. the timer ai interrupt request does not occur. similarly, if a value 00 16 is set into the high-order 8 bits of the timer ai register when the counter operates as an 8- bit pulse width modulator, the same is performed. 2: when the counter operates as an 8-bit pulse width modulator, the tai out pin outputs l level of the pwm pulse which has the same width as set h level of the pwm pulse after a trigger generated. after that, the pwm pulse output starts from the tai out pin.
timer a 7702/7703 group users manual 5C45 5.6 pulse width modulation (pwm) mode fig. 5.6.4 operation example of 16-bit pulse width modulator fig. 5.6.5 operation example of 16-bit pulse width modulator (when counter value is updated during pulse output) 1 / f i 5 (2 16 C 1) 1 / f i 5 (n) count source tai in pins input signal pwm pulse output from tai out pin note: the above applies when reload register (n) = 0003 16 and an external trigger (rising of tai in pins input signal) is selected. trigger is not generated by this signal. h h l l timer ai interrupt request bit 1 0 cleared to 0 when interrupt request is accepted or cleared by software. fi: frequency of count source (f 2 , f 16 , f 64 , or f 512 ) when an arbitrary value is set to the timer ai register after setting 0000 16 to it, the timing at which the pwm pulse goes h depends on the timing at which the new value is set. note: the above applies when an external trigger (rising of tai in pins input signal) is selected. fffe 16 n 0001 16 tai in pins input signal h counter contents (hex.) l h l (1 / f i ) 5 (2 16 C1) (2 16 C1) C n (1 / f i ) 5 (2 16 C1) pwm pulse output from tai out pin 0000 16 is set to timer ai register. 2000 16 is set to timer ai register. 2000 16 fffe 16 is set to timer ai register. n = reload registers contents fi: frequency of count source (f 2 , f 16 , f 64 , or f 512 ) restarts counting. stops counting. time (1 / pf i ) 5 (2 C1) 16
timer a 7702/7703 group users manual 5C46 5.6 pulse width modulation (pwm) mode fig. 5.6.6 operation example of 8-bit pulse width modulator count source tai in pins input signal 1 / f i 5 (m+1) 5 (2 8 C1) pwm pulse output from tai out pin note: the above applies when the reload registers high-order 8 bits (n) = 02 16 and low-order 8 bits (m) = 02 16 and an external trigger (falling of tai in pin input signal) is selected. h h h l l l 1 0 timer ai interrupt request bit cleared to 0 when interrupt request is accepted or cleared by software. fi: frequency of count source (f 2 , f 16 , f 64 , or f 512 ) the 8-bit prescaler counts the count source. the 8-bit pulse width modulator counts the 8-bit prescalers underflow signal. 8-bit prescalers underflow signal 1 / f i 5 (m+1) 5 (n) 1 / f i 5 (m+1)
timer a 7702/7703 group users manual 5C47 5.6 pulse width modulation (pwm) mode fig. 5.6.7 operation example of 8-bit pulse width modulator (when counter value is updated during pulse output) ? ? ? ? (1 / f i ) 5 (m+1) 5 (2 8 ?) pwm pulse output from tai out pin count source tai in pin? input signal (1 / f i ) 5 (m+1) 5 (2 8 ?) (1 / f i ) 5 (m + 1) 5 (2 8 ?) 00 16 prescaler's contents (hex.) 02 16 time stops counting. 01 16 counter? contents (hex.) 04 16 0a 16 time when an arbitrary value is set to the timer ai register after setting ?0 16 ?to it, the timing at which the pwm pulse level goes ??depends on the timing at which the new value is set. ?002 16 ?is set to timer ai register. 0a02 16 is set to timer ai register. ?402 16 ?is set to timer ai register. restarts counting. note: the above applies when an external trigger (falling of tai in pin? input signal) is selected. fi: frequency of count source (f 2 , f 16 , f 64 , or f 512 ) m: contents of reload register? low-order 8 bits
timer a 7702/7703 group users manual 5C48 5.6 pulse width modulation (pwm) mode [precautions when operating in pwm mode] 1. if the count start bit is cleared to 0 while outputting pwm pulses, the counter stops counting. when the tai out pin was outputting h level at that time, the output level becomes l and the timer ai interrupt request bit is set to 1. when the tai out pin was outputting l level, the output level does not change and the timer ai interrupt request does not occur. 2. when setting the timers operating mode in one of the followings, the timer ai interrupt request bit is set to 1. l when the pwm mode is selected after a reset l when the operating mode is switched from the timer mode to pwm mode l when the operating mode is switched from the event counter mode to the pwm mode therefore, when using the timer ai interrupt (interrupt request bit), be sure to clear the timer ai interrupt request bit to 0 after the above setting.
chapter 6 timer b 6.1 overview 6.2 block description 6.3 timer mode 6.4 event counter mode 6.5 pulse period/pulse width mea- surement mode
timer b 7702/7703 group users manual 6C2 timer b consists of three counters (timers b0 to b2) each equipped with a 16-bit reload function. timers b0 to b2 have identical functions and operate independently of each other. 7703 group timers b1 and b2s function of the 7703 group varies from the 7702 groups. refer to chapter 20. 7703 group . 6.1 overview timer bi (i = 0 to 2) has three operating modes listed below. l timer mode the timer counts an internally generated count source. l event counter mode the timer counts an external signal. l pulse period/pulse width measurement mode the timer measures an external signals pulse period or pulse width. 6.2 block description figure 6.2.1 shows the block diagram of timer b. explanation of registers relevant to timer b is described below. 6.1 overview 6.2 block description fig. 6.2.1 block diagram of timer b f 2 f 16 f 64 f 512 count source select bits timer mode pulse period/pulse width measurement mode polarity switching and edge pulse generating circuit event counter mode count start bit counter reset circuit data bus (odd) data bus (even) (low-order 8 bits) (high-order 8 bits) timer bi reload register (16) timer bi counter (16) timer bi interrupt request bit tbi in timer bi overflow flag (valid in pulse period/pulse width measurement mode)
7702/7703 group users manual timer b 6C3 6.2 block description 6.2.1 counter and reload register (timer bi register) each of timer bi counter and reload register consists of 16 bits and has the following functions. (1) functions in timer mode and event counter mode the counter down-counts each time count source is input. the reload register is used to store the initial value of the counter. when the counter underflows, the reload registers contents are reloaded into the counter. values are set to the counter and reload register by writing a value to the timer bi register. table 6.2.1 lists the memory assignment of the timer bi register. the value written into the timer bi register when the counting is not in progress is set to the counter and reload register. the value written into the timer bi register when the counting is in progress is set to only the reload register. in this case, the reload registers updated contents are transferred to the counter when the counter underflows next time. the counter value is read out by reading out the timer bi register. note: when reading and writing from/to the timer bi register, perform them in an unit of 16 bits. for more information about the value got by reading the timer bi register, refer to [precautions when operating in timer mode] and [precautions when operating in event counter mode]. (2) functions in pulse period/pulse width measurement mode the counter up-counts each time count source is input. the reload register is used to hold the pulse period or pulse width measurement result. when a valid edge is input to the tbi in pin, the counter value is transferred to the reload register. in this mode, the value got by reading the timer bi register is the reload registers contents, so that the measurement result is obtained. note: when reading from the timer bi register, perform it in an unit of 16 bits. timer bi register timer b0 register timer b1 register timer b2 register low-order byte address 50 16 address 52 16 address 54 16 high-order byte address 51 16 address 53 16 address 55 16 note : when reset, the contents of the timer bi reg- ister are undefined. table 6.2.1 memory assignment of timer bi registers
timer b 7702/7703 group users manual 6C4 6.2.2 count start register this register is used to start and stop counting. each bit of this register corresponds each timer. figure 6.2.2 shows the structure of the count start register. 6.2 block description fig. 6.2.2 structure of count start register bit timer b2 count start bit timer b1 count start bit timer b0 count start bit timer a4 count start bit timer a3 count start bit timer a2 count start bit timer a1 count start bit timer a0 count start bit bit name at reset 0 0 0 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 count start register (address 40 16 ) 0 : stop counting 1 : start counting rw rw rw rw rw rw rw rw 0 1 2 3 4 5 6 7 : bits 0 to 4 are not used for timer b.
7702/7703 group users manual timer b 6C5 6.2.3 timer bi mode register figure 6.2.3 shows the structure of the timer bi mode register. the operating mode select bits are used to select the operating mode of timer bi. bits 2 and 3 and bits 5 to 7 have different functions according to the operating mode. these bits are described in the paragraph of each operating mode. 6.2 block description fig. 6.2.3 structure of timer bi mode register nothing is assigned. these bits have different functions according to the operating mode. 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 0 0 : timer mode 0 1 : event counter mode 1 0 : pulse period/pulse width measurement mode 1 1 : not selected b1 b0 bit 5 at reset rw 0 2 0 rw rw rw 6 7 note: bit 5 is ignored in the timer mode and event counter mode; its value is undefined at reading. 3 0 0 rw 0 C undefined 4 ro (note) undefined rw 0 rw 0 these bits have different functions according to the operating mode.
timer b 7702/7703 group users manual 6C6 6.2.4 timer bi interrupt control register figure 6.2.4 shows the structure of the timer bi interrupt control register. for details about interrupts, refer to chapter 4. interrupts. 6.2 block description b7 b6 b5 b4 b3 b2 b1 b0 bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request interrupt priority level select bits 3 rw rw rw rw undefined 0 0 0 nothing is assigned. note: use the seb or clb instruction to set each interrupt control register. timer bi interrupt control registers (i = 0 to 2) (addresses 7a 16 to 7c 16 ) fig. 6.2.4 structure of timer bi interrupt control register (1) interrupt priority level select bits (bits 2 to 0) these bits select a timer bi interrupts priority level. when using timer bi interrupts, select priority levels 1 to 7. when the timer bi interrupt request occurs, its priority level is compared with the processor interrupt priority level (ipl), so that the requested interrupt is enabled only when its priority level is higher than the ipl. (however, this applies when the interrupt disable bit (i) = 0.) to disable timer bi interrupts, set these bits to 000 2 (level 0). (2) interrupt request bit (bit 3) this bit is set to 1 when the timer bi interrupt request occurs. this bit is automatically cleared to 0 when the timer bi interrupt request is accepted. this bit can be set to 1 or cleared to 0 by software.
7702/7703 group users manual timer b 6C7 6.2.5 port p6 direction register timer bis input pins are shared with port p6. when using these pins as timer bis input pins, set the corresponding bits of the port p6 direction register to 0 to set these pins for the input mode. figure 6.2.5 shows the relationship between port p6 direction register and timer bis input pins. 6.2 block description fig. 6.2.5 relationship between port p6 direction register and timer bis input pins 0 1 2 3 4 5 6 7 ta4 out pin in t 0 pin in t 1 pin in t 2 pin tb1 in pin tb0 in pin port p6 direction register (address 10 16 ) b1 b0 b2 b3 b4 b5 b6 b7 ta4 in pin tb2 in pin rw 0 0 0 0 0 0 0 0 : bits 0 to 4 are not used for timer b. corresponding pin name functions bit at reset 0: input mode 1: output mode when usi ng these pins as timer bi's input pins, set the corresponding bits to " 0." rw rw rw rw rw rw rw rw
timer b 6C8 7702/7703 group users manual 6.3 timer mode 6.3 timer mode in this mode, the timer counts an internally generated count source. (refer to table 6.3.1.) figure 6.3.1 shows the structures of the timer bi mode register and timer bi register in the timer mode. table 6.3.1 specifications of timer mode item count source count operation divide ratio count start condition count stop condition interrupt request occurrence timing tbi in pin function read from timer bi register write to timer bi register specifications f 2 , f 16 , f 64 , or f 512 ?down-count ?when the counter underflows, reload registers contents are reloaded and counting continues. when count start bit is set to 1. when count start bit is cleared to 0. when the counter underflows. programmable i/o port counter value can be read out. l while counting is stopped when a value is written to the timer bi register, it is written to both reload register and counter. l while counting is in progress when a value is written to the timer bi register, it is written to only reload register. (transferred to counter at next reload time.) 1 (n + 1) n: timer bi register setting value
timer b 7702/7703 group users manual 6C9 6.3 timer mode fig. 6.3.1 structures of timer bi mode register and timer bi register in timer mode b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) rw 15 to 0 bit functions at reset these bits can be set to ?000 16 ?to ?fff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined rw b7 b6 b5 b4 b3 b2 b1 b0 00 bit this bit is ignored in timer mode. nothing is assigned. bit name count source select bits functions at reset rw these bits are ignored in timer mode. operating mode select bits 1 0 0 : timer mode b1 b0 0 5 5 0 2 rw rw 3 rw rw timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 5 0 0 0 undefined 4 undefined 5 6 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 rw 0 rw 0
timer b 6C10 7702/7703 group users manual 6.3 timer mode 6.3.1 setting for timer mode figure 6.3.2 shows an initial setting example for registers relevant to the timer mode. note that when using interrupts, set up to enable the interrupts. for details, refer to chapter 4. interrupts. fig. 6.3.2 initial setting example for registers relevant to timer mode count starts b7 b0 count source select bits 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 selecting timer mode and count source timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) setting count start bit to 1 b7 b0 count start register (address 40 16 ) timer b0 count start bit timer b1 count start bit timer b2 count start bit b7 b6 setting interrupt priority level b7 b0 timer bi interrupt control register (i = 0 to 2) (addresses 7a 16 to 7c 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1C7. when disabling interrupts, set these bits to level 0. 5 : it may be either 0 or 1. selection of timer mode note : the counter divides the count source by n + 1. setting divide ratio b7 b0 can be set to 0000 16 to ffff 16 (n). (b15) (b8) b7 b0 timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) 00 55 5
timer b 7702/7703 group users manual 6C11 6.3 timer mode 6.3.2 count source in the timer mode, the count source select bits (bits 6 and 7 at addresses 5b 16 to 5d 16 ) select the count source. table 6.3.2 lists the count source frequency. table 6.3.2 count source frequency count source select bits b7 b6 00 01 10 11 count source frequency f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz 4 mhz 8 mhz 12.5 mhz 500 khz 1 mhz 1.5625 mhz 125 khz 250 khz 390.625 khz 15625 hz 31250 hz 48.8281 khz count source f 2 f 16 f 64 f 512
timer b 6C12 7702/7703 group users manual 6.3 timer mode 6.3.3 operation in timer mode when the count start bit is set to 1, the counter starts counting of the count source. when the counter underflows, the reload registers contents are reloaded and counting continues. a the timer bi interrupt request bit is set to 1 when the counter underflows in . the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. figure 6.3.3 shows an example of operation in the timer mode. stops counting. restarts counting. ffff 16 n 0000 16 time count start bit timer bi interrupt request bit ? ? counter contents (hex.) n = reload register? contents cleared to ??when interrupt request is accepted or cleared by software. set to ??by software. starts counting. set to ??by software. ? ? 1 / f i 5 (n+1) fi = frequency of count source (f 2 , f 16 , f 64 , f 512 ) cleared to ??by software. fig. 6.3.3 example of operation in timer mode
timer b 7702/7703 group users manual 6C13 6.3 timer mode [precautions when operating in timer mode] by reading the timer bi register, the counter value can be read out at any timing while counting is in progress. however, if the timer bi register is read at the reload timing shown in figure 6.3.4, the value ffff 16 is read out. when reading the timer bi register after setting a value to the register while counting is not in progress and before the counter starts counting, the set value can be read out correctly. fig. 6.3.4 reading timer bi register 210 n n ?1 counter value (hex.) 210 ffff n ?1 read value (hex.) aa reload time n = reload register? contents
timer b 6C14 7702/7703 group users manual 6.4 event counter mode 6.4 event counter mode in this mode, the timer counts an external signal. (refer to table 6.4.1.) figure 6.4.1 shows the structures of the timer bi mode register and the timer bi register in the event counter mode. table 6.4.1 specifications of event counter mode item count source count operation divide ratio count start condition count stop condition interrupt request occurrence timing tbi in pin function read from timer bi register write to timer bi register specifications ?external signal input to the tbi in pin ? the count sources effective edge can be selected from the falling edge, the rising edge, or both of the falling and rising edges by software. ?down-count ?when the counter underflows, reload registers contents are reloaded and counting continues. when count start bit is set to 1. when count start bit is cleared to 0. when the counter underflows. count source input counter value can be read out. l while counting is stopped when a value is written to the timer bi register, it is written to both reload register and counter. l while counting is in progress when a value is written to the timer bi register, it is written to only reload register. (transferred to counter at next reload time.) (n + 1) 1 n: timer bi register setting value
timer b 7702/7703 group users manual 6C15 6.4 event counter mode fig. 6.4.1 structures of timer bi mode register and timer bi register in event counter mode b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) rw 15 to 0 bit functions at reset rw these bits can be set to 0000 16 to ffff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined 0 0 : count at falling edge of external signal 0 1 : count at rising edge of external signal 1 0 : counts at both falling and rising edges of external signal 1 1 : not selected b7 b6 b5 b4 b3 b2 b1 b0 01 bit count polarity select bit bit name these bits are ignored in event counter mode. this bit is ignored in event counter mode. 7 functions at reset 0 0 0 undefined rw operating mode select bits 1 0 1 : event counter mode b1 b0 0 0 0 55 0 2 rw rw 3 4 5 6 rw rw rw rw timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) b3 b2 nothing is assigned. undefined 5
timer b 6C16 7702/7703 group users manual 6.4 event counter mode 6.4.1 setting for event counter mode figure 6.4.2 shows an initial setting example for registers relevant to the event counter mode. note that when using interrupts, set up to enable the interrupts. for details, refer to section chapter 4. interrupts. fig. 6.4.2 initial setting example for registers relevant to event counter mode note : the counter divides the count source by n + 1. setting divide ratio b7 b0 can be set to 0000 16 to ffff 16 (n). (b15) (b8) b7 b0 timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) count starts b7 b0 0 0 : counts at falling of external signal. 0 1 : counts at rising of external signal. 1 0 : counts at both of falling and rising of external signal. 1 1 : not selected. 01 selecting event counter mode and count polarity timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) setting count start bit to 1 b7 b0 count start register (address 40 16 ) timer b0 count start bit timer b1 count start bit timer b2 count start bit b3 b2 setting interrupt priority level b7 b0 timer bi interrupt control register (i = 0 to 2) (addresses 7a 16 to 7c 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1C7. when disabling interrupts, set these bits to level 0. setting port p6 direction register b7 b0 port p6 direction register (address 10 16 ) clear the corresponding bit to 0. tb0 in pin tb1 in pin tb2 in pin 5 5 : it may be either 0 or 1. selection of event counter mode count polarity select bits 5 5
timer b 7702/7703 group users manual 6C17 6.4 event counter mode 6.4.2 operation in event counter mode when the count start bit is set to 1, the counter starts counting of the count source. the counter counts the count sources valid edges. a when the counter underflows, the reload registers contents are reloaded and counting continues. ? the timer bi interrupt request bit is set to 1 when the counter underflows in a . the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. figure 6.4.3 shows an example of operation in the event counter mode. stops counting. restarts counting . ffff 16 n 0000 16 time count start bit timer bi interrupt request bit 1 1 counter contents (hex.) n = reload registers contents cleared to 0 when interrupt request is accepted or cleared by software. set to 1 by software. starts counting. cleared to 0 by software. 0 0 set to 1 by software. fig. 6.4.3 example of operation in event counter mode
timer b 6C18 7702/7703 group users manual 6.4 event counter mode [precautions when operating in event counter mode] by reading the timer bi register, the counter value can be read out at any timing while counting is in progress. however, if the timer bi register is read at the reload timing shown in figure 6.4.4, the value ffff 16 is read out. when reading the timer bi register after setting a value to the register while counting is not in progress and before the counter starts counting, the set value can be read out correctly. fig. 6.4.4 reading timer bi register 21 0 n n ?1 counter value (hex.) 21 0 ffff n ?1 read value (hex.) aa reload time n = reload register? contents
timer b 7702/7703 group users manual 6C19 6.5 pulse period/pulse width measurement mode 6.5 pulse period/pulse width measurement mode in these mode, the timer measures an external signals pulse period or pulse width. (refer to table 6.5.1.) figure 6.5.1 shows the structures of the timer bi mode register and timer bi register in the pulse period/ pulse width measurement mode. l pulse period measurement the timer measures the pulse period of the external signal that is input to the tbi in pin. l pulse width measurement the timer measures the pulse width (l level and h level widths) of the external signal that is input to the tbi in pin. table 6.5.1 specifications of pulse period/pulse width measurement mode item count source count operation count start condition count stop condition interrupt request occurrence timing tbi in pin function read from timer bi register write to timer bi register specifications f 2 , f 16 , f 64 , or f 512 l up-count l counter value is transferred to reload register at valid edge of mea- surement pulse, and counting continues after clearing the counter value to 0000 16 . when count start bit is set to 1 when count start bit is cleared to 0 l when valid edge of measurement pulse is input ( note 1 ). l when counter overflows (overflow flag ] is set to 1 simultaneously). measurement pulse input the value got by reading timer bi register is the reload registers contents, measurement result ( note 2 ). impossible. overflow flag ] : the bit used to identify the source of an interrupt request occurrence. notes 1: this interrupt request does not occur when the first valid edge is input after the timer starts counting. 2: the value read out from the timer bi register is undefined until the second valid edge is input after the timer starts counting.
timer b 6C20 7702/7703 group users manual 6.5 pulse period/pulse width measurement mode b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) functions bit at reset rw 15 to 0 the measurement result of pulse period or pulse width is read out. undefined ro measurement mode select bits 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 1 0 : pulse period/pulse width measurement mode 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b3 b2 nothing is assigned. 0 1 0 0 : pulse period measurement (interval between falling edges of measurement pulse) 0 1 : pulse period measurement (interval between rising edges of measurement pulse) 1 0 : pulse width measurement (interval from falling edge to rising edge, and from rising edge to falling edge of measurement pulse) 1 1 : not selected bit at reset undefined 0 rw 4 0 2 3 6 rw rw rw rw C rw rw 5 0 0 0 timer bi overflow flag (note) 0 : no overflow 1 : overflow undefined ro 0 0 note: the timer bi overflow flag is cleared to 0 by writing to the timer bi mode register with the count start bit = 1. fig. 6.5.1 structures of timer bi mode register and timer bi register in pulse period/pulse width measurement mode
timer b 7702/7703 group users manual 6C21 6.5 pulse period/pulse width measurement mode 6.5.1 setting for pulse period/pulse width measurement mode figure 6.5.2 shows an initial setting example for registers relevant to the pulse period/pulse width measurement mode. note that when using interrupts, set up to enable the interrupts. for details, refer to chapter 4. interrupts.
timer b 6C22 7702/7703 group users manual 6.5 pulse period/pulse width measurement mode fig. 6.5.2 initial setting example for registers relevant to pulse period/pulse width measurement mode aaa aaa aaa count starts b7 b0 measurement mode select bits 10 selecting pulse period/pulse width measurement mode and each function timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) setting count start bit to ? b7 b0 count start register (address 40 16 ) timer b0 count start bit timer b1 count start bit timer b2 count start bit b3 b2 count source select bits b7 b6 timer bi overflow flag (note) 0: no overflow 1: overflow setting port p6 direction register b7 b0 port p6 direction register (address 10 16 ) clear the corresponding bit to ?. tb0 in pin tb1 in pin tb2 in pin 0 0 : pulse period measurement (interval between falling edges of measured pulse) 0 1 : pulse period measurement (interval between rising edges of measured pulse) 1 0 : pulse width measurement 1 1 : not selected. 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 note: the timer bi overflow flag is a read-only bit. this bit is undefined after reset. this bit is cleared to "0" by writing to the timer bi mode register with the count start bit = ?.? setting interrupt priority level b7 b0 timer bi interrupt control register (i = 0 to 2) (addresses 7a 16 to 7c 16 ) interrupt priority level select bits when using interrupts, set these bits to level 1?. when disabling interrupts, set these bits to level 0. selection of pulse period/pulse width measurement mode
timer b 7702/7703 group users manual 6C23 6.5 pulse period/pulse width measurement mode 6.5.2 count source in the pulse period/pulse width measurement mode, the count source select bits (bits 6 and 7 at addresses 5b 16 to 5d 16 ) select the count source. table 6.5.2 lists the count source frequency. table 6.5.2 count source frequency count source select bits b7 b6 00 01 10 11 count source frequency f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz 4 mhz 8 mhz 12.5 mhz 500 khz 1 mhz 1.5625 mhz 125 khz 250 khz 390.625 khz 15625 hz 31250 hz 48.8281 khz count source f 2 f 16 f 64 f 512
timer b 6C24 7702/7703 group users manual 6.5 pulse period/pulse width measurement mode 6.5.3 operation in pulse period/pulse width measurement mode when the count start bit is set to 1, the counter starts counting of the count source. the counter value is transferred to the reload register when an valid edge of the measurement pulse is detected. (refer to section (1) pulse period/pulse width measurement. ) a the counter value is cleared to 0000 16 after the transfer in , and the counter continues counting. ? the timer bi interrupt request bit is set to 1 when the counter value is cleared to 0000 16 in a ( note ). the interrupt request bit remains set to 1 until the interrupt request is accepted or the interrupt request bit is cleared to 0 by software. ? the timer repeats operations to ? above. note: the timer bi interrupt request does not occur when the first valid edge is input after the timer starts counting. (1) pulse period/pulse width measurement the measurement mode select bits (bits 2 and 3 at addresses 5b 16 to 5d 16 ) specify whether the pulse period of an external signal is measured or its pulse width is done. table 6.5.3 lists the relationship between the measurement mode select bits and the pulse period/pulse width measurements. make sure that the measurement pulse interval from the falling to the rising, and from the rising to the falling are two cycles of the count source or more. additionally, use software to identify whether the measurement result indicates the h level or the l level width. table 6.5.3 relationship between measurement mode select bits and pulse period/pulse width measurements b3 0 0 1 1 pulse period/pulse width measurement pulse period measurement pulse width measurement not selected measurement interval (valid edges) from falling to falling (falling) from rising to rising (rising) from falling to rising, and from rising to falling (falling and rising) b2 0 1 0 1
timer b 7702/7703 group users manual 6C25 6.5 pulse period/pulse width measurement mode (2) timer bi overflow flag the timer bi interrupt request occurs when the measurement p ulses valid edge is input or the counter overflows. the timer bi overflow flag is used to ide ntify the cause of the interrupt request, that is, whether it is an overflow occurrence or an effectiv e edge input. the timer bi overflow flag is set to 1 by an overflow. acc ordingly, the cause of the interrupt request occurrence is identified by checking the timer bi overflow f lag in the interrupt routine. when a value is written to the timer bi mode register with the count star t bit = 1, the timer bi overflow flag is cleared to 0 at the next count timing of the count source the timer bi overflow flag is a read-only bit. use the timer bi interrupt request bit to detect the overflo w timing. do not use the timer bi overflow flag to do that. figure 6.5.3 shows the operation during pulse period measure ment. figure 6.5.4 shows the operation during pulse width measurement. fig. 6.5.3 operation during pulse period measurement count source measurement pulse timing at which counter is cleared to 0000 16 1 h 1 note: the above applies when measurement is performed for an inte rval from one falling to the next falling of the measurement pulse. reload register counter transfer timing l 0 0 count start bit 1 0 ? counter is initialized by completion of measurement. ? counter overflow. ? ? ? cleared to 0 when interrupt request is accepted or cleared by software. timer bi interrupt request bit timer bi overflow flag transferred (undefined value) transferred (measured value)
timer b 6C26 7702/7703 group users manual 6.5 pulse period/pulse width measurement mode fig. 6.5.4 operation during pulse width measurement measurement pulse h count source reload register counter transfer timing timing at which counter is cleared to 0000 16 1 1 transferred (measured value) l 0 0 1 0 cleared to 0 when interrupt request is accepted or cleared by software. counter is initialized by completion of measurement. counter overflow. count start bit timer bi interrupt request bit timer bi overflow flag transferred (measured value) transferred (measured value) transferred (undefined value)
timer b 7702/7703 group users manual 6C27 6.5 pulse period/pulse width measurement mode [precautions when operating in pulse period/pulse width measurement mode] 1. the timer bi interrupt request occurs by the following two causes: l input of measured pulses valid edge l counter overflow when the overflow is the cause of the interrupt request occurrence, the timer bi overflow flag is set to 1. 2. after reset, the timer bi overflow flag is undefined. when writing to the timer bi mode register with the count start bit = 1, this flag can be cleared to 0 at the next count timing of the count source. 3. an undefined value is transferred to the reload register when the first valid edge is input after the counter starts counting. in this case, the timer bi interrupt request does not occur. 4. the counter value at start of counting is undefined. accordingly, the timer bi interrupt request may occur by the overflow immediately after the counter starts counting. 5. if the contents of the measurement mode select bits are changed after the counter starts counting, the timer bi interrupt request bit is set to 1. when writing the same value which has been set yet to the measurement mode select bits, the timer bi interrupt request bit is not changed, that is, the bit retains the state. 6. if the input signal to the tbi in pin is affected by noise, etc., the counter may not perform the exact measurement. we recommend to verify, by software, that the measurement values are within a constant range.
timer b 6C28 7702/7703 group users manual 6.5 pulse period/pulse width measurement mode memorandum
chapter 7 serial i/o 7.1 overview 7.2 block description 7.3 clock synchronous serial i/o mode 7.4 clock asynchronous serial i/o (uart) mode
serial i/o 7702/7703 group users manual 7C2 this chapter describes the serial i/o. the serial i/o consists of 2 channels: uart0 and uart1. they each have a transfer clock generating timer for the exclusive use of them and can operate independently. uart0 and uart1 have the same functions. 7703 group uart1s function of the 7703 group varies from the 7702 groups. refer to chapter 20. 7703 group. 7.1 overview uarti (i = 0 and 1) has the following 2 operating modes: l clock synchronous serial i/o mode transmitter and receiver use the same clock as the transfer clock. transfer data has the length of 8 bits. l clock asynchronous serial i/o (uart) mode transfer rate and transfer data format can arbitrarily be set. the user can select a 7-bit, 8-bit, or 9-bit length as the transfer data length. figure 7.1.1 shows the transfer data formats in each operating mode. 7.1 overview l clock synchronous serial i/o mode transfer data length of 8 bits l uart mode transfer data length of 7 bits transfer data length of 8 bits transfer data length of 9 bits fig. 7.1.1 transfer data formats in each operating mode
serial i/o 7702/7703 group users manual 7C3 7.2 block description figure 7.2.1 shows the block diagram of serial i/o. registers relevant to serial i/o are described below. fig. 7.2.1 block diagram of serial i/o 7.2 block description rxd i data bus (odd) data bus (even) 0000000 uarti receive register uarti receive buffer register uarti transmit buffer register receive control circuit transmit control circuit 1 / (n+1) 1/16 1/16 1/2 brgi clock synchronous (internal clock selected) uart clock synchronous uart clock synchronous (internal clock selected) clock synchronous (external clock selected) data bus (odd) data bus (even) txd i transfer clock transfer clock clk i brg count source select bits cts i / rts i uarti transmit register n: values set in uarti baud rate register (brgi) clock synchronous d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 f 2 f 16 f 64 f 512 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0
serial i/o 7702/7703 group users manual 7C4 7.2.1 uarti transmit/receive mode register figure 7.2.2 shows the structure of uarti transmit/receive mode register. the serial i/o mode select bits is used to select uartis operating mode. bits 4 to 6 are described in the section 7.4.2 transfer data format , and bit 7 is done in the section 7.4.8 sleep mode. 7.2 block description fig. 7.2.2 structure of uarti transmit/receive mode register b7 b6 b5 b4 b3 b2 b1 b0 bit 4 2 1 0 bit name at reset 0 rw functions b2 b1 b0 3 7 6 5 rw rw rw rw rw rw rw rw 0 0 0 0 serial i/o mode select bits 0 0 0: serial i/o disabled (p8 functions as a programmable i/o port.) 0 0 1: clock synchronous serial i/o mode 0 1 0: not selected 0 1 1: not selected 1 0 0: uart mode (transfer data length = 7 bits) 1 0 1: uart mode (transfer data length = 8 bits) 1 1 0: uart mode (transfer data length = 9 bits) 1 1 1: not selected sleep select bit (valid in uart mode) ( note ) parity enable bit (valid in uart mode) ( note ) odd/even parity select bit (valid in uart mode when parity enable bit is 1) ( note ) stop bit length select bit (valid in uart mode) ( note ) internal/external clock select bit uart0 transmit/receive mode register (address 30 16 ) uart1 transmit/receive mode register (address 38 16 ) note: bits 4 to 6 are ignored in the clock synchronous serial i/o mode. (they may be either 0 or 1.) additionally, fix bit 7 to 0. 0 : odd parity 1 : even parity 0 : parity disabled 1 : parity enabled 0 : sleep mode cleared (ignored) 1 : sleep mode selected 0 : internal clock 1 : external clock 0 : one stop bit 1 : two stop bits 0 0 0
serial i/o 7702/7703 group users manual 7C5 (1) internal/external clock select bit (bit 3) [clock synchronous serial i/o mode] by clearing this bit to 0 in order to select an internal clock, the clock which is selected with the brg count source select bits (bits 0 and 1 at addresses 34 16 , 3c 16 ) becomes the count source of brgi (described later). the brgi output of which frequency is divided by 2 becomes the transfer clock. additionally, the transfer clock is output from the clk i pin. by setting this bit to 1 in order to select an external clock, the clock input to the clk i pin becomes the transfer clock. [uart mode] by clearing this bit to 0 in order to select an internal clock, the clock which is selected with the brg count source select bits (bits 0 and 1 at addresses 34 16 , 3c 16 ) becomes the count source of the brgi (described later). then, the clk i pin functions as a programmable i/o port. by setting this bit to 1 in order to select an external clock, the clock input to the clk i pin becomes the count source of brgi. always in the uart mode, the brgi output of which frequency is divided by 16 is the transfer clock. brgi: uarti baud rate register (refer to section 7.2.6 uarti baud rate register (brgi) .) 7.2 block description
serial i/o 7702/7703 group users manual 7C6 7.2 block description 7.2.2 uarti transmit/receive control register 0 figure 7.2.3 shows the structure of uarti transmit/receive control register 0. for bits 0 and 1, refer to 7.2.1 (1) internal/external clock select bit. cts/rts select bit bit 1 brg count source select bits bit name at reset rw functions b7 b6 b5 b4 b3 b2 b1 b0 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b1 b0 0 : cts function selected. 1 : rts function selected. transmit register empty flag 0 : data present in transmit register. (during transmitting) 1 : no data present in transmit register. (transmitting completed) 1 0 0 0 7 to 4 0 2 rw rw ro 3 rw nothing is assigned. undefined C fig. 7.2.3 structure of uarti transmit/receive control register 0 (1) ____ ____ cts/rts select bit (bit 2) ____ ____ by clearing this bit to 0 in order to select the cts function, pins p8 0 and p8 4 function as cts input pins, and the input signal of l level to these pins becomes one of the transmission conditions. ____ ____ by setting this bit to 1 in order to select the rts function, pins p8 0 and p8 4 become rts output ____ pins. when the receive enable bit (bit 2 at addresses 35 16 , 3d 16 ) is 0 (reception disabled), the rts output pin outputs h level. the output level of this pin becomes l when the receive enable bit is set to 1. it becomes h when reception starts and it becomes l when reception is completed. (2) transmit register empty flag (bit 3) this flag is cleared to 0 when the uarti transmit buffer registers contents are transferred to the uarti transmit register. when transmission is completed and the uarti transmit register becomes empty, this flag is set to 1.
serial i/o 7702/7703 group users manual 7C7 7.2 block description 7.2.3 uarti transmit/receive control register 1 figure 7.2.4 shows the structure of uarti transmit/receive control register 1. for bits 4 to 7, refer to each operation modes description. fig. 7.2.4 structure of uarti transmit/receive control register 1 bit bit name at reset 5 framing error flag (valid in uart mode) 0 0 : no framing error 1 : framing error detected rw functions b7 b6 b5 b4 b3 b2 b1 b0 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) notes 1: bits 7 to 4 are cleared to 0 when clearing the receive enable bit to 0 or when reading the low-order byte of the uarti receive buffer register (addresses 36 16 , 3e 16 ) out . 2: bits 5 to 7 are ignored in the clock synchronous serial i/o mode. 0 transmit enable bit 0 0 : transmission disabled 1 : transmission enabled 1 transmit buffer empty flag 1 0 : data present in transmit buffer register. 1 : no data present in transmit buffer register. 2 receive enable bit 0 0 : reception disabled 1 : reception enabled 3 receive complete flag 0 0 : no data present in receive buffer register. 1 : data present in receive buffer register. 4 overrun error flag 0 0 : no overrun error 1 : overrun error detected 6 parity error flag (valid in uart mode) 0 0 : no parity error 1 : parity error detected 7 error sum flag (valid in uart mode) 0 0 : no error 1 : error detected (notes 1, 2) (notes 1, 2) (notes 1, 2) (note 1) rw ro rw ro ro ro ro ro
serial i/o 7702/7703 group users manual 7C8 (1) transmit enable bit (bit 0) by setting this bit to 1, uarti enters the transmission enable state. by clearing this bit to 0 during transmission, uarti enters the transmission disable state after the transmission which is performed at that time is completed. (2) transmit buffer empty flag (bit 1) this flag is set to 1 when data set in the uarti transmit buffer register is transferred from the uarti transmit buffer register to the uarti transmit register. this flag is cleared to 0 when data is set in the uarti transmit buffer register. (3) receive enable bit (bit 2) by setting this bit to 1, uarti enters the reception enable state. by clearing this bit to 0 during reception, uarti quits the reception then and enters the reception disable state. (4) receive complete flag (bit 3) this flag is set to 1 when data is ready in the uarti receive register and that is transferred to the uarti receive buffer register (i.e., when reception is completed). this flag is cleared to 0 when the low-order byte of the uarti receive buffer register is read out or when the receive enable bit (bit 2) is cleared to 0. 7.2 block description
serial i/o 7702/7703 group users manual 7C9 7.2.4 uarti transmit register and uarti transmit buffer register figure 7.2.5 shows the block diagram of transmit section; figure 7.2.6 shows the structure of uarti transmit buffer register. 7.2 block description fig. 7.2.6 structure of uarti transmit buffer register fig. 7.2.5 block diagram of transmit section sp sp par ? 2sp 1sp uart 7-bit uart 8-bit uart 7-bit uart 9-bit uart clock sync. clock sync. clock sync. data bus (even) data bus (odd) txd i uarti transmit register parity enabled parity disabled d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 sp : stop bit par : parity bit uarti transmit buffer register 8-bit uart 9-bit uart b7 b0 bit 8 to 0 at reset undefined rw functions wo b7 b0 (b15) (b8) 15 to 9 undefined uart0 transmit buffer register (addresses 33 16 , 32 16 ) uart1 transmit buffer register (addresses 3b 16 , 3a 16 ) nothing is assigned. transmit data is set.
serial i/o 7702/7703 group users manual 7C10 the uarti transmit buffer register is used to set transmit data. set the transmit data into the low-order byte of this register when operating in the clock synchronous serial i/o mode or when a 7-bit or 8-bit length of transfer data is selected in the uart mode. when a 9-bit length of transfer data is selected in the uart mode, set the transmit data into the uarti transmit buffer register as follows: ?bit 8 of the transmit data into bit 0 of high-order byte of this register. ?bits 7 to 0 of the transmit data into the low-order byte of this register. the transmit data which is set in the uarti transmit buffer register is transferred to the uarti transmit register when the transmission conditions are satisfied, and then it is output from the txd i pin synchronously with the transfer clock. the uarti transmit buffer register becomes empty when the data which is set in the uarti transmit buffer register is transferred to the uarti transmit register. accordingly, the user can set next transmit data. when quitting the transmission which is in progress and setting the uarti transmit buffer register again, follow the procedure described bellow: clear the serial i/o mode select bits (bits 2 to 0 at addresses 30 16 , 38 16 ) to 000 2 (serial i/o disabled). set the serial i/o mode select bits again. a set the transmit enable bit (bit 0 at addresses 35 16 , 3d 16 ) to 1 (transmission enabled) and set transmit data in the uarti transmit buffer register. 7.2 block description
serial i/o 7702/7703 group users manual 7C11 7.2.5 uarti receive register and uarti receive buffer register figure 7.2.7 shows the block diagram of receive section; figure 7.2.8 shows the structure of uarti receive buffer register. 7.2 block description fig. 7.2.8 structure of uarti receive buffer register fig. 7.2.7 block diagram of receive section clock sync. sp sp par 2sp 1sp uart 0 0 0 0 0 0 0 rxd i d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 sp : stop bit par : parity bit 8-bit uart 9-bit uart 7-bit uart 9-bit uart clock sync. clock sync. 7-bit uart 8-bit uart data bus (even) data bus (odd) uarti receive register parity enabled parity disabled uarti receive buffer register b7 b0 bit 8 to 0 at reset undefined rw functions ro b7 b0 (b15) (b8) 15 to 9 uart0 receive buffer register (addresses 37 16 , 36 16 ) uart1 receive buffer register (addresses 3f 16 , 3e 16 ) nothing is assigned. the value is ??at reading. receive data is read out from here. 0
serial i/o 7702/7703 group users manual 7C12 the uarti receive register is used to convert serial data which is input to the rxd i pin into parallel data. this register takes in the input signal to the rxd i pin synchronously with the transfer clock, one bit at a time. the uarti receive buffer register is used to read out receive data. when reception is completed, receive data which is taken in the uarti receive register is automatically transferred to the uarti receive buffer register. the contents of uarti receive buffer register is updated when the next data is ready before reading out the data which has been transferred to the uarti receive buffer register (i.e., an overrun error occurs). the uarti receive buffer register is initialized by setting the receive enable bit (bit 2 at addresses 35 16 , 3d 16 ) to 1 after clearing it to 0. figure 7.2.9 shows the contents of uarti receive buffer register when reception is completed. 7.2 block description fig. 7.2.9 contents of uarti receive buffer register when reception is completed b7 b0 b7 b0 0 000000 0 000000 0 000000 receive data (9 bits) receive data (8 bits) receive data (7 bits) in uart mode (transfer data length : 9 bits) in clock synchronous serial i/o mode in uart mode (transfer data length : 8 bits) in uart mode (transfer data length : 7 bits) same value as bit 7 in low-order byte same value as bit 6 in low-order byte high-order byte (addresses 37 16 , 3f 16 ) low-order byte (addresses 36 16 , 3e 16 )
serial i/o 7702/7703 group users manual 7C13 7.2.6 uarti baud rate register (brgi) the uarti baud rate register (brgi) is an 8-bit timer exclusively used for uarti to generate a transfer clock. it has a reload register. assuming that a value set in the brgi is n (n = 00 16 to ff 16 ), the brgi divides the count source frequency by n + 1. in the clock synchronous serial i/o mode, the brgi is valid when an internal clock is selected, and a clock of which frequency is the brgi outputs frequency divided by 2 becomes the transfer clock. in the uart mode, the brgi is always valid, and a clock of which frequency is the brgi outputs frequency divided by 16 becomes the transfer clock. the data which is written to the addresses 31 16 and 39 16 is written to both the timer register and the reload register whether transmission/reception is stopped or in progress. accordingly, writing to their addresses, perform it while that is stopped. figure 7.2.10 shows the structure of the uarti baud rate register (brgi); figure 7.2.11 shows the block diagram of transfer clock generating section. 7.2 block description fig. 7.2.10 structure of uarti baud rate register (brgi) b7 b0 uart0 baud rate register (address 31 16 ) uart1 baud rate register (address 39 16 ) functions bit at reset rw 7 to 0 can be set to 00 16 to ff 16 . assuming that the set value = n, brgi divides the count source frequency by n + 1. undefined wo brgi 1/2 transmit control circuit receive control circuit transfer clock for transmit operation transfer clock for receive operation transmit control circuit receive control circuit transfer clock for transmit operation transfer clock for receive operation brgi 1/16 f i : clock selected by brg count source select bits (f 2 , f 16 , f 64 , or f 512 ) f ext : clock input to clk i pin (external clock) 1/16 f i f ext f ext f i fig. 7.2.11 block diagram of transfer clock generating section
serial i/o 7702/7703 group users manual 7C14 7.2.7 uarti transmit interrupt control and uarti receive interrupt control registers when using uarti, 2 types of interrupts, which are uarti transmit and uarti receive interrupts, can be used. each interrupt has its corresponding interrupt control register. figure 7.2.12 shows the structure of uarti transmit interrupt control and uarti receive interrupt control registers. 7.2 block description b7 b6 b5 b4 b3 b2 b1 b0 uart0 transmit interrupt control register (address 71 16 ) uart0 receive interrupt control register (address 72 16 ) uart1 transmit interrupt control register (address 73 16 ) uart1 receive interrupt control register (address 74 16 ) bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request interrupt priority level select bits 3 rw rw rw rw C undefined 0 0 0 nothing is allocated. note: use the seb or clb instruction to set each interrupt control registers. for details about interrupts, refer to chapter 4. interrupts. fig. 7.2.12 structure of uarti transmit interrupt control and uarti receive interrupt control registers
serial i/o 7702/7703 group users manual 7C15 7.2 block description (1) interrupt priority level select bits (bits 0 to 2) these bits select the priority level of the uarti transmit interrupt or uarti receive interrupt. when using uarti transmit/receive interrupt, select priority levels 1 to 7. when the uarti transmit/receive interrupt request occurs, its priority level is compared with the processor interrupt priority level (ipl), so that the requested interrupt is enabled only when its priority level is higher than the ipl. (however, this applies when the interrupt disable flag (i) = 0.) to disable the uarti transmit/receive interrupt, set these bits to 000 2 (level 0). (2) interrupt request bit (bit 3) the uarti transmit interrupt request bit is set to 1 when data is transferred from the uarti transmit buffer register to the uarti transmit register. the uarti receive interrupt request bit is set to 1 when data is transferred from the uarti receive register to the uarti receive buffer register. however, when an overrun error occurs, it does not change. each interrupt request bit is automatically cleared to 0 when its corresponding interrupt request is accepted. this bit can be set to 1 or 0 by software.
serial i/o 7702/7703 group users manual 7C16 7.2 block description 7.2.8 port p8 direction register i/o pins of uarti are shared with port p8. when using pins p8 2 and p8 6 as serial data input pins (rxd i ), set the corresponding bits of the port p8 direction register to 0 to set these pins for the input mode. when ____ ____ using pins p8 0 , p8 1 , p8 3 to p8 5 and p8 7 as i/o pins (cts i /rts i , clk i , txd i ) of uarti, these pins are forcibly set as i/o pins of uarti regardless of port p8 direction registers contents. figure 7.2.13 shows the relationship between the port p8 direction register and uartis i/o pins. fig. 7.2.13 relationship between port p8 direction register and uartis i/o pins bit corresponding pin functions 0 1 2 3 4 5 6 7 cts 0 / rts 0 pin rxd 0 pin txd 0 pin cts 1 / rts 1 pin rxd 1 pin 0 : input mode 1 : output mode when using pins p8 2 and p8 6 as serial data input pins (rxd 0 , rxd 1 ), set the corresponding bits to ?. clk 1 pin port p8 direction register (address 14 16 ) b1 b0 b2 b3 b4 b5 b6 b7 clk 0 pin txd 1 pin at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw
serial i/o 7702/7703 group users manual 7C17 7.3 clock synchronous serial i/o mode 7.3 clock synchronous serial i/o mode table 7.3.1 lists the performance overview in the clock synchronous serial i/o mode, and table 7.3.2 lists the functions of i/o pins in this mode. table 7.3.1 performance overview in clock synchronous serial i/o mode item transfer data format transfer rate transmit/receive control when selecting internal clock when selecting external clock functions transfer data has a length of 8 bits. lsb first clock which is brgi outputs divided by 2. maximum 5 mbps (f(x in ) = 25 mhz) maximum 4 mbps (f(x in ) = 16 mhz) maximum 2 mbps (f(x in ) = 8 mhz) ____ ____ cts function or rts function can be selected by software. table 7.3.2 functions of i/o pins in clock synchronous serial i/o mode functions serial data output serial data input transfer clock output transfer clock input ____ cts input ____ rts output pin name txd i (p8 3 , p8 7 ) rxd i (p8 2 , p8 6 ) clk i (p8 1 , p8 5 ) ___ ___ cts i /rts i (p8 0 , p8 4 ) method of selection fixed (dummy data is output when performing only reception.) port p8 direction register \ 1 s corresponding bit = 0 internal/external clock select bit \ 2 = 0 internal/external clock select bit = 1 ____ ____ cts/rts select bit \ 3 = 0 ____ ____ cts/rts select bit = 1 port p8 direction register \ 1 : address 14 16 internal/external clock select bit \ 2 : bit 3 at addresses 30 16 , 38 16 ____ ____ cts/rts select bit \ 3 : bit 2 at addresses 34 16 , 3c 16 notes 1: the txd i pin outputs h level until transmission starts after uartis operating mode is selected. 2: the rxd i pin can be used as a programmable i/o port when performing only transmission.
serial i/o 7702/7703 group users manual 7C18 7.3 clock synchronous serial i/o mode 7.3.1 transfer clock (synchronizing clock) data transfer is performed synchronously with the transfer clock. for the transfer clock, the user can select whether to generate the transfer clock internally or to input it from an external. the transfer clock is generated by operation of the transmit control circuit. accordingly, even when performing only reception, set the transmit enable bit to 1, and set dummy data in the uarti transmit buffer register in order to make the transmit control circuit active. (1) generating transfer clock internally the count source selected with the brg count source select bits is divided by the brgi, and its brgi output is further divided by 2. this is the transfer clock. the transfer clock is output from the clk i pin. [setting relevant registers] ?select an internal clock (bit 3 at addresses 30 16 , 38 16 = 0). ?select the brgis count source (bits 0 and 1 at addresses 34 16 , 3c 16 ) ?set divide value C 1 to the brgi (addresses 31 16 , 39 16 ). transfer clock frequency = ?enable transmission (bit 0 at addresses 35 16 , 3d 16 = 1). ?set data to the uarti transmit buffer register (addresses 32 16 , 3a 16 ) [pins state] ?a transfer clock is output from the clk i pin. ?serial data is output from the txdi pin. (dummy data is output when performing only reception.) (2) inputting transfer clock from an external a clock input from the clk i pin is the transfer clock. [setting relevant registers] ?select an external clock (bit 3 at addresses 30 16 , 38 16 = 1). ?enable transmission (bit 0 at addresses 35 16 , 3d 16 = 1). ?set data to the uarti transmit buffer register (addresses 32 16 , 3a 16 ). [pins state] ?a transfer clock is input from the clk i pin. ?serial data is output from the txd i pin. (dummy data is output when performing only reception.) n: setting value to brgi f i : frequency of brgis count source (f 2 , f 16 , f 64 , f 512 ) f i 2 (n+1)
serial i/o 7702/7703 group users manual 7C19 7.3 clock synchronous serial i/o mode 7.3.2 method of transmission figures 7.3.1 shows an initial setting example for relevant registers when transmitting. transmission is started when all of the following conditions ( to a ) are satisfied. when an external clock is selected, satisfy conditions to a with the following precondition satisfied. the clk i pins input is h level (external clock selected). note: when an internal clock is selected, above precondition is ignored. transmission is enabled (transmit enable bit = 1). transmit data is present in the uarti transmit buffer register (transmit buffer empty flag = 0) ____ ____ a cts i pins input is l level (when cts function selected). ____ note : when the cts function is not selected, this condition is ignored. when using interrupts, it is necessary to set the relevant register to enable interrupts. for details, refer to chapter 4. interrupts. figure 7.3.2 shows writing data after start of transmission, and figure 7.3.3 shows detection of transmissions completion.
serial i/o 7702/7703 group users manual 7C20 7.3 clock synchronous serial i/o mode uart0 transmit buffer register (address 32 16 ) uart1 transmit buffer register (address 3a 16 ) b7 b0 set transmit data here. 1 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 transmit enable bit 1: transmission enabled (in the case of selecting the cts function, transmission starts when the cts i pins input level is l.) uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b7 b0 brg count source select bits 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b1 b0 1 0 0 0 uart0 transmit/receive mode register (address 30 16 ) uart1 transmit/receive mode register (address 38 16 ) b7 b0 internal/external clock select bit 0: internal clock 1: external clock 5 : it may be 0 or 1. clock synchronous serial i/o mode 55 5 uart0 transmit interrupt control register (address 71 16 ) uart1 transmit interrupt control register (address 73 16 ) b7 b0 interrupt priority level select bits when using interrupts, set these bits to level 1 - 7. when disabling interrupts, set these bits to level 0. uart0 baud rate register (brg0) (address 31 16 ) uart1 baud rate register (brg1) (address 39 16 ) b7 b0 set to 00 16 to ff 16 . ] necessary only when internal clock is selected. transmission starts. cts / rts select bit 0: cts function selected. 1: rts function selected fig. 7.3.1 initial setting example for relevant registers when transmitting
serial i/o 7702/7703 group users manual 7C21 7.3 clock synchronous serial i/o mode fig. 7.3.2 writing data after start of transmission [when not using interrupts] [when using interrupts] the uarti transmit interrupt request occurs when the uarti transmit buffer register becomes empty. aaaa aaaa uarti transmit interrupt note : uart0 transmit buffer register (address 32 16 ) uart1 transmit buffer register (address 3a 16 ) b7 b0 writing of next transmit data set transmit data here. b0 uart0 transmit/receive control register 1 (address 35 ) uart1 transmit/receive control register 1 (address 3d ) b7 transmit buffer empty flag 0: data present in transmit buffer register 1: no data present in transmit buffer register (writing of next transmit data is possible.) checking state of uarti transmit buffer register 1 this figure shows the bits and registers required for processing. refer to figure 7.3.5 about the change of flag state and the occurrence timing of an interrupt request. 16 16 b0
serial i/o 7702/7703 group users manual 7C22 7.3 clock synchronous serial i/o mode fig. 7.3.3 detection of transmissions completion [when not using interrupts] [when using interrupts] aaa aaa uarti transmit interrupt uart0 transmit interrupt control register (address 71 16 ) uart1 transmit interrupt control register (address 73 16 ) b7 b0 interrupt request bit checking start of transmission uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b7 b0 checking completion of transmission. transmit register empty flag 0: during transmitting 1: transmitting completed processing at completion of transmission 0: 1: no interrupt request interrupt request (transmission has started.) the uarti transmit interrupt request occurs when the transmission starts. note : this figure shows the bits and registers required for processing. refer to figure 7.3.5 about the change of flag state and the occurrence timing of an interrupt request.
serial i/o 7702/7703 group users manual 7C23 7.3 clock synchronous serial i/o mode 7.3.3 transmit operation when the transmit conditions described in page 7-19 are satisfied, the following operations are automatically performed simultaneously. ?the uarti transmit buffer registers contents are transferred to the uarti transmit register. ?8 transfer clocks are generated (when an internal clock is selected). ?the transmit buffer empty flag is set to 1. ?the transmit register empty flag is cleared to 0. ?the uarti transmit interrupt request occurs, and the interrupt request bit is set to 1. the transmit operations are described below. data in the uarti transmit register is transmitted from the txd i pin synchronously with the falling of the transfer clock. this data is transmitted bit by bit sequentially beginning with the least significant bit. a when 1-byte data has been transmitted, the transmit register empty flag is set to 1, indicating completion of the transmission. figure 7.3.4 shows the transmit operation. in the case of an internal clock is selected, when the transmit conditions for the next data are satisfied at completion of the transmission, the transfer clock is generated continuously. accordingly, when performing transmission continuously, set the next transmit data to the uarti transmit buffer register during transmission (when the transmit register empty flag = 0). when the transmit conditions for the next data are not satisfied, the transfer clock stops at h level. figures 7.3.5 shows an example of transmit timing (when selecting an internal clock).
serial i/o 7702/7703 group users manual 7C24 7.3 clock synchronous serial i/o mode fig. 7.3.4 transmit operation transfer clock uarti transmit buffer register d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 7 d 6 d 5 d 4 d 3 d 2 d 7 d 6 d 5 d 4 d 3 transmit data msb b7 b0 d 0 d 1 d 2 d 7 lsb uarti transmit register d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 tc t clk cts i clk i t end i txd i h l 0 1 0 1 0 1 0 1 t endi : next transmit conditions are examined when this signal lev el is h. (t endi is an internal signal. accordingly, it cannot be read from an external.) tc = t clk = 2(n+1) /fi fi: brgi count source frequency (f 2 , f 16 , f 64 , f 512 ) n: value set to brgi transfer clock transmit enable bit transmit buffer empty flag transmit register empty flag uarti transmit interrupt request bit data is set in uarti transmit buffer register. uarti transmit register uarti transmit buffer register. stopped because ctsi = h. stopped because transmit enable bit = 0. cleared to 0 when interrupt request is accepted or cleared by software. the above timing diagram applies to the following conditions: l internal clock selected l cts function selected. fig. 7.3.5 example of transmit timing (when selecting intern al clock)
serial i/o 7702/7703 group users manual 7C25 7.3 clock synchronous serial i/o mode 7.3.4 method of reception figures 7.3.6 and 7.3.7 show initial setting examples for relevant registers when receiving. reception is started when all of the following conditions ( to a ) are satisfied. when an external clock is selected, satisfy conditions to a with the following precondition satisfied. the clki pins input is h level. note: when an internal clock is selected, above precondition is ignored. reception is enabled (receive enable bit = 1). transmission is enabled (transmit enable bit = 1). a dummy data is present in the uarti transmit buffer register (transmit buffer empty flag = 0) when using interrupts, it is necessary to set the relevant register to enable interrupts. for details, refer to chapter 4. interrupts. figure 7.3.8 shows processing after receptions completion.
serial i/o 7702/7703 group users manual 7C26 7.3 clock synchronous serial i/o mode ] necessary only when an internal clock is selected. uart0 baud rate register (brg0) (address 31 16 ) uart1 baud rate register (brg1) (address 39 16 ) b7 b0 set to 00 16 to ff 16 . 1 0 0 0 uart0 transmit/receive mode register (address 30 ) uart1 transmit/receive mode register (address 38 ) b7 b0 internal/external clock select bit 0: internal clock 1: external clock 5 : it may be ??or ?. clock synchronous serial i/o mode continued to figure 7.3.7 on next page. uart0 transmit/receive control register 0 (address 34 ) uart1 transmit/receive control register 0 (address 3c ) b7 b0 cts / rts select bit 0: cts function selected 1: rts function selected 16 16 16 16 555 brg count source select bits 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b1 b0 fig. 7.3.6 initial setting example for relevant registers when receiving (1)
serial i/o 7702/7703 group users manual 7C27 7.3 clock synchronous serial i/o mode fig. 7.3.7 initial setting example for relevant registers wh en receiving (2) port p8 direction register (address 14 16 ) b7 b0 0 r x d 0 pin 0 r x d 1 pin from preceding figure 7.3.6 uart0 receive interrupt control register (address 72 16 ) uart1 receive interrupt control register (address 74 16 ) b7 b0 interrupt priority level select bits when using interrupts, set these bits to level 1C7. when disabling interrupts, set these bits to level 0. uart0 transmit buffer register (address 32 16 ) uart1 transmit buffer register (address 3a 16 ) b7 b0 set dummy data here. uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 transmit enable bit 1 : transmission enabled 1 1 receive enable bit 1 : reception enabled reception starts. note: when selecting the internal clock, set this register with either of the following setting. ?set the receive enable bit and the transmit enable bit to 1 simultaneously. ?set the receive enable bit to 1 and next the transmit enable bit to 1.
serial i/o 7702/7703 group users manual 7C28 7.3 clock synchronous serial i/o mode [when not using interrupts] [when using interrupts] the uarti receive interrupt request occurs when reception is completed. aaa aaa aaa uarti receive interrupt processing after reading out receive data uart0 receive buffer register (address 36 16 ) uart1 receive buffer register (address 3e 16 ) b7 b0 reading of receive data read out receive data. uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 receive complete flag 0: reception not completed 1: reception completed checking completion of reception 1 1 note : this figure shows the bits and registers required for processing. refer to figure 7.3.11 about the change of flag state and the occurrence timing of an interrupt request. b7 b0 checking error 1 1 overrun error flag 0: no overrun error 1: overrun error detected uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) fig. 7.3.8 processing after receptions completion
serial i/o 7702/7703 group users manual 7C29 7.3.5 receive operation when the receive conditions listed on page 7-25 are satisfie d, the uarti enters the receive enable state. the receive operations are described below. the input signal of the rxd i pin is taken into the most significant bit of the uarti rec eive register synchronously with the rising of the clock. the contents of the uarti receive register are shifted by 1 bit to the right. a steps and are repeated at each rising of the transfer clock. ? when 1-byte data is prepared in the uarti receive register, the contents of this register are transferred to the uarti receive buffer register. ? simultaneously with step ? , the receive complete flag is set to 1, and the uarti rec eive interrupt request occurs and its interrupt request bit is set to 1. the receive complete flag is cleared to 0 when the low-ord er byte of the uarti receive buffer register is read out. figure 7.3.10 shows the receive operation, and figure 7.3.11 shows an example of receive timing (when selecting an external clock). 7.3 clock synchronous serial i/o mode
serial i/o 7702/7703 group users manual 7C30 7.3 clock synchronous serial i/o mode fig. 7.3.9 connection example fig. 7.3.10 receive operation txd i rxd i clk i txd i rxd i clk i transmitter side receiver side uarti receive register d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 0 d 0 d 1 d 0 receive data msb b7 b0 lsb d 2 d 1 d 0 transfer clock uarti receive buffer register ? ? ? ? ? ?
serial i/o 7702/7703 group users manual 7C31 7.3 clock synchronous serial i/o mode d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 d 0 d 1 d 2 d 3 d 4 d 5 1/f ext rts i clk i rxd i ? ? ? ? ? ? ? ? ? ? ? ? : when the clki pin? input level is ?,?safisfy the following cinditions: l transmit enable bit ? ? l receive enable bit ? ? l writing of dummy data to uarti transmit buffer register receive enable bit transmit enable bit transmit buffer empty flag dummy data is set to uarti transmit buffer register. uarti transmit register ? uarti transmit buffer register received data taken in uarti receive register ? uarti receive buffer register uarti receive buffer register is read out. receive complete flag uarti receive interrupt request bit the above timing diagram applies to the following setting conditions: cleared to ??when interrupt request is accepted or cleared by software. l external clock selected. l rts function selected. f ext : frequency of external clock fig. 7.3.11 example of receive timing (when selecting external clock)
serial i/o 7702/7703 group users manual 7C32 7.3.6 process on detecting overrun error in the clock synchronous serial i/o mode, an overrun error can be detected. (however it is impossible to detect an overrun error as the case may be. refer to 6 in [ precautions when operating in clock synchronous serial i/o mode]. an overrun error occurs when the next data is prepared in the uarti receive register with the receive complete flag = 1 (data is present in the uarti receive buffer register) and that is transferred to the receive buffer register, in other words, when the next data is prepared before reading out the contents of the uarti receive buffer register. when an overrun error occurs, the next receive data is written into the uarti receive buffer register, and the uarti receive interrupt request bit is not changed. an overrun error is detected when data is transferred from the uarti receive register to the uarti receive buffer register and the overrun error flag is set to 1. the overrun error flag is cleared to 0 by reading out the low-order byte of the uarti receive buffer register or clearing the receive enable bit to 0. when an overrun error occurs during reception, initialize the overrun error flag and the uarti receive buffer register before performing reception again. when it is necessary to perform retransmission owing to an overrun error which occurs in the receiver side, set the uarti transmit buffer register again before starting transmission again. the method of initializing the uarti receive buffer register and that of setting the uarti transmit buffer register again are described below. (1) method of initializing uarti receive buffer register clear the receive enable bit to 0 (reception disabled). set the receive enable bit to 1 again (reception enabled). (2) method of setting uarti transmit buffer register again clear the serial i/o mode select bits to 000 2 (serial i/o ignored). set the serial i/o mode select bits to 001 2 again. a set the transmit enable bit to 1 (transmission enabled), and set the transmit data to the uarti transmit buffer register. 7.3 clock synchronous serial i/o mode
serial i/o 7702/7703 group users manual 7C33 [precautions when operating in clock synchronous serial i/o mode] 1. the transfer clock is generated by operation of the transmit control circuit. accordingly, even when performing only reception, transmit operation (setting for transmission) must be performed. in this case, dummy data is output from the txd i pin. 2. when an internal clock is selected during reception, the transfer clock is generated by setting the transmit enable bit to 1 (transmission enabled) and setting dummy data to the uarti transmission buffer register. when an external clock is selected , the transfer clock is generated by setting the transmit enable bit to 1 and inputting a clock to the clk i pin after setting dummy data to the uarti transmission buffer register. 3. when selecting an external clock, satisfy the following 3 conditions with the input to clk i pin = h level. set the transmit enable bit to 1. write transmit data to the uarti transmit buffer register. ____ ____ a input l level to the cts i pin (when selecting the cts function). set the receive enable bit to 1. set the transmit enable bit to 1. a write dummy data to the uarti transmit buffer register. 4. when receiving data, write dummy data to the low-oreder byte of the uarti transmission buffer register for each reception of 1-byte data. ____ 5. the output level of the rts i pin becomes l simultaneously at setting the receive enable bit to 1. the output level of this pin becomes h when receive starts, and it becomes l when receive is completed. the output level of this pin changes regardless of the contents of the transmit enable bit, the transmission buffer empty flag, and the receive complete flag. 7.3 clock synchronous serial i/o mode
serial i/o 7702/7703 group users manual 7C34 7.3 clock synchronous serial i/o mode 6. when receiving data continuously, an overrun error cannot be detected in the following situation: when the next data reception is completed between reading the error flag by software and reading the uarti receive buffer register. fig. 7.3.12 case of overrun error cannot be detect (using clock synchronous seriai i/o mode) data reading data a error flag (no error ) data b reading receive complete flag overrun error flag uarti receive interruput request bit software management undefined data a error flag reading d 0 d 1 d 6 d 7 d 0 d 1 d 6 d 7 a when checking this error flag by software, the microcomputer judges errors nothing because errors do not have occurred at data a receiving. when receiving the data b, the data b is written to the uarti receive buffer register and the data a is cleard and the overrun error flag becomes ??simultaneously. the uarti receive interrupt request bit does not change. a when reading the uarti receive buffer register by software, the data b is read and the overrun error flag becomes ??simultaneously. accordingly, the overrun error cannot may be detected and it is possible that the data b is managed as the data a. transfer clock rxd uarti receive buffer register data b
7702/7703 group users manual 7C35 serial i/o 7.4 clock asynchronous serial i/o (uart) mode 7.4 clock asynchronous serial i/o (uart) mode table 7.4.1 lists the performance overview in the uart mode, and table 7.4.2 lists the functions of i/o pins in this mode. table 7.4.1 performance overview in uart mode item transfer data format transfer rate error detection start bit character bit (transfer data) parity bit stop bit when selecting internal clock when selecting external clock functions 1 bit 7 bits, 8 bits, or 9 bits 0 bit or 1 bit (odd or even can be selected.) 1 bit or 2 bits clock of brgi output divided by 16 maximum 312.5 kbps (f(x in ) = 25 mhz) maximum 250 kbps (f(x in ) = 16 mhz) maximum 125 kbps (f(x in ) = 8 mhz) 4 types (overrun, framing, parity, and summing) presence of error can be detected only by checking error sum flag. table 7.4.2 functions of i/o pins in uart mode method of selection fixed port p8 direction register \ 1 s corresponding bit = 0 internal/external clock select bit \ 2 = 1 ____ ____ cts/rts select bit \ 3 = 0 ____ ____ cts/rts select bit = 1 pin name txd i (p8 3 , p8 7 ) rxd i (p8 2 , p8 6 ) clk i (p8 1 , p8 5 ) ___ ___ cts i /rts i (p8 0 , p8 4 ) functions serial data output serial data input brgis count source input ____ cts input ____ rts output port p8 direction register \ 1 : address 14 16 internal/external clock select bit \ 2 : bit 3 at addresses 30 16 , 38 16 ____ ____ cts/rts select bit \ 3 : bit 2 at addresses 34 16 , 3c 16 notes 1 : the txd i pin outputs h level while not transmitting after selecting uartis operating mode. 2 : the rxd i pin can be used as a programmable i/o port when performing only transmission. 3 : the clk i pin can be used as a programmable i/o port when selecting internal clock. ___ ___ ___ 4: the cts i /rts i pin can be used as a input port when performing only reception and not using rts ___ function (when selecting cts function).
serial i/o 7702/7703 group users manual 7C36 7.4 clock asynchronous serial i/o (uart) mode 7.4.1 transfer rate (frequency of transfer clock) the transfer rate is determined by the brgi (addresses 31 16 , 39 16 ). when setting n into brgi (n = 00 16 to ff 16 ), brgi divides the count source frequency by n + 1. the divided clock by brgi is further divided by 16 and the resultant clock becomes the transfer clock. accordingly, the value n is expressed by the following formula. n = 1 f 16 5 b n: value set into brgi f: brgis count source frequency b: transfer rate transfer rate (bps) 75 110 134.5 150 300 600 1200 2400 4800 9600 19200 31250 62500 125000 250000 500000 an internal clock or an external clock can be selected as the brgis count source with the internal/external clock select bit (bit 3 at addresses 30 16 , 38 16 ). when an internal clock is selected, the clock selected with the brg count source select bits (bits 0 and 1 at addresses 34 16 , 3c 16 ) becomes the brgis count source. when an external clock is selected, the clock input to the clk i pin becomes the brgis count source. tables 7.4.3 and 7.4.4 are list the setting examples of transfer rate. set the same transfer rate between the transmitter and the receiver. table 7.4.3 setting examples of transfer rate (1) brgi setting value : n 12 (0c 16 ) 70 (46 16 ) 57 (39 16 ) 51 (33 16 ) 25 (19 16 ) 12 (0c 16 ) 25 (19 16 ) 12 (0c 16 ) 51 (33 16 ) 25 (19 16 ) 12 (0c 16 ) 7 (07 16 ) 3 (03 16 ) 1 (01 16 ) 0 (00 16 ) actual time (bps) 75.12 110.04 134.70 150.24 300.48 600.96 1201.92 2403.85 4807.69 9615.39 19230.77 31250.00 62500.00 125000.00 250000.00 brgi count source f 512 f 64 f 64 f 64 f 64 f 64 f 16 f 16 f 2 f 2 f 2 f 2 f 2 f 2 f 2 f 2 brgi setting value : n 25 (19 16 ) 141 (8d 16 ) 115 (73 16 ) 103 (67 16 ) 51 (33 16 ) 25 (19 16 ) 51 (33 16 ) 25 (19 16 ) 103 (67 16 ) 51 (33 16 ) 25 (19 16 ) 15 (0f 16 ) 7 (07 16 ) 3 (03 16 ) 1 (01 16 ) 0 (00 16 ) actual time (bps) 75.12 110.04 134.70 150.24 300.48 600.96 1201.92 2403.85 4807.69 9615.39 19230.77 31250.00 62500.00 125000.00 250000.00 500000.00 brgi count source f 512 f 64 f 64 f 64 f 64 f 64 f 16 f 16 f 2 f 2 f 2 f 2 f 2 f 2 f 2 f 2 f(x in ) = 8 mhz f(x in ) = 16 mhz
7702/7703 group users manual 7C37 serial i/o 7.4 clock asynchronous serial i/o (uart) mode table 7.4.4 setting examples of transfer rate (2) transfer rate (bps) 150 300 600 1200 2400 4800 9600 19200 31250 brgi setting value : n 159 (9f 16 ) 79 (4f 16 ) 159 (9f 16 ) 79 (4f 16 ) 39 (27 16 ) 159 (9f 16 ) 79 (4f 16 ) 39 (27 16 ) actual time (bps) 150.00 300.00 600.00 1200.00 2400.00 4800.00 9600.00 19200.00 brgi count source f 64 f 64 f 16 f 16 f 16 f 2 f 2 f 2 f 2 brgi setting value : n 162 (a2 16 ) 80 (50 16 ) 162 (a2 16 ) 80 (50 16 ) 40 (28 16 ) 162 (a2 16 ) 80 (50 16 ) 40 (28 16 ) 24 (18 16 ) actual time (bps) 149.78 301.41 599.12 1205.63 2381.86 4792.94 9645.06 19054.88 31250.00 brgi count source f 64 f 64 f 16 f 16 f 16 f 2 f 2 f 2 f(x in ) = 24.576 mhz f(x in ) = 25 mhz
serial i/o 7702/7703 group users manual 7C38 7.4 clock asynchronous serial i/o (uart) mode 7.4.2 transfer data format the transfer data format can be selected from formats shown in figure 7.4.1. bits 4 to 6 at addresses 30 16 and 38 16 select the transfer data format. (refer to figure 7.2.2.) set the same transfer data format for both transmitter and receiver sides. figure 7.4.2 shows an example of transfer data format. table 7.4.5 lists each bit in transmit data. transfer data length of 7 bits 1st7data 1sp 1st7data 2sp 1st7data1par1sp 1st7data1par2sp transfer data length of 8 bits 1st8data 1sp 1st8data 2sp 1st8data1par1sp 1st8data1par2sp transfer data length of 9 bits 1st9data 1sp 1st9data 2sp 1st9data1par1sp 1st9data1par2sp st : start bit data : character bit (transfer data) par : parity bit sp : stop bit fig. 7.4.1 transfer data format
7702/7703 group users manual 7C39 serial i/o 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.2 example of transfer data format table 7.4.5 each bit in transmit data name st start bit data character bit par parity bit st stop bit functions l signal equivalent to 1 character bit which is added immediately before the character bits. it indicates start of data transmission. transmit data which is set in the uarti transmit buffer register. a signal that is added immediately after the character bits in order to improve data reliability. the level of this signal changes according to selection of odd/even parity in such a way that the sum of 1s in this bit and character bits is always an odd or even number. h level signal equivalent to 1 or 2 character bits which is added immediately after the character bits (or parity bit when parity is enabled). it indicates finish of data transmission. time ?example of 1stC8dataC1parC1sp st lsb msb par sp st transmit/receive data h data (8 bits) next transmit/receive data (when continuously transferring)
serial i/o 7702/7703 group users manual 7C40 7.4 clock asynchronous serial i/o (uart) mode 7.4.3 method of transmission figure 7.4.3 shows an initial setting example for relevant registers when transmitting. the difference due to selection of transfer data length (7 bits, 8 bits, or 9 bits) is only that data length. when selecting a 7- or 8-bit data length, set the transmit data into the low-order byte of the uarti transmit buffer register. when selecting a 9-bit data length, set the transmit data into that low-order byte and bit 0 of that high-order byte. transmission is started when all of the following conditions ( to a ) are satisfied: transmit is enabled (transmit enable bit = 1). transmit data is present in the uarti transmit buffer register (transmit buffer empty flag = 0). ____ ____ a ctsi pins input is l level (when cts function selected). ____ note: when the cts function is not selected, this condition is ignored. when using interrupts, it is necessary to set the corresponding register to enable interrupts. for details, refer to chapter 4. interrupts. figure 7.4.4 shows writing data after start of transmission, and figure 7.4.5 shows detection of transmissions completion.
7702/7703 group users manual 7C41 serial i/o 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.3 initial setting example for relevant registers when transmitting uart0 baud rate register (brg0) (address 31 16 ) uart1 baud rate register (brg1) (address 39 16 ) b7 b0 set to 00 16 to ff 16 . interrupt priority level select bits when using interrupts, set these bits to level 1C7. when disabling interrupts, set these bits to level 0. uart0 transmit interrupt control register (address 71 16 ) uart1 transmit interrupt control register (address 73 16 ) b7 1 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 transmit enable bit 1: transmission enabled transmission starts. b0 uart0 transmit buffer register (addresses 33 16 , 32 16 ) uart1 transmit buffer register (addresses 3b 16 , 3a 16 ) b7 b0 set transmit data here. b15 uart0 transmit/receive mode register (address 30 16 ) uart1 transmit/receive mode register (address 38 16 ) b7 b0 internal/external clock select bit 0: internal clock 1: external clock 1 0 0: uart mode (7 bits) 1 0 1: uart mode (8 bits) 1 1 0: uart mode (9 bits) stop bit length select bit 0: 1 stop bit 1: 2 stop bits odd/even parity select bit 0: odd parity 1: even parity parity enable bit 0: parity disabled 1: parity enabled sleep select bit 0: sleep mode cleared (ignored) 1: sleep mode selected 1 b2 b1 b0 uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b7 b0 brg count source select bits cts / rts select bit 0: cts function selected 1: rts function selected (cts function disabled) 0 0: f 2 0 1: f 16 1 0: f 64 1 1: f 512 b1 b0 (in the case of selecting the cts function, transmission starts when the cts i pins input level is l.) the cts / rts select bit is valid when the cts / rts enable bit is 0 and the d-a i output enable bit (bits 6 and 7 at address 1f 16 ) is 0. note : b8
serial i/o 7702/7703 group users manual 7C42 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.4 writing data after start of transmission [when not using interrupts] [when using interrupts] the uarti transmit interrupt request occurs when the uarti transmit buffer register becomes empty. aaa aaa aaa uarti transmit interrupt note : uart0 transmit buffer register (addresses 33 16 , 32 16 ) uart1 transmit buffer register (addresses 3b 16 , 3a 16 ) b7 b0 writing of next transmit data set transmit data here. b0 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 transmit buffer empty flag 0: data present in transmit buffer register 1: no data present in transmit buffer register (writing of next transmit data is possible.) checking state of uarti transmit buffer register 1 this figure shows the bits and registers required for processing. refer to figures 7.4.6 and 7.4.7 about the change of flag state and the occurrence timing of an interrupt request. b0 b8 b15
7702/7703 group users manual 7C43 serial i/o 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.5 detection of transmissions completion [when not using interrupts] [when using interrupts] aaa aaa aaa uarti transmit interrupt uart0 transmit interrupt control register (address 71 16 ) uart1 transmit interrupt control register (address 73 16 ) b7 b0 interrupt request bit checking start of transmission uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b7 b0 checking completion of transmission. transmit register empty flag 0: during transmitting 1: transmitting completed processing at completion of transmission 0: 1: no interrupt request interrupt request (transmission has started.) the uarti transmit interrupt request occurs when the transmission starts. note : this figure shows the bits and registers required for processing. refer to figures 7.4.6 to 7.4.7 about the change of flag state and the occurrence timing of an interrupt request.
serial i/o 7702/7703 group users manual 7C44 7.4 clock asynchronous serial i/o (uart) mode 7.4.4 transmit operation simultaneously when the transmit conditions listed on page 7-40 are satisfied, the following operations are automatically performed. ?the uarti transmit buffer registers contents are transferred to the uarti transmit register. ?the transmit buffer empty flag is set to 1. ?the transmit register empty flag is cleared to 0. ?the uarti transmit interrupt request occurs and the interrupt request bit is set to 1. the transmit operations are described below. data in the uarti transmit register is transmitted from the txd i pin. this data is transmitted bit by bit sequentially in order of st ? data (lsb) ? ??? ? data (msb) ? par ? sp according to the set transfer data format. a when the stop bit has been transmitted, the transmission register empty flag is set to 1, indicating completion of transmission. when the transmit conditions for the next data are satisfied at completion of transmission, the start bit is generated following the stop bit, and the next data is transmitted. when performing transmission continuously, set the next transmit data in the uarti transmit buffer register during transmission (when the transmit register empty flag = 0). when the transmit conditions for the next data are not satisfied, the txd i pin outputs h level. figures 7.4.6 shows example of transmit timing when the transfer data length is 8 bits, and figure 7.4.7 shows an example of transmit timing when the transfer data length is 9 bits.
7702/7703 group users manual 7C45 serial i/o 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.6 example of transmit timing when transfer data length is 8 bits (when parity enabled, selecting 1 stop bit) fig. 7.4.7 example of transmit timing when transfer data length is 9 bits (when parity disabled, selecting 2 stop bits) tc d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 st p sp d 0 d 1 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 st p sp st t endi txd i cts i 0 1 0 1 l h 0 1 0 1 t endi : next transmit conditions are examined when this signal level is h. (t endi is an internal signal. accordingly, it cannot be read from an external.) tc: 16(n + 1)/fi or 16(n + 1)/f ext fi: brgi count source frequency (f 2 , f 16 , f 64 , f 512 ) f ext : brgi count source frequency (external clock) n: value set to brgi transfer clock transmit enable bit transmit buffer empty flag transmit register empty flag uarti transmit interrupt request bit data is set in uarti transmit buffer register. start bit parity bit cleared to 0 when interrupt request is accepted or cleared by software. the above timing diagram applies to the following conditions: l parity enabled l 1 stop bit l cts function selected uarti transmit register uarti transmit buffer register stopped because transmit enable bit = 0 stop bit d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 st d 8 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 7 st sp d 0 d 1 st d 8 sp sp sp 0 1 0 1 0 1 tc 0 1 t endi txd i t endi : next transmit conditions are examined when this signal level is h. (t endi is an internal signal. accordingly, it cannot be read from an external.) tc: 16(n + 1)/fi or 16(n + 1)/f ext fi: brgi count source frequency (f 2 , f 16 , f 64 , f 512 ) f ext : brgi count source frequency (external clock) n: value set to brgi transfer clock transmit enable bit transmit buffer empty flag transmit register empty flag uarti transmit interrupt request bit data is set in uarti transmit buffer register. start bit cleared to 0 when interrupt request is accepted or cleared by software. the above timing diagram applies to the following conditions: l parity disabled l 2 stop bits l cts function disabled uarti transmit register uarti transmit buffer register stopped because transmit enable bit = 0 stop bit stop bit
serial i/o 7702/7703 group users manual 7C46 7.4 clock asynchronous serial i/o (uart) mode 7.4.5 method of reception figure 7.4.8 shows an initial setting example for relevant registers when receiving. reception is started when all of the following conditions ( and ) are satisfied: reception is enabled (receive enable bit = 1). the start bit is detected. when using interrupts, it is necessary to set the corresponding register to enable interrupts. for details, refer to chapter 4. interrupts. figure 7.4.9 shows processing after receptions completion.
7702/7703 group users manual 7C47 serial i/o 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.8 initial setting example for relevant registers when receiving reception starts when the start bit is detected. port p8 direction register (address 14 16 ) b7 b0 0 0 rxd 0 pin rxd 1 pin uart0 baud rate register (brg0) (address 31 16 ) uart1 baud rate register (brg1) (address 39 16 ) b7 b0 set to 00 to ff . uart0 receive interrupt control register (address 72 16 ) uart1 receive interrupt control register (address 74 16 ) b7 b0 interrupt priority level select bits when using interrupts, set these bits to level 1C7. when disabling interrupts, set these bits to level 0. note : set the transfer data format in the same way as set on the transmitter side. 1 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 receive enable bit 1: reception enabled uart0 transmit/receive mode register (address 30 ) uart1 transmit/receive mode register (address 38 ) b7 b0 internal/external clock select bit 0: internal clock 1: external clock 1 0 0: uart mode (7 bits) 1 0 1: uart mode (8 bits) 1 1 0: uart mode (9 bits) stop bit length select bit 0: 1 stop bit 1: 2 stop bits odd/even parity select bit 0: odd parity 1: even parity parity enable bit 0: parity disabled 1: parity enabled sleep select bit 0: sleep mode cleared (ignored) 1: sleep mode selected 1 b2b1b0 uart0 transmit/receive control register 0 (address 34 ) uart1 transmit/receive control register 0 (address 3c ) b7 b0 brg count source select bits cts / rts select bit 0 : cts function selected 1 : rts function selected 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b1b0 16 16 16 16 16 16
serial i/o 7702/7703 group users manual 7C48 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.9 processing after receptions completion [when not using interrupts] [when using interrupts] the uarti receive interrupt request occurs when reception is completed. uarti receive interrupt processing after reading out receive data uart0 receive buffer register (addresses 37 16 , 36 16 ) uart1 receive buffer register (addresses 3f 16 , 3e 16 ) b15 b8 reading of receive data read out receive data. b7 b0 0 0 0 0 0 0 0 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 receive complete flag 0 : reception not completed 1 : reception completed checking completion of reception 1 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) b7 b0 checking error framing error flag parity error flag error sum flag 0 : no error 1 : error detected 1 note : this figure shows the bits and registers required for processing. refer to figure 7.4.11 about the change of flag state and the occurrence timing of an interrupt request. overrun error flag this figure shows the bits and registers required for processing. refer to figure 7.4.11 about the change of flag state and the occurrence timing of an interrupt request.
7702/7703 group users manual 7C49 serial i/o 7.4 clock asynchronous serial i/o (uart) mode 7.4.6 receive operation when the receive enable bit is set to 1, the uarti enters the reception enabled state and reception starts at detecting st. the receive operation is described below. the input signal of the rxd i pin is taken into the most significant bit of the uarti receive register synchronously with the transfer clocks rising. the contents of uarti receive register are shifted by 1 bit to the right. a steps and are repeated at each rising of the transfer clock. ? when one set of data has been prepared, in other words, the shift according to the selected data format has been completed; the uarti receive registers contents are transferred to the uarti receive buffer register. ? simultaneously with step ? , the receive complete flag is set to 1, and the uarti receive interrupt request occurs and its interrupt request bit is set to 1. the receive complete flag is cleared to 0 when the low-order byte of the uarti receive buffer register is read out. figure 7.4.11 shows an example of receive timing when the transfer data length is 8 bits. txd i rxd i txd i rxd i transmitter side receiver side fig. 7.4.10 connection example
serial i/o 7702/7703 group users manual 7C50 7.4 clock asynchronous serial i/o (uart) mode fig. 7.4.11 example of receive timing when transfer data len gth is 8 bits (when parity disabled, selecting 1 stop bit) d 0 d 1 d 7 rxd i rts i 1 0 0 1 h l 0 1 the above timinig diagram applies to the following conditions: l parity disabled l 1 stop bit l rts function selected brgi count source receive enable bit transfer clock receive complete flag uarti receive interrupt request bit start bit sampled l receive data taken in stop bit reception started at falling of start bit uarti receive register uarti receive buffer register cleared to 0 when interrupt request is accepted or cleared by software.
7702/7703 group users manual 7C51 serial i/o 7.4 clock asynchronous serial i/o (uart) mode 7.4.7 process on detecting error errors listed below can be detected in the uart mode: l overrun error an overrun error occurs when the next data is prepared in the uarti receive register with the receive completion flag = 1 (that is, data present in the uarti receive buffer register) and that data is transferred to the uarti receive buffer register. in other words, when the next data is prepared before the contents of the uarti receive buffer register is read out, an overrun error occurs. when an overrun error occurs, the next receive data is written into the uarti receive buffer register, and the uarti receive interrupt request bit is not changed. however it is impossible to detect an overrun error as the case may be. refer to 1 in [precautions when operating in clock asynchronous serial i/o mode] . l framing error a framing error occurs when the number of detected stop bits does not match the number of stop bits set. (the uarti interrupt request bit becomes 1.) l parity error a parity error occurs when the sum of 1s in the parity bit and character bits does not match the number of 1s set. (the uarti interrupt request bit becomes 1.) each error is detected when data is transferred from the uarti receive register to the uarti receive buffer register, and the corresponding error flag is set to 1. furthermore, when any of the above errors occurs, the error sum flag is set to 1. accordingly, the error sum flag informs the user whether any error has occurred or not. error flags such as the overrun error flag, the framing error flag, the parity error flag, the error sum flag are cleared to 0 by reading the contents of the uarti receive buffer register low-order byte or clearing the receive enable bit to 0. when errors occur during reception, initialize the error flags and the uarti receive buffer register, and then perform reception again. when it is necessary to perform retransmission owing to an error which occurs in the receiver side, set the uarti transmit buffer register again, and then starts transmission again. the method of initializing the uarti receive buffer register and that of setting the uarti transmit buffer register again are described below. (1) method of initializing uarti receive buffer register clear the receive enable bit to 0 (reception disabled). set the receive enable bit to 1 again (reception enabled). (2) method of setting uarti transmit buffer register again clear the serial i/o mode select bits to 000 2 (serial i/o ignored). set the serial i/o mode select bits again. a set the transmit enable bit to 1 (transmission enabled), and set the transmit data to the uarti transmit buffer register.
serial i/o 7702/7703 group users manual 7C52 7.4 clock asynchronous serial i/o (uart) mode 7.4.8 sleep mode this mode is used to transfer data between the specified microcomputers, which are connected by using uarti. the sleep mode is selected by setting the sleep select bit (bit 7 at addresses 30 16 , 38 16 ) to 1 when receiving. in the sleep mode, receive operation is performed when the msb (d 8 when the transfer data length is 9 bits, d 7 when it is 8 bits, d 6 when it is 7 bits) of the receive data is 1. receive operation is not performed when the msb is 0. (the uarti receive registers contents are not transferred to the uarti receive buffer register. additionally, the receive complete flag and error flags do not change and the uarti receive interrupt request does not occur.) the following shows an usage example of sleep mode when the transfer data length is 8 bits. set the same transfer data format for the master and slave microcomputers. select the sleep mode for the slave microcomputers. transmit data, which has 1 in bit 7 and the address of the slave microcomputer with which communicates in bits 0 to 6, from the master microcomputer to all slave microcomputers. a all slave microcomputers receive data of step . (at this time, the uarti receive interrupt request occurs.) ? in all slave microcomputers, check in the interrupt routine whether bits 0 to 6 in the receive data match their addresses. ? in the slave microcomputer of which address matches bits 0 to 6 in the receive data, clear the sleep mode. (do not clear the sleep mode for the other slave microcomputers.) by performing steps to ? , specification of the microcomputer performing transfer is realized. ? transmit data, which has 0 in bit 7, from the master microcomputer. (only the microcomputer specified in steps to ? can receive this data. the other microcomputers do not receive this data.) ? by repeating step ? , transfer can be performed between the same microcomputers continuously. when communicating with another microcomputer, perform steps to ? in order to specify the new slave microcomputer. fig. 7.4.12 sleep mode master slave b slave a slave d slave c transfer data between the master microcomputer and one slave microcomputer selected from multiple slave microcomputers.
7702/7703 group users manual 7C53 serial i/o 7.4 clock asynchronous serial i/o (uart) mode [precautions when operating in clock asynchronous serial i/o mode] when receiving data continuously, an overrun error cannot be detected in the following situation: when the next data reception is completed between reading the error flag by software and reading the uarti receive buffer register. fig. 7.4.13 case of overrun error cannot be detect (using clock asynchronous seriai i/o mode) d 1 d 6 d 7 d 0 st sp st d 1 d 7 sp d 0 data reading data a error flag (no error ) data b reading receive complete flag overrun error flag uarti receive interruput request bit software management undefined data a error flag reading a when checking this error flag by software, the microcomputer judges errors nothing because errors do not have occurred at data a receiving. when receiving the data b, the data b is written to the uarti receive buffer register and the data a is cleard and the overrun error flag becomes 1 simultaneously. the uarti receive interrupt request bit does not change. a when reading the uarti receive buffer register by software, the data b is read and the overrun error flag becomes 0 simultaneously. accordingly, the overrun error cannot may be detected and it is possible that the data b is managed as the data a. transfer clock rxd uarti receive buffer register data b l 8-bit data length, parity disabled, 1 stop bit
serial i/o 7702/7703 group users manual 7C54 7.4 clock asynchronous serial i/o (uart) mode memorandum
chapter 8 a-d converter 8.1 overview 8.2 block description 8.3 a-d conversion method 8.4 absolute accuracy and differential non-linearity error 8.5 one-shot mode 8.6 repeat mode 8.7 single sweep mode 8.8 repeat sweep mode 8.9 precautions when using a-d converter
a-d converter 7702/7703 group users manual 8C2 this chapter describes the a-d converter. the 7702 group has a built-in 8-bit a-d converter. the a-d converter performs successive approximation conversion. the 7702 group has the 8 analog input pins. 7703 group the number of the 7703 groups analog input pins is different from the 7702 groups. refer to chapter 20. 7703 group for more information. 8.1 overview the a-d converter has the performance specifications listed in table 8.1.1. table 8.1.1 performance specifications of a-d converter 8.1 overview item a-d conversion method resolution absolute accuracy analog input pin conversion rate per analog input pin performance specifications successive approximation conversion method 8 bits 3 lsb 8 pins (an 0 to an 7 ) ( note ) 57 f ad ] cycles f ad ] : a-d converters operation clock note: in the 7703 group, the analog input pins are 4 pins, an 0 to an 2 , an 7 . refer to chapter 20. 7703 group for more information. the a-d converter has the 4 operation modes listed below. ?one-shot mode this mode is used to perform the operation once for a voltage input from one selected analog input pin. ?repeat mode this mode is used to perform the operation repeatedly for a voltage input from one selected analog input pin. ?single sweep mode this mode is used to perform the operation for voltages input from multiple selected analog input pins, one at a time. ?repeat sweep mode this mode is used to perform the operation repeatedly for voltages input from multiple selected analog input pins.
a-d converter 7702/7703 group users manual 8C3 8.2 block description figure 8.2.1 shows the block diagram of the a-d converter. registers relevant to the a-d converter are described below. 8.2 block description fig. 8.2.1 block diagram of a-d converter av ss v ref v ref an 0 an 1 an 2 an 3 an 4 an 5 an 6 an 7 /ad trg v in 1/2 f 2 1/2 ad decoder resistor ladder network successive approximation register a-d register 2 a-d register 3 a-d register 4 a-d register 5 a-d register 6 a-d register 7 a-d register 0 a-d register 1 a-d control register comparator selector data bus (even) a-d sweep pin select register
a-d converter 7702/7703 group users manual 8C4 8.2.1 a-d control register figure 8.2.2 shows the structure of the a-d control register. the a-d operation mode select bit selects the operation mode of the a-d converter. the other bits are described below. 8.2 block description fig. 8.2.2 structure of a-d control register (1) analog input select bits (bits 2 to 0) these bits are used to select an analog input pin in the one-shot mode and repeat mode. pins which are not selected as analog input pins function as programmable i/o ports. these bits must be set again when the user switches the a-d operation mode to the one-shot mode or repeat mode after performing the operation in the single sweep mode or repeat sweep mode. b7 b6 b5 b4 b3 b2 b1 b0 a-d control register (address 1e 16 ) bit a-d conversion frequency ( ad ) select bit a-d conversion start bit trigger select bit 4 a-d operation mode select bits 2 1 0 bit name at reset 0 undefined rw functions 0 0 0 : an 0 selected 0 0 1 : an 1 selected 0 1 0 : an 2 selected 0 1 1 : an 3 selected 1 0 0 : an 4 selected 1 0 1 : an 5 selected 1 1 0 : an 6 selected 1 1 1 : an 7 selected (note 2) b2 b1 b0 0 : internal trigger 1 : external trigger 0 0 : one-shot mode 0 1 : repeat mode 1 0 : single sweep mode 1 1 : repeat sweep mode 0 : stop a-d conversion 1 : start a-d conversion b4 b3 notes 1: these bits are ignored in the single sweep and repeat sweep mode. (they may be either 0 or 1.) 2: when selecting an external trigger, the an 7 pin cannot be used as an analog input pin. 3: writing to each bit (except bit 6) of the a-d control register must be performed while the a-d converter halts. analog input select bits (valid in one-shot and repeat modes) (note 1) 3 7 6 5 undefined undefined rw rw rw rw rw rw rw rw 0 0 0 0 0 : f 2 divided by 4 1 : f 2 divided by 2
a-d converter 7702/7703 group users manual 8C5 (2) trigger select bit (bit 5) this bit is used to select the source of trigger occurrence. (refer to (3) a-d conversion start bit. ) (3) a-d conversion start bit (bit 6) l when internal trigger is selected setting this bit to 1 generates a trigger, causing the a-d converter to start operating. clearing this bit to 0 causes the a-d converter to stop operating. in the one-shot mode or single sweep mode, this bit is cleared to 0 after the operation is completed. in the repeat mode or repeat sweep mode, the a-d converter continues operating until this bit is cleared to 0 by software. l when external trigger is selected ______ when the ad trg pin level goes from h to l with this bit = 1, a trigger occurs, causing the a-d converter to start operating. the a-d converter stops when this bit is cleared to 0. in the one-shot mode or single sweep mode, this bit remains set to 1 even after the operation is completed. in the repeat mode or repeat sweep mode, the a-d converter continues operating until this bit is cleared to 0 by software. (4) a-d conversion frequency ( f ad ) select bit (bit 7) as shown in table 8.2.1, the operating time of the a-d converter varies depending on the selected operating clock ( f ad ) by this bit. since the a-d converters comparator consists of capacity coupling amplifiers, keep that f ad 3 250 khz during a-d conversion . 8.2 block description table 8.2.1 time for performance to one analog input pin (unit: s) 1 f 2 /2 28.5 14.25 9.12 0 f 2 /4 57.0 28.5 18.24 a-d conversion frequency ( f ad ) select bit f ad conversion time f(x in ) = 8 mhz f(x in ) = 16 mhz f(x in ) = 25 mhz
a-d converter 7702/7703 group users manual 8C6 8.2 block description 8.2.2 a-d sweep pin select register figure 8.2.3 shows the structure of the a-d sweep pin select register. fig. 8.2.3 structure of a-d control register 1 (1) a-d sweep pin select bits (bits 1 and 0) these bits are used to select analog input pins in the single sweep mode or repeat sweep mode. in the single sweep mode and repeat sweep mode, pins which are not selected as analog input pins function as programmable i/o ports. b7 b6 b5 b4 b3 b2 b1 b0 a-d sweep pin select register (address 1f 16 ) bit 1 0 bit name at reset 1 undefined rw functions notes 1: these bits are invalid in the one-shot and repeat modes. (they may be either 0 or 1.) 2: when selecting an external trigger, the an 7 pin cannot be used as an analog input pin. 3: writing to each bit of the a-d sweep pin select register must be performed while the a-d converter halts. 7 to 2 rw 0 0 : an 0 , an 1 (2 pins) 0 1 : an 0 to an 3 (4 pins) 1 0 : an 0 to an 5 (6 pins) 1 1 : an 0 to an 7 (8 pins) (note 2) a-d sweep pin select bits (valid in single sweep and repeat sweep mode ) (note 1) b1 b0 1 rw nothing is assigned. C
a-d converter 7702/7703 group users manual 8C7 8.2.3 a-d register i (i = 0 to 7) figure 8.2.4 shows the structure of the a-d register i. when the a-d conversion is completed, the conversion result (contents of the successive approximation register) is stored into this register. each a-d register i corresponds to an analog input pin (an i ). table 8.2.2 lists the correspondence of an analog input pin to a-d register i. 8.2 block description a-d register 0 (addresses 20 16 ) a-d register 1 (addresses 22 16 ) a-d register 2 (addresses 24 16 ) a-d register 3 (addresses 26 16 ) a-d register 4 (addresses 28 16 ) a-d register 5 (addresses 2a 16 ) a-d register 6 (addresses 2c 16 ) a-d register 7 (addresses 2e 16 ) bit 7 to 0 at reset undefined rw functions ro reads an a-d conversion result. b7 b6 b5 b4 b3 b2 b1 b0 fig. 8.2.4 structure of a-d register i a-d register i where conversion result is stored a-d register 0 a-d register 1 a-d register 2 a-d register 3 a-d register 4 a-d register 5 a-d register 6 a-d register 7 table 8.2.2 correspondence of analog input pin and a-d register i analog input pin an 0 pin an 1 pin an 2 pin an 3 pin an 4 pin an 5 pin an 6 pin an 7 pin
a-d converter 7702/7703 group users manual 8C8 8.2.4 a-d conversion interrupt control register figure 8.2.5 shows the structure of the a-d conversion interrupt control register. for details about interrupts, refer to chapter 4. interrupts. 8.2 block description fig. 8.2.5 structure of a-d conversion interrupt control register (1) interrupt priority level select bits (bits 2 to 0) these bits select the a-d conversion interrupts priority level. when using a-d conversion interrupts, select priority levels 1 to 7. when an a-d conversion interrupt request occurs, its priority level is compared with the processor interrupt priority level (ipl) and the requested interrupt is enabled only when its priority level is higher than the ipl. (however, this applies when the interrupt disable flag (i) = 0.) to disable the a-d conversion interrupt, set these bits to 000 2 (level 0). (2) interrupt request bit (bit 3) this bit is set to 1 when an a-d conversion interrupt request occurs. this bit is automatically cleared to 0 when the a-d conversion interrupt request is accepted. this bit can be set to 1 or cleared to 0 by software. b7 b6 b5 b4 b3 b2 b1 b0 a-d conversion interrupt control register (address 70 16 ) bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request interrupt priority level select bits 3 rw rw rw rw undefined 0 0 0 nothing is assigned. note : use the seb or clb instruction to set the a-d conversion interrupt control register.
a-d conver ter 7702/7703 group users manual 8C9 8.2.5 port p7 direction register the a-d converter and port p7 use the same pins in common. w hen using these pins as the a-d converters input pins, set the corresponding bits of the port p7 direct ion register to 0 to set these ports for the input mode. figure 8.2.6 shows the relationship between the port p 7 direction register and a-d converters input pins. 8.2 block description fig. 8.2.6 relationship between port p7 direction register a nd a-d converters input pins bit corresponding pin functions 0 1 2 3 4 5 6 7 an 0 pin 0 : input mode 1 : output mode when using these pins as a-d converters input pins, set the corresponding bits to 0. port p7 direction register (address 11 16 ) b1 b0 b2 b3 b4 b5 b6 b7 at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw an 1 pin an 2 pin an 3 pin an 4 pin an 5 pin an 6 pin an 7 /ad trg pin
7702/7703 group users manual 8C10 a-d converter 8.3 a-d conversion method the a-d converter compares the comparison voltage (v ref ), which is internally generated according to the contents of the successive approximation register, with the analog input voltage (v in ), which is input from the analog input pin (an i ). by reflecting the comparison result on the successive approximation register, v in is converted into a digital value. when a trigger is generated, the a-d converter performs the following processing: determining bit 7 of the successive approximation register the a-d converter compares v ref with v in . at this time, the contents of the successive approximation register is 10000000 2 (initial value). bit 7 of the successive approximation register changes according to the comparison result as follows: when v ref < v in , bit 7 = 1 when v ref > v in , bit 7 = 0 determining bit 6 of the successive approximation register after setting bit 6 of the successive approximation register to 1, the a-d converter compares v ref with v in . bit 6 changes according to the comparison result as follows: when v ref < v in , bit 6 = 1 when v ref > v in , bit 6 = 0 a determining bits 5 to 0 of the successive approximation register operations in are performed for bits 5 to 0. when bit 0 is determined, the contents (conversion result) of the successive approximation register is transferred to the a-d register i. the comparison voltage (v ref ) is generated according to the latest contents of the successive approximation register. table 8.3.1 lists the relationship between the successive approximation registers contents and v ref . table 8.3.2 lists changes of the successive approximation register and v ref during the a-d conversion. figure 8.3.1 shows the ideal a-d conversion characteristics. table 8.3.1 relationship between successive approximation registers contents and v ref 8.3 a-d conversion method v ref ] 256 successive approximation registers contents: n 0 1 to 255 5 (n C 0.5) v ref (v) 0 v ref ] : reference voltage
7702/7703 group users manual 8C11 a-d converter table 8.3.2 change in successive approximation register and v ref during a-d conversion 8.3 a-d conversion method 1 1 n 7 0000000 0000000 100 0000 n 7 n 6 10 00 00 n 7 n 6 n 5 n 4 n 3 n 2 n 1 1 n 7 n 6 n 5 n 4 n 3 n 2 n 1 n 0 b7 b0 1st comparison result 2nd comparison result successive approximation register c hange of v ref a-d converter halt 1st comparison 2nd comparison 3rd comparison 8th comparison conversion complete C 2 v ref 512 v ref : 2 v ref 2 v ref 4 v ref C 512 v ref 2 v ref 4 v ref 8 v ref C 512 v ref 2 v ref 4 v ref 8 v ref ...... v ref 256 C 512 v ref [v] [v] [v] [v] [v] 4 v ref ?n 7 =1 4 v ref ?n 7 =0 + C 8 v ref 8 v ref ?n 6 =1 ?n 6 =0 + C : : : : : fig. 8.3.1 ideal a-d conversion characteristics 00 16 01 16 02 16 03 16 fe 16 ff 16 analog input voltage v ref 256 5 1 v ref 256 5 2 v ref 256 5 3 5 253 v ref 256 v ref 256 5 254 v ref 256 5 255 v ref v ref 256 5 0.5 ldeal a-d conversion characteristics 0 a-d conversion result fd 16
7702/7703 group users manual 8C12 a-d converter 8.4 absolute accuracy and differential non-linearity error 8.4 absolute accuracy and differential non-linearity error the a-d converters accuracy is described below. 8.4.1 absolute accuracy the absolute accuracy is the difference expressed in the lsb between the actual a-d conversion result and the output code of an a-d converter with ideal characteristics. the analog input voltage when measuring the accuracy is assumed to be the mid point of the input voltage width that outputs the same output code from an a-d converter with ideal characteristics. for example, when v ref = 5.12 v, 1 lsb width is 20 mv, and 0 mv, 20 mv, 40 mv, 60 mv, 80 mv, ... are selected as the analog input voltages. the absolute accuracy = 3 lsb indicates that when the analog input voltage is 100 mv, the output code expected from an ideal a-d conversion characteristics is 005 16 , however the actual a-d conversion result is between 002 16 to 008 16 . the absolute accuracy includes the zero error and the full-scale error. the absolute accuracy degrades when v ref is lowered. the output code for analog input voltages v ref to av cc is ff 16 . fig. 8.4.1 absolute accuracy of a-d converter 00 16 01 16 02 16 03 16 04 16 05 16 06 16 0 20 40 60 80 100 120 140 160 180 200 220 07 16 08 16 09 16 0a 16 0b 16 +3 lsb ? lsb ideal a-d conversion characteristics analog input voltage (mv) output code (a-d conversion result)
7702/7703 group users manual 8C13 a-d converter 8.4.2 differential non-linearity error the differential non-linearity error indicates the difference between the 1 lsb step width (the ideal analog input voltage width while the same output code is expected to output) of an a-d converter with ideal characteristics and the actual measured step width (the actual analog input voltage width while the same output code is output). for example, when v ref = 5.12 v, the 1 lsb width of an a-d converter with ideal characteristics is 20 mv, however when the differential non-linearity error is 1 lsb, the actual measured 1 lsb width is 0 to 40 mv. (refer to section 16.1.3 a-d converter standard characteristics .) 8.4 absolute accuracy and differential non-linearity error fig. 8.4.2 differential non-linearity error 00 16 01 16 02 16 03 16 04 16 05 16 06 16 0 20 40 60 80 100 120 140 160 180 07 16 08 16 09 16 output code (a-d conversion result) differential non-linearity error analog input voltage (mv) 1 lsb width with ideal a-d conversion characteristics
7702/7703 group users manual 8C14 a-d converter 8.5 one-shot mode 8.5 one-shot mode in the one-shot mode, the operation for the input voltage from the one selected analog input pin is performed once, and the a-d conversion interrupt request occurs when the operation is completed. 8.5.1 settings for one-shot mode figure 8.5.1 shows an initial setting example of the one-shot mode. when using an interrupt, it is necessary to set the relevant registers to enable the interrupt. refer to chapter 4. interrupts for more descriptions.
7702/7703 group users manual 8C15 a-d converter 8.5 one-shot mode fig. 8.5.1 initial setting example of one-shot mode b7 b0 a-d control register (address 1e 16 ) 00 0 0 0 0 : an 0 selected 0 0 1 : an 1 selected 0 1 0 : an 2 selected 0 1 1 : an 3 selected 1 0 0 : an 4 selected 1 0 1 : an 5 selected 1 1 0 : an 6 selected 1 1 1 : an 7 selected b1 b0 b2 trigger select bit 0 : internal trigger 1 : external trigger a-d conversion start bit 0: stop a-d conversion analog input select bits a-d conversion frequency ( ad ) select bit 0 : f 2 divided by 4 1 : f 2 divided by 2 l a-d control register one-shot mode note : write each bit (except bit 6) of the a-d control register when the a-d conversion stops (before trigger occurs). l interrupt priority level b7 b0 a-d conversion interrupt control register (address 70 16 ) interrupt priority level select bits set to a level between 1 to 7 when using this interrupt. set to a level 0 when disabling this interrupt. l set a-d conversion start bit to 1 b7 b0 a-d control register (address 1e 16 ) 1 a-d conversion start bit selecting external trigger selecting internal trigger input falling edge to ad trg pin trigger occur operation start b7 b0 port p7 direction register (address 11 16 ) l port p7 direction register set the bits corresponding to analog input pins to 0. set bit 7 to 0 when selecting external trigger. an 1 an 2 an 3 an 5 an 6 an 7 an 4 an 0
7702/7703 group users manual 8C16 a-d converter 8.5 one-shot mode 8.5.2 one-shot mode operation description (1) when an internal trigger is selected the a-d converter starts operation when the a-d conversion start bit is set to 1. the a-d conversion is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register i. a at the same time as step , the a-d conversion interrupt request bit is set to 1. ? the a-d conversion start bit is cleared to 0 and the a-d converter stops operation. (2) when an external trigger is selected _____ the a-d converter starts operation when the input level to the ad trg pin changes from h to l while the a-d conversion start bit is 1. the a-d conversion is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register i. a at the same time as step , the a-d conversion interrupt request bit is set to 1. ? the a-d conversion stops operation. the a-d conversion start bit remains set to 1 after the operation is completed. accordingly, the _____ operation of the a-d converter can be performed again from step when the level of the ad trg pin changes from h to l. _____ when the level of the ad trg pin changes from h to l during operation, the operation at that point is cancelled and is restarted from step . figure 8.5.2 shows the conversion operation in the one-shot mode. fig. 8.5.2 conversion operation in one-shot mode trigger occur convert input voltage from an i pin conversion result a-d register i a-d conversion interrupt request occurs. a-d converter stops.
7702/7703 group users manual 8C17 a-d converter 8.6 repeat mode 8.6 repeat mode in the repeat mode, the operation for the input voltage from the one selected analog input pin is performed repeatedly. in this mode, no a-d conversion interrupt request occurs. additionally, the a-d conversion start bit (bit 6 at address 1e 16 ) remains set to 1 until it is cleared to 0 by software, and the operation is performed repeatedly while the a-d conversion start bit is 1. 8.6.1 settings for repeat mode figure 8.6.1 shows an initial setting example of repeat mode.
7702/7703 group users manual 8C18 a-d converter 8.6 repeat mode fig. 8.6.1 initial setting example of repeat mode b7 b0 port p7 direction register (address 11 16 ) l port p7 direction register set the bits corresponding to analog input pins to 0. set bit 7 to 0 when selecting external trigger. l set a-d conversion start bit to 1 b7 b0 a-d control register (address 1e 16 ) 1 a-d conversion start bit selecting external trigger selecting internal trigger trigger occur operation start note : write the each bit (except bit 6) of the a-d control regiter when the a-d conversion stops (before trigger occurs). input falling edge to ad trg pin an 0 an 1 an 2 an 3 an 4 an 5 an 6 an 7 b7 b0 a-d control register (address 1e 16 ) 01 0 0 0 0 : an 0 selected 0 0 1 : an 1 selected 0 1 0 : an 2 selected 0 1 1 : an 3 selected 1 0 0 : an 4 selected 1 0 1 : an 5 selected 1 1 0 : an 6 selected 1 1 1 : an 7 selected b1 b0 b2 a-d conversion start bit 0: stop a-d conversion analog input select bits a-d conversion frequency ( ad ) select bit l a-d control register repeat mode trigger select bit 0 : internal trigger 1 : external triggeer 0 : f 2 divided by 4 1 : f 2 divided by 2
7702/7703 group users manual 8C19 a-d converter 8.6 repeat mode 8.6.2 repeat mode operation description (1) when an internal trigger is selected the a-d converter starts operation when the a-d conversion start bit is set to 1. the first a-d conversion is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register i. a the a-d converter repeats operation until the a-d conversion start bit is cleared to 0 by software. the conversion result is transferred to the a-d register i each time the conversion is completed. (2) when an external trigger is selected ____ the a-d converter starts operation when the input level to the ad trg pin changes from h to l while the a-d conversion start bit is 1. the first a-d conversion is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register i. a the a-d converter repeats operation until the a-d conversion start bit is cleared to 0 by software. the conversion result is transferred to the a-d register i each time the conversion is completed. _____ when the level of the ad trg pin changes from h to l during operation, the operation at that point is cancelled and is restarted from step . figure 8.6.2 shows the conversion operation in the repeat mode. trigger occur convert input voltage from an i pin conversion result a-d register i fig. 8.6.2 conversion operation in repeat mode
7702/7703 group users manual 8C20 a-d converter 8.7 single sweep mode in the single sweep mode, the operation for the input voltage from multiple selected analog input pins is performed, one at a time. the a-d converter is operated in ascending sequence from the an 0 pin. the a-d conversion interrupt request occurs when the operation for all selected input pins are completed. 8.7.1 settings for single sweep mode figure 8.7.1 shows an initial setting example of single sweep mode. when using an interrupt, it is necessary to set the relevant registers to enable the interrupt. refer to chapter 4. interrupts for more information. 8.7 single sweep mode
7702/7703 group users manual 8C21 a-d converter 8.7 single sweep mode fig. 8.7.1 initial setting example of single sweep mode b7 b0 port p7 direction register (address 11 16 ) l port p7 direction register set the bits corresponding to analog input pins to 0. set bit 7 to 0 when selecting external trigger. l set a-d conversion start bit to 1 b7 b0 a-d control register (address 1e 16 ) 1 a-d conversion start bit l interrupt priority level b7 b0 a-d conversion interrupt control register (address 70 16 ) interrupt priority level select bits set to a level between 1 to 7 when using this interrupt. set to a level 0 when disabling this interrupt. selecting external trigger selecting internal trigger trigger occur operation start note : write each bit (except bit 6) of the a-d control register and each bit of the a-d sweep pin select register when the a-d conversion stops (before trigger occurs). input falling edge to ad trg pin an 0 an 1 an 2 an 3 an 4 an 5 an 6 an 7 a-d control register (address 1e 16 ) 0 0 : an 0 , an 1 (2 pins) 0 1 : an 0 Can 3 (4 pins) 1 0 : an 0 Can 5 (6 pins) 1 1 : an 0 Can 7 (8 pins) b1 b0 trigger select bit 0 : internal trigger 1 : external trigger a-d conversion start bit 0: stop a-d conversion a-d conversion frequency ( ad ) select bit 0 : f 2 divided by 4 1 : f 2 divided by 2 b7 b0 l a-d control register and a-d sweep pin select register a-d sweep pin select register (address 1f 16 ) b7 b0 10 0 55 5 a-d sweep pin select bits 5 : 0 or 1 single sweep mode
7702/7703 group users manual 8C22 a-d converter 8.7.2 single sweep mode operation description (1) when an internal trigger is selected the operation for the input voltage from the an 0 pin starts when the a-d conversion start bit is set to 1. the a-d conversion of the input voltage from the an 0 pin is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register 0. a the operation to all selected analog input pins is performed. the conversion result is transferred to the a-d register i each time each pin is converted. ? when the step a is completed, the a-d conversion interrupt request bit is set to 1. ? the a-d conversion start bit is cleared to 0 and the a-d converter stops operation. (2) when an external trigger is selected the a-d converter starts operation for the input voltage from the an 0 pin when the input level to _____ the ad trg pin changes from h to l while the a-d conversion start bit is 1. the a-d conversion of the input voltage from the an 0 pin is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register 0. a the operation to all selected analog input pins is performed. the conversion result is transferred to the a-d register i each time each pin is converted. ? when the step a is completed, the a-d conversion interrupt request bit is set to 1. ? the a-d conversion stops operation. the a-d conversion start bit remains set to 1 after the operation is completed. accordingly, the _____ operation of the a-d converter can be performed again from step when the level of the ad trg pin changes from h to l. _____ when the level of the ad trg pin changes from h to l during operation, the operation at that point is cancelled and is restarted from step . figure 8.7.2 shows the conversion operation in the single sweep mode. 8.7 single sweep mode
7702/7703 group users manual 8C23 a-d converter 8.7 single sweep mode trigger occur convert input voltage from an 0 pin conversion result a-d register 0 a-d register i a-d register 1 conversion result conversion result a-d converter halt a-d conver ter interrupt request occur convert input voltage from an 1 pin convert input voltage from an i pin fig. 8.7.2 conversion operation in single sweep mode
7702/7703 group users manual 8C24 a-d converter 8.8 repeat sweep mode in the repeat sweep mode, the operation for the input voltage from the multiple selected analog input pins is performed repeatedly. the a-d converter is operated in ascending sequence from the an 0 pin. in this mode, no a-d conversion interrupt request occurs. additionally, the a-d conversion start bit (bit 6 at address 1e 16 ) remains set to 1 until it is cleared to 0 by software, and the operation is performed repeatedly while the a-d conversion start bit is 1. 8.8.1 settings for repeat sweep mode figure 8.8.1 shows an initial setting example of repeat sweep mode. 8.8 repeat sweep mode
7702/7703 group users manual 8C25 a-d converter 8.8 repeat sweep mode fig. 8.8.1 initial setting example of repeat sweep mode b7 b0 port p7 direction register (address 11 16 ) l port p7 direction register set the bits corresponding to analog input pins to 0. set bit 7 to 0 when selecting external trigger. l set a-d conversion start bit to 1 b7 b0 a-d control register (address 1e 16 ) 1 a-d conversion start bit selecting external trigger selecting internal trigger trigger occur operation start note : write each bit (except bit 6) of the a-d control register and each bit of the a-d sweep pin select register when the a-d conversion stops (before trigger occurs). input falling edge to ad trg pin an 0 an 1 an 2 an 3 an 4 an 5 an 6 an 7 a-d control register (address 1e 16 ) 0 0 : an 0 , an 1 (2 pins) 0 1 : an 0 Can 3 (4 pins) 1 0 : an 0 Can 5 (6 pins) 1 1 : an 0 Can 7 (8 pins) b1 b0 trigger select bit 0 : internal trigger 1 : external trigger a-d conversion start bit 0: stop a-d conversion a-d conversion frequency ( ad ) select bit 0 : f 2 divided by 4 1 : f 2 divided by 2 b7 b0 l a-d control register and a-d sweep pin select register a-d sweep pin select register (address 1f 16 ) b7 b0 11 0 55 5 a-d sweep pin select bits 5 : 0 or 1 repeat sweep mode
7702/7703 group users manual 8C26 a-d converter 8.8.2 repeat sweep mode operation description (1) when an internal trigger is selected the operation for the input voltage from the an 0 pin starts when the a-d conversion start bit is set to 1. the a-d conversion of the input voltage from the an 0 pin is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register 0. a the operation to all selected analog input pins is performed. the conversion result is transferred to the a-d register i each time each pin is converted. ? the operation to all selected analog input pins is performed again. ? the operation is performed repeatedly until the a-d conversion start bit is cleared to 0 by software. (2) when an external trigger is selected the a-d converter starts operation for the input voltage from the an 0 pin when the input level to ______ the ad trg pin changes from h to l while the a-d conversion start bit is 1. the a-d conversion of the input voltage from the an 0 pin is completed after 57 cycles of f ad . then, the contents of the successive approximation register (conversion result) are transferred to the a-d register 0. a the operation to all selected analog input pins is performed. the conversion result is transferred to the a-d register i each time each pin is converted. ? the operation to all selected analog input pins is performed again. ? the operation is performed repeatedly until the a-d conversion start bit is cleared to 0 by software. ______ when the level of the ad trg pin changes from h to l during operation, the operation at that point is cancelled and is restarted from step . figure 8.8.2 shows the conversion operation in the repeat sweep mode. 8.8 repeat sweep mode
7702/7703 group users manual 8C27 a-d converter 8.8 repeat sweep mode trigger occur convert input voltage from an 0 pin conversion result a-d register 0 a-d register i a-d register 1 conversion result conversion result convert input voltage from an 1 pin convert input voltage from an i pin fig. 8.8.2 conversion operation in repeat sweep mode
7702/7703 group users manual 8C28 a-d converter 8.9 precautions when using a-d converter 8.9 precautions when using a-d converter 1. write to each bit (except bit 6) of the a-d control regisrer and each bit of the a-d sweep pin select register before a trigger occurs (while the a-d converter stops operation). 2. when selecting the an 7 pin as an analog input pin while an external trigger is selected, a-d conversion _____ is performed for a trigger input, which is the input voltage on the ad trg pin, and the conversion result is stored into the a-d register 7. consequently, the user cannot use the an 7 pin as an analog input pin while an external trigger is selected. 3. refer to appendix.6 countermeasures against noise when using the a-d converter.
chapter 9 watchdog timer 9.1 block description 9.2 operation description 9.3 precaution when using watchdog timer
watchdog timer 7702/7703 group users manual 9C2 9.1 block description this chapter describes watchdog timer. watchdog timer has the following functions: l detection of a program runaway. l measurement of a certain time when oscillation starts owing to terminating stop mode. (refer to chapter 10. stop mode. ) 9.1 block description figure 9.1.1 shows the block diagram of the watchdog timer. fig. 9.1.1 block diagram of watchdog timer 2v cc detection circuit ?ff 16 ? is set. writing to watchdog timer register (address 60 16 ) stp instruction hold request watchdog timer interrupt request reset s q r f 32 f 512 watchdog timer
watchdog timer 7702/7703 group users manual 9C3 9.1.1 watchdog timer watchdog timer is a 12-bit counter that down-counts the count source which is selected with the watchdog timer frequency select bit (bit 0 at address 61 16 ). a value fff 16 is automatically set in watchdog timer in the cases listed below. an arbitrary value cannot be set to watchdog timer. l when dummy data is written to the watchdog timer register (refer to figure 9.1.2.) l when the most significant bit of watchdog timer becomes 0 l when the stp instruction is executed (refer to chapter 10. stop mode. ) l at reset 9.1 block description fig. 9.1.2 structure of watchdog timer register b7 b0 watchdog timer register (address 60 16 ) bit initializes the watchdog timer. when a dummy data is written to this register, the watchdog timer? value is initialized to ?ff 16 .?(dummy data: 00 16 to ff 16 ) at reset undefined rw functions 7 to 0
watchdog timer 7702/7703 group users manual 9C4 9.1.2 watchdog timer frequency select register this is used to select the watchdog timers count source. figure 9.1.3 shows the structure of the watchdog timer frequency select register. fig. 9.1.3 structure of watchdog timer frequency select register 9.1 block description 0 : f 512 1 : f 32 at reset undefined 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 watchdog timer frequency select register (address 61 16 ) bit nothing is allocated. watchdog timer frequency select bit bit name 0 7 to 1 rw
watchdog timer 7702/7703 group users manual 9C5 9.2 operation description 9.2 operation description the operation of watchdog timer is described below. 9.2.1 basic operation watchdog timer starts down-counting from fff 16 . when the watchdog timers most significant bit becomes 0 (counted 2048 times), the watchdog timer interrupt request occurs. (refer to table 9.2.1.) a when the interrupt request occurs at above , a value fff 16 is set to watchdog timer. the watchdog timer interrupt is a nonmaskable interrupt. when the watchdog timer interrupt request is accepted, the processor interrupt priority level (ipl) is set to 111 2 . table 9.2.1 occurrence interval of watchdog timer interrupt request f(x in ) = 25 mhz watchdog timer frequency select bit 0 1 count source f 512 f 32 occurrence interval 41.94 ms 2.62 ms
watchdog timer 7702/7703 group users manual 9C6 (1) example of program runaway detection write to the address 60 16 (watchdog timer register) before the most significant bit of watchdog timer becomes 0. in the case that watchdog timer is used to detect a program runaway, if writing to address 60 16 is not performed owing to a program runaway, the watchdog timer interrupt request occurs when the most significant bit of watchdog timer becomes 0. it means that a program runaway has occurred. to reset the microcomputer after a program runaway, write 1 to the software reset bit (bit 3 at address 5e 16 ) in the watchdog timer interrupt routine. 9.2 operation description fig. 9.2.1 example of program runaway detection by watchdog timer rti main routine watchdog timer interrupt routine watchdog timer register (address 60 16 ) 8-bit dummy data watchdog timer interrupt request occur (program runaway detected) watchdog timer initialized value of watchdog timer : ?ff 16 ?( note 1 ) software reset bit (address 5e 16 , b3) ??( note 2 ) reset microcomputer notes 1: initialize (write to address 60 16 ) watchdog timer before the most significant bit of watchdog timer becomes ??(the watchdog timer interrupt request occurs). 2: when the program runaway occurs, values of the data bank register (dt) and direct page register (dpr) may be changed. when ??is written to the software reset bit by the addressing mode using dt and dpr, set values to dt and dpr again.
watchdog timer 7702/7703 group users manual 9C7 9.2.2 operation in stop mode in stop mode, watchdog timer stops operating. immediately after stop mode is terminated, watchdog timer operates as follows. (1) when stop mode is terminated by a hardware reset supply of the f and f cpu starts immediately after stop mode is terminated, and the microcomputer performs the operation after a reset. (refer to chapter 13. reset. ) the watchdog timer frequency select bit becomes 0, and watchdog timer starts counting of f 512 from fff 16 . (2) when stop mode is terminated by an interrupt request occurrence immediately after the stop mode is terminated, watchdog timer starts counting of the count source f 32 from fff 16 . supply of the f and f cpu starts when the watchdog timers most significant bit becomes 0. ( at this time, the watchdog timer interrupt request does not occur.) supply of the f cpu starts immediately after stop mode is terminated, and the microcomputer executes the routine of the interrupt which is used to terminate stop mode. watchdog timer restarts counting of the count source (note) from fff 16 . note: clock f 32 or f 512 which was counted just before executing the stp instruction. 9.2.3 operation in hold state watchdog timer stops operating in hold state. when hold state [ is terminated, watchdog timer restarts counting in the same state where it stopped operating. hold state [ : refer to section 12.4 hold function. 9.2 operation description
watchdog timer 7702/7703 group users manual 9C8 9.3 precautions when using watchdog timer 9.3 precautions when using watchdog timer 1. when a dummy data is written to address 60 16 with the 16-bit data length, writing to address 61 16 is simultaneously performed. accordingly, when the user does not want to change a value of the watchdog timer frequency select bit (bit 0 at address 61 16 ), write the previous value to the bit simultaneously with writing to address 60 16 . 2. when the stp instruction (refer to chapter 10. stop mode ) is executed, watchdog timer stops. when watchdog timer is used to detect the program runaway, select stp instruction disable with mask option. 3. to stop watchdog timer in hold state, the count source which is actually counted by watchdog timer is _____ the logical and product of two signals. one is the inverted signal input from the hold pin, and the other _____ is the count source (f 32 or f 512 )(note). accordingly, when the hold pins input signal level changes in a duration which is shorter than 1 cycle of the count source (note) , counting by watchdog timer can be performed. (refer to figure 9.3.1.) note: it is selected with the watchdog timer frequency select bit. fig. 9.3.1 watchdog timers count source clock f 32 or f 512 hold pin input signal count source actually counted by watchdog timer when hold pin? input signal level changes in duration which is shorter than 1 cycle of f 32 or f 512
chapter 10 stop mode 10.1 clock generating circuit 10.2 operation description 10.3 precautions for stop mode
7702/7703 group users manual stop mode 10C2 this chapter describes stop mode. stop mode is used to stop oscillation when there is no need to operate the central processing unit (cpu). the microcomputer enters stop mode when the stp instruction is executed. stop mode can be terminated by an interrupt request occurrence or the hardware reset. 10.1 clock generating circuit figure 10.1.1 shows the clock generating circuit. 10.1 clock generating circuit fig. 10.1.1 clock generating circuit q x in x out 1/2 r s q r s q r s 1 cpu 1/8 1/2 f 2 1/2 1/8 f 16 f 64 f 512 f 32 f 512 interrupt request stp instruction reset wit instruction ready request request of cpu wait from biu (acceptance of hold request included) operation clock for internal peripheral devices hold request watchdog timer cpu : central processing unit watchdog timer frequency select bit : bit 0 at address 61 16 note: this is the signal generated when the watchdog timers most significant bit becomes 0. watchdog timers underflow signal ( note ) watchdog timer frequency select bit biu : bus interface unit
stop mode 7702/7703 group users manual 10C3 10.2 operation description 10.2 operation description when the stp instruction is executed, the oscillator stops oscillating. this state is called stop mode. in stop mode, the contents of the internal ram can be retained intact when the vcc, power source voltage, is 2 v or more. additionally, the microcomputers power consumption is reduced. it is because the cpu and all internal peripheral devices using clocks f 2 to f 512 stop the operation. table 10.2.1 lists the microcomputer state and operation in and after stop mode. table 10.2.1 microcomputer state and operation in and after stop mode state and operation item oscillation f cpu , f , clock f 1 , f 2 to f 512 timer a timer b serial i/o a-d converter watchdog timer pins state in stop mode operation after termi- nating stop mode stopped operating enabled only in event counter mode operating enabled only when selecting external clock stopped retains the same state in which the stp instruction was executed supply of f cpu and f starts after a certain time measured by watchdog timer has passed. internal peripheral devices by interrupt request occurrence by hardware reset operates in the same way as hardware reset
7702/7703 group users manual stop mode 10C4 10.2.1 termination by interrupt request occurrence when terminating stop mode by interrupt request occurrence, instructions are executed after a certain time measured by the watchdog timer has passed. when an interrupt request occurs, the oscillator starts oscillating. simultaneously, supply of clock f 1 , f 2 to f 512 starts. the watchdog timer starts counting owing to the oscillation start. the watchdog timer counts f 32 . a when the watchdog timers msb becomes 0, supply of f cpu , f biu starts. at the same time, the watchdog timers count source returns to f 32 or f 512 that is selected by the watchdog timer frequency select bit (bit 0 at address 61 16 ). ? the interrupt request which occurs in is accepted. table 10.2.2 lists the interrupts used to terminate stop mode. table 10.2.2 interrupts used to terminate stop mode conditions for using each function to generate interrupt request interrupt ____ int i interrupt (i = 0 to 2) timer ai interrupt (i = 0 to 4) timer bi interrupt (i = 0 to 2) uarti transmit interrupt (i = 0, 1) uarti receive interrupt (i = 0, 1) 10.2 operation description enabled in event counter mode enabled when selecting external clock notes 1: since the oscillator has stopped oscillating, each function does not work unless they are operated under the above condition. also, the a-d converter does not work. 2: since the oscillator has stopped oscillating, no interrupts other than those above can be used. 3: refer to chapter 4. interrupt and the description of each internal peripheral device for details about each interrupt. before executing the stp instruction, enable interrupts used to terminate stop mode. in addition, the interrupt priority level of the interrupt used to terminate stop mode must be higher than the processor interrupt priority level (ipl) of the routine where the stp instruction is executed. when multiple interrupts in table 10.2.2 are enabled, stop mode is terminated by the first interrupt request. there is possibility that all interrupt requests occur after the oscillation starts in and until supply of f cpu and f biu starts in a . the interrupt requests which occur during this time are accepted in order of priority (note) after the watchdog timers msb becomes 0. for interrupts not to be accepted, set their interrupt priority levels to level 0 (interrupt disabled) before executing the stp instruction. note : the interrupt request which has the highest priority is accepted first.
stop mode 7702/7703 group users manual 10C5 fig. 10.2.1 stop mode terminating sequence by interrupt request occurrence 10.2.2 termination by hardware reset ______ supply l level to the reset pin by using the external circuit until the oscillation of the oscillator is stabilized. the cpu and the sfr area are initialized in the same way as a system reset. however, the internal ram area retains the same contents as that before executing the stp instruction. the termination sequence is the same as the internal processing sequence which is performed after a reset. to determine whether a hardware reset was performed to terminate stop mode or a system reset was performed, use software after a reset. refer to chapter 13. reset for details about a reset. 10.2 operation description cpu 7ff 16 fff 16 0 1 stop mode f(x in ) operating stopped stopped internal peripheral devices operating value of watchdog timer f 32 5 2048 counts interrupt request used to terminate stop mode (interrupt request bit) stopped operating operating operating l interrupt request used to terminate stop mode occurs. l oscillation starts.(when an external clock is input from the x in pin, clock input starts.) l watchdog timer starts counting. l stp instruction is executed l watchdog timers msb = 0 (however, watchdog timer interrupt request does not occur.) l supply of cpu , biu starts. l interrupt request which has been used to terminate stop mode is accepted. cpu , biu 1
7702/7703 group users manual stop mode 10C6 10.3 precautions for stop mode 1. when using the stp instruction with the mask rom version, select stp instruction enable with the stp instruction option on the mask rom order confirmation form. the stp instruction is always enabled in the built-in prom version and the external rom version. 2. when executing the stp instruction after writing to the internal area or an external area, the three nop instructions must be inserted to complete the write operation before the stp instruction is executed. sta nop nop nop stp a, 5555 ; ; ; ; ; writing instruction nop instruction insertion stp instruction fig. 10.3.1 nop instruction insertion example 10.3 precautions for stop mode
chapter 11 wait mode 11.1 clock generating circuit 11.2 operation description 11.3 precautions for wait mode
7702/7703 group users manual wait mode 11C2 this chapter describes wait mode. wait mode is used to stop f cpu and f when there is no need to operate the central processing unit (cpu). the oscillator continues its oscillation. the microcomputer enters wait mode when the wit instruction is executed. wait mode can be terminated by an interrupt request occurrence or the hardware reset. 11.1 clock generating circuit figure 11.1.1 shows the clock generating circuit. 11.1 clock generating circuit fig. 11.1.1 clock generating circuit q x in x out 1/2 r s q r s q r s 1 cpu 1/8 1/2 f 2 1/2 1/8 f 16 f 64 f 512 f 32 f 512 interrupt request stp instruction reset wit instruction ready request request of cpu wait from biu (acceptance of hold request included) operation clock for internal peripheral devices hold request watchdog timer cpu: central processing unit biu: bus interface unit watchdog timer frequency select bit: bit 0 at address 61 16 note: this is the signal generated when the watchdog timers most significant bit becomes 0. watchdog timers underflow signal ( note ) watchdog timer frequency select bit
wait mode 7702/7703 group users manual 11C3 11.2 operation description 11.2 operation description when the wit instruction is executed, f cpu and f stop. the oscillators oscillation is not stopped. this state is called wait mode. in wait mode, the microcomputers power consumption is reduced though the vcc is, power source voltage, is maintained. table 11.2.1 lists the microcomputers state and operation in and after wait mode. table 11.2.1 microcomputer state and operation in and after wait mode state and operation item operating stopped operating operating retains the same state in which the wit instruction was executed state in wait mode operation after termi- nating wait mode oscillation f cpu , f clock f 1 , f 2 to f 512 timer a timer b serial i/o a-d converter watchdog timer pins internal peripheral devices by interrupt request occurrence by hardware reset supply of f cpu and f starts just after the termination. operates in the same way as hardware reset
7702/7703 group users manual wait mode 11C4 11.2.1 termination by interrupt request occurrence when an interrupt request occurs, supply of clock f cpu and f starts. the interrupt request which occurs in is accepted. the following interrupts are used to terminate wait mode. the occurrence of the watchdog timer interrupt request also terminates wait mode. ____ ?int i interrupt (i = 0 to 2) ?timer ai interrupt (i = 0 to 4) ?timer bi interrupt (i = 0 to 2) ?uarti transmit interrupt (i = 0, 1) ?uarti receive interrupt (i = 0, 1) ?a-d converter interrupt note : refer to chapter 4. interrupts and each functional description about interrupts. before executing the wit instruction, enable interrupts used to terminate wait mode. in addition, the interrupt priority level of the interrupt used to terminate wait mode must be higher than the processor interrupt priority level (ipl) of the routine where the wit instruction is executed. when the above multiple interrupts are enabled, wait mode is terminated by the first interrupt request. 11.2.2 termination by hardware reset the cpu and the sfr area are initialized in the same way as a system reset. however, the internal ram area retains the same contents as that before executing the wit instruction. the termination sequence is the same as the internal processing sequence which is performed after a reset. to determine whether a hardware reset was performed to terminate wait mode or a system reset was performed, use software after a reset. refer to chapter 13. reset for details about a reset. 11.2 operation description
wait mode 7702/7703 group users manual 11C5 11.3 precautions for wait mode when executing the wit instruction after writing to the internal area or an external area, the three nop instructions must be inserted to complete the write operation before the wit instruction is executed. 11.3 precautions for wait mode sta nop nop nop wit a, 5555 ; ; ; ; ; writing instruction nop instruction insertion wit instruction fig. 11.3.1 nop instruction insertion example
7702/7703 group users manual wait mode 11C6 11.3 precautions for wait mode memorandum
chapter 12 connection with external devices 12.1 signals required for accessing external devices 12.2 software wait 12.3 ready function 12.4 hold function
connection with external devices 12.1 signals required for accessing external devices 7702/7703 group users manual 12C2 this chapter describes functions to connect devices externally. 12.1 signals required for accessing external devices the functions and operation of the signals which are required for accessing external devices are described below. when connecting an external device that requires a long access time, refer to sections 12.2 software wait, 12.3 ready function, and 12.4 hold function, as well as this section. 12.1.1 descriptions of signals when an external device is connected, operate the microcomputer in the memory expansion or microprocessor _ mode. (refer to section 2.5 processor modes. ) in these modes, pins p0 to p4 and the e pin function as i/o pins for the signals required for accessing external devices. figure 12.1.1 shows the pin configuration in the memory expansion and microprocessor modes. table _ 12.1.1 lists the functions of pins p0 to p4 and the e pin in the memory expansion and the microprocessor modes.
connection with external devices 7702/7703 group users manual 12C3 12.1 signals required for accessing external devices fig. 12.1.1 pin configuration in memory expansion and microprocessor modes (top view) rdy a 20 /d 4 a 21 /d 5 a 22 /d 6 a 23 /d 7 r/w bhe ale hlda v ss e x out x in reset cnv ss byte hold p8 4 /cts 1 /rts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 /d 8 a 9 /d 9 a 10 /d 10 a 11 /d 11 a 12 /d 12 a 13 /d 13 a 14 /d 14 a 15 /d 15 a 16 /d 0 a 17 /d 1 a 18 /d 2 a 19 /d 3 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 14 3 25 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad trg p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 6 7 8 9 101112131415161718192021 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 43 42 41 m37702m2bxxxfp 22 23 24 p4 7 p4 6 p4 5 p4 4 p4 3 ] p4 2 / 1 l external data bus width = 16 bits (byte = l) ] : as 1 in microprocessor mode : external address bus, external data bus, bus control signal rdy a 20 /d 4 a 21 /d 5 a 22 /d 6 a 23 /d 7 r/w bhe ale hlda v ss e x out x in reset cnv ss byte hold a 11 a 12 a 13 a 14 a 15 a 16 /d 0 a 17 /d 1 a 18 /d 2 a 19 /d 3 p8 4 /cts 1 /rts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 14 3 2 56789101112131415161718192021222324 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad trg p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 43 42 41 m37702m2bxxxfp p4 7 p4 6 p4 5 p4 4 p4 3 ] p4 2 / 1 l external data bus width = 8 bits (byte = h ) ] : as 1 in microprocessor mode : external address bus, external data bus, bus control signal
connection with external devices 12.1 signals required for accessing external devices 7702/7703 group users manual 12C4 _ table 12.1.1 functions of pins p0 to p4 and e pin in memory expansion and microprocessor modes notes 1 :the 7703 group does not have the hlda pin. 2 :in the memory expansion mode, this pin functions as a programmable i/o port and can be programmed as the clock 1 output pin by software. 3 :this table shows the pins functions. refer to the following about the input/output timing of each signal: 12.1.2 operation of bus interface unit (biu) ; 12.2 software wait ; 12.3 ready function ; 12.4 hold function ; chapter 15. electrical characteristics . 4 :fix bits 0 and 1 of the port p4 direction register to 0. perform the setup regardless of whether using the p4 0 /hold and p4 1 /rdy pins as the hold or rdy pins or not. for the external rom version, perform the same setup. hlda bhe ale r/ w hlda d ale bhe r/ w p rdy hold rdy 1 hold e 1 e e pin external data bus width 16 bits (byte = l) a 7 a 0 (p0) a 7 a 0 a 7 a 0 8 bits (byte = h) a 15 /d 15 a 8 /d 8 (p1) a 23 /d 7 a 16 /d 0 (p2) ale (p3 2 ) bhe (p3 1 ) r/w (p3 0 ) d(odd): data at odd address d(odd) a 15 a 8 a 15 /d 15 a 8 /d 8 a 15 a 8 a 15 a 8 a 23 /d 7 a 16 /d 0 a 23 a 16 d(even): data at even address d(even) a 23 /d 7 a 16 /d 0 a 23 a 16 d: data (note 1) 1 (p4 2 ) p4 7 p4 3 rdy (p4 1 ) hold (p4 0 ) p4 7 p4 3 p: functions as a programmable i/o port. (note 2) (note 4) (note 4) hlda (p3 3 )
connection with external devices 7702/7703 group users manual 12C5 12.1 signals required for accessing external devices (1) external bus (a 0 to a 7 , a 8 /d 8 to a 15 /d 15 , a 16 /d 0 to a 23 /d 7 ) external areas are specified by the address (a 0 to a 23 ) output. figure 12.1.2 shows the external area. pins a 8 to a 23 of the external address bus and pins d 0 to d 15 of the external data bus are assigned to the same pins. when the byte pin level, described later, is l (i.e., external data bus width is 16 bits), the a 8 /d 8 to a 15 /d 15 and a 16 /d 0 to a 23 /d 7 pins perform address output and data input/output with time-sharing. when the byte pin level is h (i.e., external data bus width is 8 bits), the a 16 /d 0 to a 23 /d 7 pins perform address output and data input/output with time-sharing, and pins a 8 to a 15 output addresses. fig. 12.1.2 external area : external area note: addresses 2 16 to 9 16 become an external area. internal ram area sfr area ( note ) 0 16 ffffff 16 80 16 microprocessor mode 0 16 memory expansion mode 10000 16 ffffff 16 80 16 internal rom area internal ram area sfr area ( note ) c000 16 280 16 280 16
connection with external devices 12.1 signals required for accessing external devices 7702/7703 group users manual 12C6 (2) external data bus width switching signal (byte pin level) this signal is used to select the external data bus width between 8 bits and 16 bits. when this signal level is l, the external data bus width is 16 bits; when the level is h, the bus width is 8 bits (refer to table 12.1.1.) fix this signal to either h or l level. this signal is valid only for the external areas. when accessing the internal areas, the data bus width is always 16 bits. (3) __ enable signal (e) this signal becomes l level while reading or writing data to and from the data bus. (see table 12.1.2.) (4) __ read/write signal (r/w) this signal indicates the state of the data bus. this signal becomes l level while writing to the data ___ bus. table 12.1.2 lists the state of the data bus indicated with the e and r/w signals. _ table 12.1.2 state of data bus indicated with e __ and r/w signals __ r/w h l h l _ e h l state of data bus not used read data write data (5) ____ byte high enable signal (bhe) this signal indicates the access to an odd address. this signal becomes l level when accessing an only odd address or when simultaneously accessing odd and even addresses. this signal is used to connect memories or i/o devices of which data bus width is 8 bits when the external data bus width is 16 bits. ____ table 12.1.3 lists levels of the external address bus a 0 and the bhe signal and access addresses. ____ table 12.1.3 levels of a 0 and bhe signal and access addresses access address a 0 ____ bhe even and odd addresses (simultaneous 2-byte access) l l even address (1-byte access) l h odd address (1-byte access) h l (6) address latch enable signal (ale) this signal is used to obtain the address from the multiplexed signal of address and data that is input and output to and from the a 8 /d 8 to a 15 /d 15 and a 16 /d 0 to a 23 /d 7 pins. make sure that when this signal is h, latch the address and simultaneously output the addresses. when this signal is l, retain the latched address. (7) ____ ready function-related signal ( rdy ) this is the signal to use the ready function. (refer to section 12.3 ready function. ) (8) _____ _____ hold function-related signals ( hold , hlda ) these are the signals to use the hold function. (refer to section 12.4 hold function. )
connection with external devices 7702/7703 group users manual 12C7 12.1 signals required for accessing external devices (9) clock f 1 this signal has the same period as f . in the memory expansion mode, this signal is output externally by setting the clock f 1 output select bit (bit 7 at address 5e 16 ) to 1. figure 12.1.3 shows the output start timing of clock f 1. in the microprocessor mode, this signal is always output externally. note: even in the single-chip mode, the clock f 1 can be output externally. this signal is output externally by setting the clock f 1 output select bit to 1 just as in the memory expansion mode. fig. 12.1.3 output start timing of clock f 1 writing 1 to clock 1 output select bit e clock 1 (p4 2 ) notes 1 : the 1st cycle of clock 1 may be shortened; indicated by . 2 : this applies when writing to clock 1 output select bit while p4 2 pin is outputting l level. bit bit name functions at reset rw 0 1 2 3 4 5 6 7 processor mode bits software reset bit interrupt priority detection time select bits clock 1 output select bit (note 2) 0 0 0 0 0 0 : single-chip mode 0 1 : memory expansion mode 1 0 : microprocessor mode 1 1 : not selected the microcomputer is reset by writing 1 to this bit. the value is 0 at reading. 0 0 : 7 cycles of 0 1 : 4 cycles of 1 0 : 2 cycles of 1 1 : not selected 0 : clock 1 output disabled (p4 2 functions as a programmable i/o port.) 1 : clock 1 output enabled (p4 2 functions as a clock 1 out- put pin.) 0 0 b1 b0 b5 b4 processor mode register (address 5e 16 ) (note 1) notes 1: while supplying the vcc level to the cnvss pin, this bit becomes 1 after a reset. (fixed to 1.) 2: this bit is ignored in the microprocessor mode. (it may be either 0 or 1.) b1 b0 b2 b3 b4 b5 b6 b7 0 rw rw wait bit rw wo 0 rw 0 rw fix this bit to 0. rw rw 0 : software wait is inserted when accessing external area. 1 : no software wait is inserted when accessing external area. : bits 0 to 6 are not used for setting of clock 1 output. fig. 12.1.4 structure of processor mode register
connection with external devices 12.1 signals required for accessing external devices 7702/7703 group users manual 12C8 12.1.2 operation of bus interface unit (biu) figures 12.1.5 and 12.1.6 show the examples of operating waveforms of the signals input and output to /from externals when accessing external devices. the following explains these waveforms compared with the basic operating waveform (refer to section 2.2.3 operation of bus interface unit (biu). ) (1) when fetching instructions into instruction queue buffer when the instruction which is next fetched is located at an even address in the 16-bit external data bus width, the biu fetches 2 bytes at a time with the waveform (a). when in the 8-bit external data bus width, the biu fetches only 1 byte with the first half of waveform (e). when the instruction which is next fetched is located at an odd address in the 16-bit external data bus width, the biu fetches only 1 byte with the waveform (d). when in the 8-bit external data bus width, the biu fetches only 1 byte with the first half of waveform (f). when a branch to an odd address is caused by a branch instruction and others in the 16-bit external data bus width, the biu first fetches 1 byte in waveform (d), and after that, fetches each two bytes at a time in waveform (a). (2) when reading or writing data to and from memory?i/o device when accessing 16-bit data which begins at an even address, waveform (a) or (e) is applied. when accessing 16-bit data which begins at an odd address, waveform (b) or (f) is applied. a when accessing 8-bit data at an even address, waveform (c) or the first half of (e) is applied. ? when accessing 8-bit data at an odd address, waveform (d) or the first half of (f) is applied. for instructions that are affected by the data length flag (m) and the index register length flag (x), operation or is applied when flag m or x = 0; operation a or ? is applied when flag m or x = 1. the setup of flags m and x and the selection of the external data bus width do not affect each other.
connection with external devices 7702/7703 group users manual 12C9 12.1 signals required for accessing external devices fig. 12.1.5 example of operating waveforms of signals input and output to/from externals (1) a 0 a 7 a 16 /d 0 a 23 /d 7 e ale bhe a 0 a 8 /d 8 a 15 /d 15 a 0 a 7 a 16 /d 0 a 23 /d 7 e ale bhe a 0 a 8 /d 8 a 15 /d 15 a 0 a 7 a 8 /d 8 a 15 /d 15 bhe e a 0 ale a 16 /d 0 a 23 /d 7 a 0 a 7 a 8 /d 8 a 15 /d 15 bhe e a 0 ale a 16 /d 0 a 23 /d 7 (a) access from even address <16-bit data access> l external data bus width = 16 bits (byte = l) address data(odd) data(even) address address (b) access from odd address address address address data(odd) address address address data(even) <8-bit data access> (c) access to even address address address data(even) address address (d) access to odd address data(odd) address address
connection with external devices 12.1 signals required for accessing external devices 7702/7703 group users manual 12C10 fig. 12.1.6 example of operating waveforms of signals input and output to/from externals (2) e ale a 0 ?a 7 bhe a 0 a 8 ?a 15 a 16 /d 0 ?a 23 /d 7 e ale a 0 ?a 7 bhe a 0 a 8 ?a 15 a 16 /d 0 ?a 23 /d 7 l external data bus width = 8 bits (byte = ?? <8/16-bit data access> (e) access from even address address address data data 8-bit data access 16-bit data access address address address address data address data address address address address address 8-bit data access 16-bit data access (f) access from odd address note: when accessing 16-bit data, 2 times of access are performed in the sequence of the low-order 8 bits and high-order 8 bits.
connection with external devices 7702/7703 group users manual 12C11 12.2 software wait 12.2 software wait software wait provides a function to facilitate access to external devices that require a long access time. to select the software wait, use the wait bit (bit 2 at address 5e 16 ). figure 12.2.1 shows the structure of the processor mode register (address 5e 16 ). figure 12.2.2 shows an example of bus timing when the software wait is used. software wait is valid only for the external area. the internal areas is always accessed with no wait. bit bit name functions at reset rw 0 1 2 3 4 5 6 7 processor mode bits software reset bit interrupt priority detection time select bits clock 1 output select bit (note 2) 0 0 0 0 0 0 : single-chip mode 0 1 : memory expansion mode 1 0 : microprocessor mode 1 1 : not selected the microcomputer is reset by writing 1 to this bit. the value is 0 at reading. 0 0 : 7 cycles of 0 1 : 4 cycles of 1 0 : 2 cycles of 1 1 : not selected 0 : clock 1 output disabled (p4 2 functions as a programmable i/o port.) 1 : clock 1 output enabled (p4 2 functions as a clock 1 out- put pin.) 0 0 b1 b0 b5 b4 processor mode register (address 5e 16 ) (note1) notes 1: while supplying the vcc level to the cnvss pin, bit 1 becomes 1 after a reset. (fixed to 1.) 2: bit 7 is ignored in the microprocessor mode. (it may be either 0 or 1.) b1 b0 b2 b3 b4 b5 b6 b7 0 rw rw wait bit rw wo 0 rw 0 rw fix this bit to 0. rw rw 0 : software wait is inserted when accessing external area. 1 : no software wait is inserted when accessing external area. : bits 3 to 6 are not used when accessing the external area. fig. 12.2.1 structure of processor mode register
connection with external devices 12.2 software wait 7702/7703 group users manual 12C12 fig. 12.2.2 example of bus timing when software wait is used (byte = l) clock 1 a 0 a 7 a 8 /d 8 a 15 /d 15, a 16 /d 0 a 23 /d 7 e ale address 1 bus cycle (n ote) note: when the external data bus is 8 bits width (byte = h), a 8 /d 8 to a 15 /d 15 operate with the same bus timing as a 0 to a 7 . address data data address address l internal areas are always accessed in this waveform. clock 1 a 0 a 7 a 8 /d 8 a 15 /d 15, a 16 /d 0 a 23 /d 7 e ale (n ote) 1 bus cycle address address data data address address
connection with external devices 7702/7703 group users manual 12C13 12.3 ready function 12.3 ready function ready function provides a function to facilitate access to external devices that require a long access time. fix bit 1 of the port p4 direction register to 0. ____ by supplying l level to the rdy pin in the memory expansion or microprocessor mode, the microcomputer ____ enters ready state and retains this state while the rdy pin is at l level. table 12.3.1 lists the microcomputers state in ready state. in ready state, the oscillators oscillation does not stop, so that the internal peripheral devices can operate. ready function is valid for the internal and external areas. table 12.3.1 microcomputers state in ready state state operating stopped at l retains the state when ready request was accepted. in the memory expansion mode: ?when clock f 1 output select bit ] = 1, this pin outputs clock f 1 . ?when clock f 1 output select bit = 0, this pin retains the state when ready request was accepted. in the microprocessor mode: ?this pin outputs clock f 1 . operating item oscillation f cpu , f pins a 0 to a 7 , a 8 /d 8 to _ a 15 /d 15 , a 16 /d 0 to a 23 /d 7 , e, __ ____ _____ r/w, bhe, hlda (note 1) , ale pins p4 3 to p4 7 , p5 to p8 (note 2) p4 2 / f 1 watchdog timer clock f 1 output select bit ] : bit 7 at address 5e 16 _____ notes 1: the 7703 group does not have the hlda pin. 2: when this functions as a programmable i/o port.
connection with external devices 12.3 ready function 7702/7703 group users manual 12C14 12.3.1 operation description ____ the input level of the rdy pin is judged at the falling of the clock f 1 . then, when l level is detected, the microcomputer enters ready state. (this is called acceptance of ready request.) ____ in ready state, the input level of the rdy pin is judged at every falling of the clock f 1 . then, when h level is detected, the microcomputer terminates ready state next rising of the clock f 1 . figures 12.3.1 shows timing of acceptance of ready request and termination of ready state. refer also to section 17.1 memory expansion about use of the ready function.
connection with external devices 7702/7703 group users manual 12C15 12.3 ready function fig. 12.3.1 timings of acceptance of ready request and termination of ready state a the l level which is i nput to th e rdy pin is accepted, so that e stops at l level for 1 cycle of clock 1 (indicated by ?@ ), and cpu stops at l level. the l level which is input to the rdy pin is not accepted, however cpu stops at l level. clock 1 cpu rdy ale ? bus not in use the l level which is input to the rdy pin is accepted, so that e stops at h level for 1 cycle of clock 1 (indicated by ), and cpu stops at l level. rdy ale a ?? cpu e e rdy pin input level sampling timing ? a bus in use ? the ready state is terminated. ? the l level which is input to the rdy pin is not accepted because it is sampled immediately before wait by software wait (indicated by ?@ ), however cpu stops at l level. clock 1 rdy pin input level sampling timing bus in use
connection with external devices 12.4 hold function 7702/7703 group users manual 12C16 12.4 hold function when composing the external circuit (dma) which accesses the bus without using the central processing unit (cpu), the hold function is used to generate a timing for transferring the right to use the bus from the cpu to the external circuit. fix bit 0 of the port p4 direction register to 0. in the memory expansion or microprocessor mode, the microcomputer enters hold state by input of l level _____ _____ to the hold pin and retains this state while the level of the hold pin is at l. table 12.4.1 lists the microcomputers state in hold state. in hold state, the oscillation of the oscillator does not stop. accordingly, the internal peripheral devices can operate. however, watchdog timer stops operating. table 12.4.1 microcomputers state in hold state item oscillation f f cpu _ e pins a 0 to a 7 , a 8 /d 8 to a 15 /d 15 , __ ___ a 16 /d 0 to a 23 /d 7 , r/w, bhe _____ pins hlda (note 1) , ale pin p4 2 / f 1 pins p4 3 to p4 7 , p5 to p8 (note 2) watchdog timer state operating operating stopped at l stopped at h floating outputs l level. in the memory expansion mode: ?when clock f 1 output select bit \ = 1, this pin outputs clock f 1 . ?when clock f 1 output select bit = 0, this pin retains the state when hold request was accepted. in the microprocessor mode: ?this pin outputs clock f 1 . retains the state when hold request was accepted. stopped clock f 1 output select bit \ : bit 7 at address 5e 16 _____ notes 1: the 7703 group does not have the hlda pin. 2: when this functions as a programmable i/o port.
connection with external devices 7702/7703 group users manual 12C17 12.4 hold function 12.4.1 operation description _____ judgment timing of the input level of the hold pin depends on the state using the bus. while the bus is not in use, the judgment is performed at every falling of f . while the bus is in use, judgment is performed at the falling of the last f in each bus cycle. additionally, when accessing word data starting from an odd address with 2-bus cycle, the judgment is performed only at the second bus cycle. (see figure 12.4.1.) when l level is detected at judgment of the input level, the microcomputer enters hold state. (this is called acceptance of hold request.) _____ when the hold request is accepted, f cpu stops next rising of f . at the same time, the hlda pins level _____ __ ___ changes h to l. when 1 cycle of f has passed after the level of hlda pin becomes l, pins r/w, bhe, and the external bus become floating state. _____ in hold state, the input level of the hold pin is judged at every falling of f . then, when h level is _____ detected, the hlda pins level changes l to h next rising of f . when 1 cycle of f has passed after the _____ level of hlda pin becomes h, the microcomputer terminates hold state. figures 12.4.2 to 12.4.4 show timing of acceptance of hold request and termination of hold state. note: f has a same polarity and a same frequency as the clock f 1 . however, f stops by the ready request, _____ or executing the stp or wit instruction. accordingly, judgment of the input level of the hold pin is not performed during ready state. a a a a ww judgment timing of input level to hold pin clock 1 ale reading writing e no judge judge accessing word data with 2-bus cycle. (example of no wait) fig. 12.4.1 judgment when accessing word data beginning from odd address with 2-bus cycle
connection with external devices 12.4 hold function 7702/7703 group users manual 12C18 external address bus bhe ale e hlda hold r/w clock 1 external data bus data length external data bus width 16 8, 16 unused l state when inputting l level to hold pin 8, 16 8 judgment timing of input level to hold pin ] external address bus / external data bus floating floating floating address a address b 1 5 1 1 5 1 hold state term using bus term unusing bus this is the term in which the bus is not used, so that not a new address but an address output just before is output again. ] clock 1 has the same polarity and the same frequency as . signals timing to be input or output externally is ordained by clock 1 as a basis. fig. 12.4.2 timing of acceptance of hold request and termination of hold state (1)
connection with external devices 7702/7703 group users manual 12C19 12.4 hold function fig. 12.4.3 timing of acceptance of hold request and termination of hold state (2) judgment timing of input level to hold pin external address bus bhe e hlda hold r/w 8 16 8, 16 16 (access from even address) l state when inputting l level to hold pin external data bus data length external data bus width using external address bus / external data bus ale clock 1 1 5 1 1 5 1 address b address a data floating floating address a floating hold state term using bus term using bus when accepting a hold request, not a new address but an address output just before is output again. notes 1: this figure shows the case of no wait. 2: clock 1 has the same polarity and the same frequency as . signals timing to be input or output externally is ordained by clock 1 as a basis.
connection with external devices 12.4 hold function 7702/7703 group users manual 12C20 fig. 12.4.4 timing of acceptance of hold request and termination of hold state (3) address b e ale hlda hold r/w external address bus bhe 16 8 16 (access from odd address) using l state when inputting l level to hold pin external data bus data length external data bus width judgment timing of input level to hold pin clock 1 external address bus / external data bus address a+1 1 5 1 1 5 1 not accepted address a data data floating floating floating hold state term using bus term using bus when accepting a hold request, not a new address but an address output just before is output again. hold request cannot be accepted before input/output of 16-bit data is completed. notes 1 : this figure shows the case of no wait. 2 : clock 1 has the same polarity and the same frequency as . signals timing to be input or output externally is ordained by clock 1 as a basis.
chapter 13 reset 13.1 hardware reset 13.2 software reset
reset 7702/7703 group users manual 13C2 this chapter describes the method to reset the microcomputer. there are two methods to do that: hardware reset and software reset. 13.1 hardware reset when the power source voltage satisfies the microcomputers recommended operating conditions, the ______ microcomputer is reset by supplying l level to the reset pin. this is called a hardware reset. figure 13.1.1 shows an example of hardware reset timing. 13.1 hardware reset fig. 13.1.1 example of hardware reset timing the following explains how the microcomputer operates for terms to ? above. ______ after supplying l level to the reset pin, the microcomputer initializes pins within a term of several ten ns. (refer to table 13.1.1.) ______ while the reset pin is l level and within the term of 4 to 5 cycles of the internal clock f after the ______ reset pin goes from l to h, the microcomputer initializes the central processing unit (cpu) and sfr area. at this time, the contents of the internal ram area become undefined (except when stop or wait mode is terminated). (refer to figures 13.1.2 to 13.1.6.) a after , the microcomputer performs internal processing sequence after reset. (refer to figure 13.1.7.) ? the microcomputer executes a program beginning with the address set into the reset vector addresses which are fffe 16 and ffff 16 . reset program is executed. a? h 2 s or more internal processing sequence after a reset note: when the clock is stably supplied. (refer to 13.1.4 time supplying l level to reset pin. ) 4 to 5 cycles of l
7702/7703 group users manual reset 13C3 13.1 hardware reset 13.1.1 pin state ______ table 13.1.1 lists the microcomputers pin state while the reset pin is l level. ______ table 13.1.1 pin state while reset pin is l level mask rom version pin state floating. outputs h level. floating. outputs h level. floating. outputs h level. outputs h or l level. outputs h level. outputs l level. outputs f 1 . floating. outputs h or l level. outputs h level. outputs l level. outputs f 1 . floating. floating. outputs h level. floating. floating while supplying h level to two pins of p5 1 and p5 2 , or one of them. outputs h or l level while sup- plying l level to two pins of p5 1 and p5 2 . outputs h level. pin (port) name p0 to p8 _ e p0 to p8 _ e p0 to p8 _ e p0, p1, p2, p3 1 _ p3 0 , p3 3 , e p3 2 p4 2 p4 0 , p4 1 , p4 3 Cp4 7 , p5 to p8 a 0 Ca 7 , a 8 /d 8 Ca 15 / d 15 , a 16 /d 0 Ca 23 /d 7 , ____ bhe __ ______ _ r/w, hlda, e ale f 1 _____ ____ hold, rdy, p4 3 C p4 7 , p5 to p8 p0 to p8 _ e p0, p1, p3 to p8 p2 cnv ss pin level vss or vcc vss vss vcc identification ] m6 m8 m3 md m2 m4 external rom version s1 s4 vcc prom version (including one time prom and eprom versions) vss vcc ( note ) _ e identification ] : this expresses the internal memory type and its size identification. refer to chapter 1. description . note: each pin becomes the above state. it is because the microcomputer enters the eprom mode. refer to chapter 19. prom version .
reset 7702/7703 group users manual 13C4 13.1 hardware reset 13.1.2 state of cpu, sfr area, and internal ram area figure 13.1.2 shows the state of the cpu registers immediately after reset. figures 13.1.3 to 13.1.6 show the state of the sfr area and internal ram area immediately after reset. 0 : 0 immediately after a reset. 1 : 1 immediately after a reset. ? : undefined immediately after a reset. : always 0 at reading. data bank register (dt) 00 16 b7 b0 program bank register (pg) 00 16 b7 b0 program counter (pc) contents at address fffe 16 contents at address ffff 16 b7 b0 b15 b8 direct page register (dpr) 00 16 b7 b0 00 16 b15 b8 processor status register (ps) 0 00 00 0 1 b7 b0 b15 b8 n v mxd izc ipl ? stack pointer (s) ? b7 b0 ? b15 b8 index register y (y) ? b7 b0 ? b15 b8 index register x (x) ? b7 b0 ? b15 b8 accumulator b (b) ? b7 b0 ? b15 b8 accumulator a (a) ? b7 b0 ? b15 b8 register name state immediately after a reset ??? fig. 13.1.2 state of cpu registers immediately after reset
7702/7703 group users manual reset 13C5 13.1 hardware reset fig. 13.1.3 state of sfr and internal ram areas immediately after reset (1) 0 : 0 immediately after a reset. 1 : 1 immediately after a reset. ? : undef i ned immediately after a reset. : always 0 at reading. 0 0 : always undefined at reading. : 0 immediately after a reset. fix to 0. 10 16 11 16 12 16 13 16 port p8 direction register 14 16 15 16 16 16 17 16 18 16 19 16 1a 16 1b 16 1c 16 1d 16 1e 16 1f 16 0 16 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 b 16 c 16 d 16 e 16 f 16 a 16 a ddr ess port p4 register port p5 register port p4 direction register port p5 direction register port p6 register port p7 register port p6 direction register port p7 direction register port p8 register a-d control register a-d sweep pin select register port p0 register port p1 register port p2 register port p3 register port p0 direction register port p1 direction register port p2 direction register port p3 direction register register name access characteristics state immediately after a reset rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw 00 16 00 16 ? 00 16 00 16 00 16 0000 00000000 00 16 0 0 000 ? 11 b7 b0 b7 b0 : it is possible to read the bit state at reading. the written value becomes valid data. : it is possible to read the bit state at reading. the written value becomes invalid. : the written value becomes valid data. it is not possible to read the bit state. : nothing is assigned. it is not possible to read the bit state. the written value becomes invalid. rw ro wo l sfr area (0 16 to 7f 16 ) rw rw rw ? ? ? ? ? ? ? ? ? ? ? ? ? ? 00 16 ? ? (note) ? note : in the 7703 group, after a reset, set 1 to the bits which do not have corresponding pins. (refer to section 20.4.1 i/o pin .) ?@ 0 00 16 (note) (note) ? (note) ? (note) ? ? ? ? ? ? ????
reset 7702/7703 group users manual 13C6 13.1 hardware reset uart0 transmit/receive control register 0 uart0 transmit/receive mode register uart0 baud rate register uart0 transmit buffer register uart1 receive buffer register register name uart0 transmit/receive control register 1 uart0 receive buffer register uart1 transmit/receive mode register uart1 baud rate register uart1 transmit buffer register uart1 transmit/receive control register 0 uart1 transmit/receive control register 1 30 16 31 16 32 16 33 16 34 16 35 16 36 16 37 16 38 16 39 16 3a 16 3b 16 3c 16 3d 16 3e 16 28 16 29 16 2b 16 2c 16 2d 16 2e 16 2f 16 2a 16 20 16 21 16 22 16 23 16 24 16 25 16 26 16 27 16 3f 16 address access characteristics rw wo wo ro ro b7 b0 wo rw ro ro ro rw rw ro ro rw wo wo wo rw ro rw rw state immediately after a reset 1 000 00 16 0 000 00 0 ? b7 b0 00 16 00000010 0000 0 0 0 1 000 0000 0 0 1 0 ? ? ? ? ? ? ? ? ? ? ? a-d register 5 a-d register 1 a-d register 3 a-d register 2 a-d register 4 a-d register 0 a-d register 6 a-d register 7 ro ro ro ro ro ro ro ro ro ro ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ??? ? ??? fig. 13.1.4 state of sfr and internal ram areas immediately after reset (2)
7702/7703 group users manual reset 13C7 13.1 hardware reset fig. 13.1.5 state of sfr and internal ram areas immediately after reset (3) rw rw rw timer b2 register 40 16 41 16 42 16 43 16 44 16 45 16 46 16 47 16 48 16 49 16 50 16 51 16 52 16 53 16 54 16 55 16 56 16 57 16 58 16 59 16 5a 16 5b 16 5c 16 5d 16 5e 16 5f 16 4b 16 4c 16 4d 16 4e 16 4f 16 4a 16 address timer a2 register timer a3 register timer a4 register timer b0 register timer b1 register processor mode register one-shot start register timer a0 register up-down register timer a1 register register name count start register timer a1 mode register timer a2 mode register timer a3 mode register timer b0 mode register timer b1 mode register timer b2 mode register access characteristics wo (note 1) (note 1) (note 1) (note 1) (note 1) (note 2) (note 2) (note 2) (note 2) b7 b0 rw (note 2) (note 2) rw rw rw rw rw rw wo state immediately after a reset 00 16 00 16 00 16 00 16 ? 00 16 b7 b0 00 16 wo rw (note 1) (note 1) (note 1) (note 1) (note 1) rw timer a0 mode register timer a4 mode register (note 3) 0 00 0 0 0 0 0 0 0 0 0 0 00 0 00 0 00 0 0 0 0 0 rw rw ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (note4) notes 1: the access characteristics at addresses 46 16 to 4f 16 vary according to timer as operating mode. (refer to chapter 5. timer a. ) 2: the access characteristics at addresses 50 16 to 55 16 vary according to timer bs operating mode. (refer to chapter 6. timer b. ) 3: the access characteristics for bit 5 at addresses 5b 16 to 5d 16 vary according to timer bs operating mode. (refer to chapter 6. timer b. ) 4: the access characteristics for bit 1 at address 5e 16 and its state immediately after a reset vary according to the voltage level supplied to the cnvss pin. (refer to section 2.5 processor modes. ) (note 4) rw (note 3) rw (note 3) 00 0 00 0 ? ? 00 0 00 0 ? ? ?
reset 7702/7703 group users manual 13C8 13.1 hardware reset fig. 13.1.6 state of sfr and internal ram areas immediately after reset (4) uart1 receive interrupt control register 60 16 61 16 62 16 63 16 64 16 65 16 66 16 67 16 68 16 69 16 70 16 71 16 72 16 73 16 74 16 75 16 76 16 77 16 78 16 79 16 7a 16 7b 16 7c 16 7d 16 7e 16 7f 16 6b 16 6c 16 6d 16 6e 16 6f 16 6a 16 address a-d conversion interrupt control register uart0 transmit interrupt control register uart1 transmit interrupt control register int 2 interrupt control register watchdog timer frequency select r egi st er register name watchdog timer register timer a0 interrupt control register timer a2 interrupt control register timer a3 interrupt control register timer a4 interrupt control register timer b1 interrupt control register timer b2 interrupt control register int 0 interrupt control register access characteristics rw b7 b0 rw state immediately after a reset 0 ? (note 2) b7 b0 uart0 receive interrupt control register timer a1 interrupt control register timer b0 interrupt control register int 1 interrupt control register 0 0 00 0 by writing dummy data to address 60 16 , the value ?ff 16 ?is set to the watchdog timer. the dummy data is not retained anywhere. the value ?ff 16 ?is set to the watchdog timer. (refer to chapter 9. watchdog timer .? l internal ram area; addresses 80 16 to 27f 16 in m37702m2bxxxfp) ?t hardware reset (except the case that stop or wait mode is terminated)............................................... undefined. ?t software reset.......................................................... retaining the state immediately before a reset ?t terminating stop or wait mode (hardware reset is used to terminate it)............... retaining the state immediately before the stp or wit instruction is executed rw notes 1: 2: (note 1) ? (note 3) ? ? ? rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 0 00 0 0 00 0 0 0 0 0 0 0 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 00
7702/7703 group users manual reset 13C9 13.1.3 internal processing sequence after reset figure 13.1.7 shows the internal processing sequence after reset. 13.1 hardware reset fig. 13.1.7 internal processing sequence after reset h cpu (1) single-chip and memory expansion modes a p a h a l data e 0000 16 00 16 fffe 16 ad h , ad l r/w ad h , ad l next op-code ipl, reset vector address not used not used not used cpu a p a h a l data 0000 16 fffe 16 ad h , ad l ad h , ad l 00 16 e r/w cpu : cpu standard clock a p : high-order 8 bits address bus of cpu a h a l : low-order 16 bits address bus of cpu data ad h , ad l : contents of r eset vector address (fffe 16 , ffff 16 ) (2) microprocessor mode h next op-code ipl, reset vector address not used not used not used : cpu data bus
reset 7702/7703 group users manual 13C10 ______ 13.1.4 time supplying l level to reset pin ______ time supplying l level to the reset pin varies according to the state of the clock oscillation circuit. l when the oscillator is stably oscillating or a stable clock is input from the x in pin, supply l level for 2 s or more. l if the oscillator is not stably oscillating (including a power-on reset and in stop mode), supply l level until the oscillation is stabilized. the time to stabilize oscillation varies according to the oscillator. for details, contact the oscillator manufacturer. figure 13.1.8 shows the power-on reset condition. figure 13.1.9 shows an example of a power-on reset circuit. ] for details about stop mode, refer to chapter 10. stop mode. for details about clocks, refer to chapter 14. clock generating circuit. 13.1 hardware reset 0v 0v vcc reset powered on here 4.5v 0.9v note : refer to figure 18.3.1 power-on reset conditions for the low supply voltage version. fig. 13.1.8 power-on reset condition
7702/7703 group users manual reset 13C11 13.1 hardware reset 1 in out gnd delay capacity reset vcc vss 47 sw c d gnd 3 25 5 v m51957al m37702 27 k 10 k 4 ] the delay time is about 11 ms when c d = 0.033 m f. t d ? 0.34 5 c d [ m s], c d : [ pf ] note : refer to figure 18.3.2 example of power-on reset circuit for the low supply voltage version. vcc fig. 13.1.9 example of power-on reset circuit
reset 7702/7703 group users manual 13C12 13.2 software reset 13.2 software reset when the power source voltage satisfies the microcomputers recommended operating conditions, the microcomputer is reset by writing 1 to the software reset bit (bit 3 at address 5e 16 ). this is called a software reset. in this case, the microcomputer initializes pins, cpu, and sfr area just as in the case of a hardware reset. however, the microcomputer retains the contents of the internal ram area. (refer to table 13.1.1 and figures 13.1.2 to 13.1.6.) figure 13.2.1 shows the structure of processor mode register. after completing initialization, the microcomputer performs the internal processing sequence after a reset. (refer to figure 13.1.7.) after that, it executes a program beginning from the address set into the reset vector addresses which are fffe 16 and ffff 16. i bit bit name functions at reset rw 0 1 2 3 4 5 6 7 processor mode bits software reset bit interrupt priority detection time select bits clock 1 output select bit (note 2) 0 0 0 0 0 0 : single-chip mode 0 1 : memory expansion mode 1 0 : microprocessor mode 1 1 : not selected the microcomputer is reset by writing 1 to this bit. the value is 0 at reading. 0 0 : 7 cycles of 0 1 : 4 cycles of 1 0 : 2 cycles of 1 1 : not selected 0 : clock 1 output disabled (p4 2 functions as a programmable i/o port.) 1 : clock 1 output enabled (p4 2 functions as a clock 1 out- put pin.) 0 0 b1 b0 b5 b4 processor mode register (address 5e 16 ) (note 1) notes 1: while supplying the vcc level to the cnvss pin, this bit becomes 1 after a reset. (fixed to 1.) 2: this bit is ignored in the microprocessor mode. (it may be either 0 or 1.) b1 b0 b2 b3 b4 b5 b6 b7 0 rw rw wait bit rw wo 0 rw 0 rw fix this bit to 0. rw rw 0 : software wait is inserted when accessing external area. 1 : no software wait is inserted when accessing external area. : bits 0 to 2 and 4 to 7 are not used at software reset. fig. 13.2.1 structure of processor mode register
chapter 14 clock generating circuit 14.1 oscillation circuit example 14.2 clock
clock generating circuit 7702/7703 group users manual 14C2 this chapter describes a clock generating circuit which supplies the operating clock of the central processing unit (cpu), bus interface unit (biu), or internal peripheral devices. the clock generating circuit contains the oscillation circuit. 14.1 oscillation circuit example to the oscillation circuit, a ceramic resonator or a quartz-crystal oscillator can be connected, or the clock which is externally generated can be input. the example of the oscillation circuit is described below. 14.1.1 connection example using resonator/oscillator figure 14.1.1 shows an example when connecting a ceramic resonator/quartz-crystal oscillator between pins x in and x out . the circuit constants such as r f , r d , c in , and c out (shown in figure 14.1.1) depend on the resonator/ oscillator. these values shall be set to the resonator/ oscillator manufacturers recommended values. 14.1 oscillation circuit example fig. 14.1.1 connection example using resonator/oscillator fig. 14.1.2 externally generated clock input example 14.1.2 input example of externally generated clock figure 14.1.2 shows an input example of the clock which is externally generated. the external clock must be input from the x in pin, and the x out pin must be left open. m37702 x in x out r f c in c out r d m37702 x in x out vcc vss externally generated clock open
clock generating circuit 14C3 7702/7703 group users manual 14.2 clock 14.2 clock figure 14.2.1 shows the clock generating circuit block diagram. fig. 14.2.1 clock generating circuit block diagram q x in x out 1/2 r s q r s q r s 1 cpu 1/8 1/2 f 2 1/2 1/8 f 16 f 64 f 512 f 32 f 512 interrupt request stp instruction reset wit instruction ready request request of cpu wait from biu (acceptance of hold request included) operation clock for internal peripheral devices hold request watchdog timer cpu: central processing unit biu: bus interface unit watchdog timer frequency select bit: bit 0 at address 61 16 note: this is the signal generated when the watchdog timers most significant bit becomes 0. ( note ) watchdog timer frequency select bit 0 1
clock generating circuit 7702/7703 group users manual 14C4 14.2 clock 14.2.1 clock generated in clock generating circuit (1) f it is the operation clock of biu. it is also the clock source of f cpu . the f stops by ready request or execution of the stp or wit instruction. it is not stopped by acceptance of hold request. (2) f cpu it is the operation clock of cpu. the f cpu stops by the following: ?execution of the stp or wit instruction, ____ ?ready request; l level input to rdy pin ?wait request from biu; hold request acceptance included (3) clock f 1 it has the same period as f and is output to the external from the f 1 pin. the clock f 1 stops by execution of the stp instruction. it is not stopped by ready request or acceptance of hold request, or execution of the wit instruction. (4) f 2 to f 512 each of them is the internal peripheral devices operating clock. note: refer to each functional description for details: ?execution of stp instruction ............. chapter 10. stop mode ?execution of wit instruction .............. chapter 11. wait mode ?ready ..................................................... paragraph. 12.3 ready function ?hold ........................................................ paragraph. 12.4 hold function
chapter 15 electrical characteristics 15.1 absolute maximum ratings 15.2 recommended operating conditions 15.3 electrical characteristics 15.4 a-d converter characteristics 15.5 internal peripheral devices 15.6 ready and hold 15.7 single-chip mode 15.8 memory expansion mode and microprocessor mode : with no wait 15.9 memory expansion mode and microprocessor mode : with wait 15.10 testing circuit for ports p0 to p8, _ f 1 , and e
electrical characteristics 7702/7703 group users manual 15C2 15.1 absolute maximum ratings this chapter describes electrical characteristics of the m37 702m2bxxxfp and m37702m2axxxfp. for the low voltage version, refer to section 18.4 electrical characteristics. the 7703 groups available pins varies from that of the 7702 group. refer to chapter 20. 7703 group. for the latest data, inquire of addresses described last ( + contact addresses for further information) . in a part of the standard indicated in this chapter, there a re the limits depending on each microcomputer product or used external clock input frequency. distinguish it described below. ?limits depending on each microcomputer (example) m37702m2bxxxfp when this sign is a, refer to the column of 16 mhz. when this sign is b, refer to the column of 25 mhz. ?limits depending on used external clock input frequency the calculation formula is described in the table. when the microcomputer is 16 mhz version, the limits is the value in the case of f(x in ) = 16 mhz. when the microcomputer is 25 mhz version, the li mits is the value in the case of f(x in ) = 25 mhz. 15.1 absolute maxim um ratings absolute maximum ratings parameter power source voltage analog power source voltage input voltage input voltage output voltage power dissipation operating temperature storage temperature conditions ta = 25 c unit v v v v v mw c c ratings C0.3 to 7 C0.3 to 7 C0.3 to 12 C0.3 to v cc +0.3 C0.3 to v cc +0.3 300 (note) C20 to 85 C40 to 150 reset , cnv ss , byte p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , v ref , x in p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x out , _ e symbol v cc av cc v i v i v o p d t opr t stg note: in the 7703 group, this value is 1000 mw.
electrical characteristics 7702/7703 group users manual 15C3 v v v v v v v v v v ma ma ma ma mhz power source voltage analog power source voltage power source voltage analog power source voltage high-level input voltage high-level input voltage high-level input voltage low-level input voltage low-level input voltage low-level input voltage high-level peak output current high-level average output current low-level peak output current low-level average output current external clock input frequency 15.2 recommended operating conditions recommended operating conditions (v cc = 5 v10%, ta = C20 to 85 c, unless otherwise noted) 15.2 recommended operating conditions v cc av cc v ss av ss v ih v ih v ih v il v il v il i oh (peak) i oh (avg) i ol (peak) i ol (avg) f(x in ) parameter symbol limits min. max. 5.5 4.5 5.0 v cc 0 0 typ. unit v cc v cc v cc 0.2v cc 0.2v cc 0.16v cc C10 C5 10 5 25 15 0.5v cc 0 0 0 m37702m2bxxxfp m37702m2axxxfp p0 0 Cp0 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p1 0 Cp1 7 , p2 0 Cp2 7 (in single-chip mode) p1 0 Cp1 7 , p2 0 Cp2 7 (in memory expansion mode and microprocessor mode) p0 0 Cp0 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p1 0 Cp1 7 , p2 0 Cp2 7 (in single-chip mode) p1 0 Cp1 7 , p2 0 Cp2 7 (in memory expansion mode and microprocessor mode) p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 3 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 3 , p5 4 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 0.8v cc 0.8v cc notes 1: average output current is the average value of a 100 ms interval. 2: the sum of i ol (peak) for ports p0, p1, p2, p3, and p8 must be 80 ma or less, the sum of i oh (peak) for ports p0, p1, p2, p3, and p8 must be 80 ma or less, the sum of i ol (peak) for ports p4, p5, p6, and p7 must be 80 ma or less, and the sum of i oh (peak) for ports p4, p5, p6, and p7 must be 80 ma or less.
electrical characteristics 7702/7703 group users manual 15C4 hold , rdy , ta0 in Cta4 in , tb0 in Ctb2 in , int 0 C int 2 , ad trg , cts 0 , cts 1 , clk 0 , clk 1 15.3 electrical characteristics electrical characteristics (v cc = 5 v, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 15.3 electrical characteristics v oh v oh v oh v oh v ol v ol v ol v ol v t+ Cv tC v t+ Cv tC v t+ Cv tC i ih i il v ram i cc symbol parameter test conditions min. max. v v v v v v v v v v v m a m a v ma m a m a unit 3 4.7 3.1 4.8 3.4 4.8 0.4 0.2 0.1 2 2 0.45 1.9 0.43 1.6 0.4 1 0.5 0.3 5 C5 38 24 1 20 typ. 19 12 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 p3 2 e p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 p3 2 e reset x in p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte high-level output voltage high-level output voltage high-level output voltage high-level output voltage low-level output voltage low-level output voltage low-level output voltage low-level output voltage hysteresis hysteresis hysteresis high-level input current low-level input current ram hold voltage power source current i oh = C10 ma i oh = C400 a i oh = C10 ma i oh = C400 m a i oh = C10 ma i oh = C400 m a i ol = 10 ma i ol = 2 ma i ol = 10 ma i ol = 2 ma i ol = 10 ma i ol = 2 ma v i = 5 v v i = 0 v when clock is stopped. in single-chip mode, output pins are open, and the other pins are connected to v ss . ta = 25 c ,when clock is stopped f(x in ) = 16 mhz f(x in ) = 25 mhz limits ta = 85 c ,when clock is stopped
electrical characteristics 7702/7703 group users manual 15C5 15.4 a-d converter characteristics 15.4 a-d converter characteristics a-d converter characteristics (v cc = av cc = 5 v 10%, v ss = av ss = 0 v, ta = C20 to 85 c, unless otherwise noted) unit symbol r ladder t conv v ref v ia parameter resolution absolute accuracy ladder resistance conversion time reference voltage analog input voltage test conditions v ref = v cc v ref = v cc v ref = v cc f(x in ) = 25 mhz f(x in ) = 16 mhz limits min. 2 9.12 14.25 2 0 typ. max. 8 3 10 v cc v ref bits lsb k s v v
electrical characteristics 7702/7703 group users manual 15C6 15.5 internal peripheral devices timing requirements (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 15.5 internal peripheral devices timer a input (count input in event counter mode) limits tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width t c(ta) t w(tah) t w(tal) ns ns ns min. 80 40 40 max. unit parameter symbol 16 mhz 25 mhz min. 125 62 62 max. ns ns ns t c(ta) t w(tah) t w(tal) tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in ) timer a input (gating input in timer mode) 25 mhz 16 mhz unit limits max. min. 500 250 250 max. min. 320 160 160 symbol parameter data formula note: tai in input cycle time must be 4 cycles or more of count source, tai in input high-level pulse width must be 2 cycles or more of count source, tai in input low-level pulse width must be 2 cycles or more of count source. timer a input (external trigger input in one-shot pulse mode) 25 mhz 16 mhz unit limits max. max. symbol parameter data formula min. ns ns ns tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width t c(ta) t w(tah) t w(tal) 160 80 80 min. 4 5 10 9 f(x in ) 250 150 150 timer a input (external trigger input in pulse width modulation mode) 25 mhz 16 mhz unit limits max. max. symbol parameter min. 80 80 min. 125 125 tai in input high-level pulse width tai in input low-level pulse width ns ns t w(tah) t w(tal) timer a input (up-down input in event counter mode) 25 mhz 16 mhz unit limits max. max. symbol parameter min. t c(up) t w(uph) t w(upl) t su(upCt in ) t h(t in Cup) tai out input cycle time tai out input high-level pulse width tai out input low-level pulse width tai out input setup time tai out input hold time ns ns ns ns ns 2000 1000 1000 400 400 2500 1250 1250 500 500 min.
electrical characteristics 7702/7703 group users manual 15C7 15.5 internal peripheral devices timer a input (two-phase pulse input in event counter mode) limits taj in input cycle time taj in input setup time taj out input setup time ns ns ns unit parameter symbol 16 mhz 25 mhz min. 1000 250 250 max. t c(ta) t su(taj in Ctaj out ) t su(taj out Ctaj in ) min. 800 200 200 max.
electrical characteristics 7702/7703 group users manual 15C8 15.5 internal peripheral devices internal peripheral devices test conditions ?v cc = 5 v 10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v tai in input t c(ta) t w(tah) t w(tal) tai out input (up-down input) t c(up) t w(uph) t w(upl) tai in input (when count by falling) tai in input (when count by rising) tai out input (up-down input) t h(t in Cup) t su(upCt in ) t su(taj in Ctaj out ) taj in input taj out input t su(taj out Ctaj in ) t su(taj in Ctaj out ) t su(taj out Ctaj in ) l two-phase pulse input in event counter mode l up-down input, count input in event counter mode l count input in event counter mode l gating input in timer mode l external trigger input in one-shot pulse mode l external trigger input in pulse width modulation mode t c(ta)
electrical characteristics 7702/7703 group users manual 15C9 timer b input (count input in event counter mode) 15.5 internal peripheral devices 25 mhz 16 mhz unit symbol parameter min. max. max. min. t c(tb) t w(tbh) t w(tbl) t c(tb) t w(tbh) t w(tbl) ns ns ns ns ns ns tbi in input cycle time (one edge count) tbi in input high-level pulse width (one edge count) tbi in input low-level pulse width (one edge count) tbi in input cycle time (both edges count) tbi in input high-level pulse width (both edges count) tbi in input low-level pulse width (both edges count) 80 40 40 160 80 80 limits 125 62 62 250 125 125 tbi in input cycle time tbi in input high-level pulse width tbi in input low-level pulse width t c(tb) t w(tbh) t w(tbl) timer b input (pulse period measurement mode) 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in ) note: tbi in input cycle time must be 4 cycles or more of count source, tbi in input high-level pulse width must be 2 cycles or more of count source, tbi in input low-level pulse width must be 2 cycles or more of count source. max. max. min. 320 160 160 ns ns ns 25 mhz 16 mhz unit limits max. symbol data formula parameter min. 500 250 250 t c(tb) t w(tbh) t w(tbl) tbi in input cycle time tbi in input high-level pulse width tbi in input low-level pulse width 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in ) note: tbi in input cycle time must be 4 cycles or more of count source, tbi in input high-level pulse width must be 2 cycles or more of count source, tbi in input low-level pulse width must be 2 cycles or more of count source. a-d trigger input timer b input (pulse width measurement mode) max. max. 25 mhz 16 mhz unit limits symbol data formula parameter min. 320 160 160 ns ns ns min. 500 250 250 max. max. 25 mhz 16 mhz unit limits symbol parameter t c(ad) t w(adl) ad trg input cycle time (minimum allowable trigger) ad trg input low-level pulse width ns ns min. min. 1000 125 1000 125
electrical characteristics 7702/7703 group users manual 15C10 15.5 internal peripheral devices 25 mhz 16 mhz limits min. max. 80 ns ns ns ns ns ns ns clk i input cycle time clk i input high-level pulse width clk i input low-level pulse width txd i output delay time txd i hold time rxd i input setup time rxd i input hold time t c(ck) t w(ckh) t w(ckl) t d(cCq) t h(cCq) t su(dCc) t h(cCd) unit max. 90 200 100 100 0 30 90 external interrupt int i input serial i/o parameter symbol 25 mhz 16 mhz limits unit parameter symbol ns ns min. 250 250 max. min. 250 125 125 0 30 90 min. 250 250 max. int i input high-level pulse width int i input low-level pulse width t w(inh) t w(inl)
electrical characteristics 7702/7703 group users manual 15C11 15.5 internal peripheral devices internal peripheral devices test conditions ?v cc = 5 v 10% ?input timing voltage ?output timing voltage : v il = 1.0 v, v ih = 4.0 v : v ol = 0.8 v, v oh = 2.0 v tbi in input t c(tb) t w(tbh) t w(tbl) t c(ad) t w(adl) ad trg input t w(inl) t w(inh) int i input t c(ck) t w(ckh) t w(ckl) t h(cCq) t su(dCc) clk i input txd i output rxd i input t d(cCq) t h(cCd)
electrical characteristics 7702/7703 group users manual 15C12 15.6 ready and hold timing requirements (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 15.6 ready and hold 25 mhz 16 mhz unit symbol parameter max. max. limits min. t su(rdyC f 1 ) t su(holdC f 1 ) t h( f 1 Crdy) t h( f 1 Chold) rdy input setup time hold input setup time rdy input hold time hold input hold time ns ns ns ns 55 55 0 0 min. 60 60 0 0 switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 25 mhz 16 mhz unit symbol parameter max. max. limits min. ns min. 50 50 hlda output delay time note: for test conditions, refer to figure 15.10.1. t d( f 1 Chlda)
electrical characteristics 7702/7703 group users manual 15C13 15.6 ready and hold test conditions ?v cc = 5 v10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v 1 with no wait 1 with wait rdy input e output e output rdy input t su(rdyC 1 ) t h( 1 Crdy) t su(rdyC 1 ) t h( 1 Crdy) l ready function
electrical characteristics 7702/7703 group users manual 15C14 15.6 ready and hold test conditions ?v cc = 5 v10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v 1 hold input hlda output t h( 1 Chold) t d( 1 Chlda) t d( 1 Chlda) l hold function 1 ) t su(holdC
electrical characteristics 7702/7703 group users manual 15C15 15.7 single-chip mode 15.7 single-chip mode timing requirements (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) limits 25 mhz 16 mhz unit ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns parameter symbol 10 10 62 25 25 100 100 100 100 100 100 100 100 100 0 0 0 0 0 0 0 0 0 8 8 switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 40 15 15 60 60 60 60 60 60 60 60 60 0 0 0 0 0 0 0 0 0 limits 25 mhz 16 mhz unit parameter symbol max. min. min. max. 80 80 80 80 80 80 80 80 80 ns ns ns ns ns ns ns ns ns t d(eCp0q) t d(eCp1q) t d(eCp2q) t d(eCp3q) t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) 100 100 100 100 100 100 100 100 100 note: for test conditions, refer to figure 15.10.1. min. max. max. min. port p0 data output delay time port p1 data output delay time port p2 data output delay time port p3 data output delay time port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time t c t w(h) t w(l) t r t f t su(p0dCe) t su(p1dCe) t su(p2dCe) t su(p3dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp0d) t h(eCp1d) t h(eCp2d) t h(eCp3d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p0 input setup time port p1 input setup time port p2 input setup time port p3 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p0 input hold time port p1 input hold time port p2 input hold time port p3 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time
electrical characteristics 7702/7703 group users manual 15C16 15.7 single-chip mode t d(eCp0q) t su(p0dCe) t h(eCp0d) t d(eCp1q) t su(p1dCe) t h(eCp1d) t d(eCp2q) t su(p2dCe) t h(eCp2d) t d(eCp3q) t su(p3dCe) t h(eCp3d) t w(h) t c t r t f e port p0 output f(x in ) t d(eCp4q) t su(p4dCe) t h(eCp4d) t d(eCp5q) t su(p5dCe) t h(eCp5d) t d(eCp6q) t su(p6dCe) t h(eCp6d) t d(eCp7q) t su(p7dCe) t h(eCp7d) t d(eCp8q) t su(p8dCe) t h(eCp8d) t w(l) single-chip mode test conditions ?v cc = 5 v 10% ?input timing voltage ?output timing voltage : v il = 1.0 v, v ih = 4.0 v : v ol = 0.8 v, v oh = 2.0 v port p0 input port p1 output port p1 input port p2 output port p2 input port p3 output port p3 input port p4 output port p4 input port p5 output port p5 input port p6 output port p6 input port p7 output port p7 input port p8 output port p8 input
electrical characteristics 7702/7703 group users manual 15C17 15.8 memory expansion mode and microprocessor mode : with no wait timing requirements (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) 15.8 memory expansion mode and microprocessor mode : with no wait limits 25 mhz 16 mhz unit parameter symbol 8 8 ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns t c t w(h) t w(l) t r t f t su(p1dCe) t su(p2dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp1d) t h(eCp2d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p1 input setup time port p2 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p1 input hold time port p2 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time max. max. min. min. 40 15 15 30 30 60 60 60 60 60 0 0 0 0 0 0 0 10 10 62 25 25 45 45 100 100 100 100 100 0 0 0 0 0 0 0 switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) limits 25 mhz 16 mhz unit parameter symbol max. max. min. min. port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time f 1 output delay time _ e low-level pulse width port p0 address output delay time port p1 data output delay time (byte = l) port p1 floating start delay time (byte = l) port p1 address output delay time port p1 address output delay time port p2 data output delay time port p2 floating start delay time port p2 address output delay time port p2 address output delay time ale output delay time ale pulse width bhe output delay time r/w output delay time t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) t d(eC f 1 ) t w(el) t d(p0aCe) t d(eCp1q) t pxz(eCp1z) t d(p1aCe) t d(p1aCale) t h(eCp2q) t pxz(eCp2z) t d(p2aCe) t h(p2aCale) t d(aleCe) t w(ale) t d(bheCe) t d(r/wCe) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns note: for test conditions, refer to figure 15.10.1. ] this is the value depending on f(x in ). for data formula, refer to table 15.8.1. 0 50 12 12 5 12 5 4 22 20 20 ] ] ] ] ] ] ] ] ] 100 100 100 100 100 20 70 5 70 5 0 95 30 30 24 30 24 4 35 30 30 ] ] ] ] ] ] ] ] ] 80 80 80 80 80 18 45 5 45 5
electrical characteristics 7702/7703 group users manual 15C18 15.8 memory expansion mode and microprocessor mode : with no wait switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) limits 25 mhz 16 mhz unit parameter max. max. min. min. t h(eCp0a) t h(aleCp1a) t h(eCp1q) t pzx(eCp1z) t h(eCp1a) t h(aleCp2a) t h(eCp2q) t pzx(eCp2z) t h(eCbhe) t h(eCrw) symbol port p0 address hold time port p1 address hold time (byte = l) port p1 data hold time (byte = l) port p1 floating release delay time (byte = l) port p1 address hold time (byte = h) port p2 address hold time port p2 data hold time port p2 floating release delay time ___ bhe hold time __ r/w hold time ns ns ns ns ns ns ns ns ns ns 25 9 25 36 25 9 25 36 18 18 (note 1) (note 1) ] ] ] ] ] ] 18 9 18 18 18 9 18 18 18 18 ] ] ] ] ] ] notes 1: for the m37702e2axxxfp, M37702E2AFS, m37702e4axxxfp, and m37702e4afs, refer to section 19.5.4 bus timing and eprom mode. for the m37703e2axxxsp and m37703e4axxxsp, refer to section 20.6.2 bus timing and eprom mode. 2: for test conditions, refer to figure 15.10.1. ] : this is the value depending on f(x in ). for data formula, refer to table 15.8.1. table 15.8.1 bus timing data formula t w(el) t d(p0aCe) t d(p1aCe) t d(p2aCe) t d(p1aCale) t d(p2aCale) t w(ale) t d(bhe-e) t d(r/w-e) t h(eCp0a) t h(eCp1a) t h(eCp1q) t h(eCp2q) t pzx(eCp1z) t pzx(eCp2z) 2 5 10 9 f(x in ) C 30 f(x in ) 8 mhz 8 mhz < f(x in ) 16 mhz 16 mhz < f(x in ) 25 mhz 1 5 10 9 f(x in ) 100 + C 125 1 5 10 9 f(x in ) C 45 1 5 10 9 f(x in ) C 35 1 5 10 9 f(x in ) 100 + C 125 1 5 10 9 f(x in ) C 30 1 5 10 9 f(x in ) C 38.5 1 5 10 9 f(x in ) C 27.5 1.2 5 10 9 f(x in ) C 75 30 + 1 5 10 9 f(x in ) C 26 1 5 10 9 2 5 f(x in ) C 6.25 1 5 10 9 2 5 f(x in ) C 12.5 1 5 10 9 f(x in ) C 35 1 5 10 9 f(x in ) C 18 1 5 10 9 f(x in ) C 22 1 5 10 9 2 5 f(x in ) C 2 1.2 5 10 9 f(x in ) 30 + C 75 1 5 10 9 f(x in ) 12 + C 40 1 5 10 9 f(x in ) C 40 20 + note: for the m37702e2axxxfp, M37702E2AFS, m37702e4axxxfp, and m37702e4afs, refer to section 19.5.4 bus timing and eprom mode. for the m37703e2axxxsp and m37703e4axxxsp, refer to section 20.6.2 bus timing and eprom mode. (note) f(x in ) sign
electrical characteristics 7702/7703 group users manual 15C19 15.8 memory expansion mode and microprocessor mode : with no wait t d(p1a C e) t d(p1a C e) t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(e C 1 ) t h(e C p0a) t h(e C p1a) t d(p0a C e) t h(e C p1q) t d(e C p1q) address address t h(e C p2q) t d(e C p2q) t d(p2a C e) data address t h(ale C p1a) t d(p1a C ale) t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) t d(e C piq) f(x in ) 1 address output a 0 Ca 7 bhe output port pi output (i = 4C8) test conditions (p4Cp8) ?v cc = 5 v 10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) test conditions ( 1 , e, p0Cp3) ?v cc = 5 v 10% ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input : v il = 0.8 v, v ih = 2.5 v t h(ale C p2a) t d(p2a C ale) memory expansion mode and microprocessor mode ; with no wait data address
electrical characteristics 7702/7703 group users manual 15C20 15.8 memory expansion mode and microprocessor mode : with no wait t su(p1d C e) t d(p0a C e) t d(p1a C e) t d(p1a C e) t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(eC 1 ) t h(e C p0a) t h(e C p1a) t pzx(e C p1z) t pxz(e C p1z) address t d(p1a C ale) t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) memory epxansion mode and microprocessor mode ; with no wait t h(e C p1d) t h(ale C p1a) data t d(p2a C e) t pzx(e C p2z) t h(e C p2d) address t h(e C pid) t su(pid C e) f(x in ) 1 address output a 0 Ca 7 bhe output test conditions ( 1 , e, p0Cp3) ?v cc = 5 v 10% ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input : v il = 0.8 v, v ih = 2.5 v port pi input (i = 4C8) test conditions (p4Cp8) ?v cc = 5 v 10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) t pxz(e C p2z) t h(ale C p2a) t d(p2a C ale) t su(p2d C e) data address address
electrical characteristics 7702/7703 group users manual 15C21 15.9 memory expansion mode and microprocessor mode : with wait 15.9 memory expansion mode and microprocessor mode : with wait timing requirements (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) limits 25 mhz 16 mhz unit parameter symbol 40 15 15 30 30 60 60 60 60 60 0 0 0 0 0 0 0 t c t w(h) t w(l) t r t f t su(p1dCe) t su(p2dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp1d) t h(eCp2d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p1 input setup time port p2 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p1 input hold time port p2 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time 8 8 min. max. min. max. 62 25 25 45 45 100 100 100 100 100 0 0 0 0 0 0 0 10 10 limits 25 mhz 16 mhz unit parameter symbol min. max. min. max. port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time f 1 output delay time _ e low-pulse width port p0 address output delay time port p1 data output delay time (byte = l) port p1 floating start delay time (byte = l) port p1 address output delay time port p1 address output delay time port p2 data output delay time port p2 floating start delay time port p2 address output delay time port p2 address output delay time ale output delay time ale pulse width ____ bhe output delay time __ r/w output delay time t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) t d(eC f 1 ) t w(el) t d(p0aCe) t d(eCp1q) t pxz(eCp1z) t d(p1aCe) t d(p1aCale) t d(eCp2q) t pxz(eCp2z) t d(p2aCe) t d(p2aCale) t d(aleCe) t w(ale) t d(bheCe) t d(r/wCe) switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns 100 100 100 100 100 20 70 5 70 5 0 220 30 30 24 30 24 4 35 30 30 ] ] ] ] ] ] ] ] ] 80 80 80 80 80 18 45 5 45 5 0 130 12 12 5 12 5 4 22 20 20 ] ] ] ] ] ] ] ] ] note: for test conditions, refer to figure 15.10.1. ] : this is the value depending on f(x in ). for data formula, refer to table 15.9.1.
electrical characteristics 7702/7703 group users manual 15C22 15.9 memory expansion mode and microprocessor mode : with wait switching characteristics (v cc = 5 v10%, v ss = 0 v, ta = C20 to 85 c, unless otherwise noted) limits 25 mhz 16 mhz unit parameter symbol min. max. min. max. ns ns ns ns ns ns ns ns ns ns port p0 address hold time port p1 address hold time (byte = l) port p1 data hold time (byte = l) port p1 floating release delay time (byte = l) port p1 address hold time (byte = h) port p2 address hold time port p2 data hold time port p2 floating release delay time ____ bhe hold time __ r/w hold time t h(eCp0a) t h(aleCp1a) t h(eCp1q) t pzx(eCp1z) t h(eCp1a) t h(aleCp2a) t h(eCp2q) t pzx(eCp2z) t h(eCbhe) t h(eCr/w) 18 9 18 18 18 9 18 18 18 18 ] ] ] ] ] ] 25 9 25 36 25 9 25 36 18 18 (note 1) (note 1) ] ] ] ] ] ] notes 1: for the m37702e2axxxfp, M37702E2AFS, m37702e4axxxfp, and m37702e4afs, refer to section 19.5.4 bus timing and eprom mode. for the m37703e2axxxsp and m37703e4axxxsp, refer to section 20.6.2 bus timing and eprom mode. 2: for test conditions, refer to figure 15.10.1. ] : this is the value depending on f(x in ). for data formula, refer to table 15.9.1. table 15.9.1 bus timing data formula t w(el) t d(p0aCe) t d(p1aCe) t d(p2aCe) t d(p1aCale) t d(p2aCale) t w(ale) t d(bhe-e) t d(r/w-e) t h(eCp0a) t h(eCp1a) t h(eCp1q) t h(eCp2q) t pzx(eCp1z) t pzx(eCp2z) 4 5 10 9 f(x in ) C 30 f(x in ) 8 mhz 8 mhz < f(x in ) 16 mhz 16 mhz < f(x in ) 25 mhz 1 5 10 9 f(x in ) 100 + C 125 1 5 10 9 f(x in ) C 45 1 5 10 9 f(x in ) C 35 1 5 10 9 f(x in ) 100 + C 125 1 5 10 9 f(x in ) C 30 1 5 10 9 f(x in ) C 38.5 1 5 10 9 f(x in ) C 27.5 1.2 5 10 9 f(x in ) C 75 30 + 1 5 10 9 f(x in ) C 26 1 5 10 9 2 5 f(x in ) C 6.25 1 5 10 9 2 5 f(x in ) C 12.5 1 5 10 9 f(x in ) C 35 1 5 10 9 f(x in ) C 18 1 5 10 9 f(x in ) C 22 1 5 10 9 2 5 f(x in ) C 2 1.2 5 10 9 f(x in ) 30 + C 75 1 5 10 9 f(x in ) 12 + C 40 1 5 10 9 f(x in ) C 40 20 + note: for the m37702e2axxxfp, M37702E2AFS, m37702e4axxxfp, and m37702e4afs, refer to section 19.5.4 bus timing and eprom mode. for the m37703e2axxxsp and m37703e4axxxsp, refer to section 20.6.2 bus timing and eprom mode. (note) f(x in ) sign
electrical characteristics 7702/7703 group users manual 15C23 15.9 memory expansion mode and microprocessor mode : with wait t d(p1a C e) t d(p1a C e) t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(e C 1 ) t h(e C p0a) t h(e C p1a) t d(p0a C e) t h(e C p1q) t d(e C p1q) address data t h(e C p2q) t d(e C p2q) t d(p2a C e) address t h(ale C p1a) t d(p1a C ale) t h(ale C p2a) t d(p2a C ale) t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) t d(e C piq) f(x in ) 1 address output a 0 Ca 7 bhe output port pi output (i = 4C8) test conditions (p4Cp8) ?v cc = 5v 10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) test conditions ( 1 , e, p0Cp3) ?v cc = 5 v 10% ?output timing voltage :v ol = 0.8 v, v oh = 2.0v ?data input : v il = 0.8 v, v ih = 2.5 v memory expansion mode and microprocessor mode ; with wait address data address
electrical characteristics 7702/7703 group users manual 15C24 15.9 memory expansion mode and microprocessor mode : with wait t su(p1d C e) data t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(e C 1 ) t h(e C p0a) t h(e C p1a) t pzx(e C p1z) t pxz(e C p1z) address address t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) memory expansion mode and microprocessor mode ; with wait t h(e C p1d) t h(ale C p1a) t pzx(e C p2z) t pxz(e C p2z) t h(e C p2d) t h(ale C p2a) t h(e C pid) t su(pid C e) f(x in ) 1 address output a 0 Ca 7 bhe output port pi input (i = 4C8) test conditions (p4Cp8) ? v cc = 5 v 10% ?input timing voltage : v il = 1.0 v, v ih = 4.0 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) test conditions ( 1 , e, p0Cp3) ? v cc = 5 v 10% ? output timing voltage : v ol = 0.8 v, v oh = 2.0 v ? data input : v il = 0.8 v, v ih = 2.5 v t su(p2d C e) address data address t d(p1a C e) t d(p1a C ale) t d(p1a C e) t d(p0a C e) t d(p2a C e) t d(p2a C ale)
electrical characteristics 7702/7703 group users manual 15C25 15.10 testing circuit for ports p0 to p8, f 1 , and e 15.10 testing circuit for ports p0 to p8, f 1 , and e _ fig. 15.10.1 testing circuit for ports p0 to p8, f 1 , and e p0 p1 p2 p3 p4 p5 p6 p7 p8 100pf 1 e
electrical characteristics 7702/7703 group users manual 15C26 memorandum 15.10 testing circuit for ports p0 to p8, f 1 , and e
chapter 16 standard characteristics 16.1 standard characteristics
st andard characteristics 7702/7703 group users manual 16C2 16.1 standard characteristics 16.1 standard characteristics the data described below are characteristic examples for m37 702m2bxxxfp. the data is not guaranteed value. refer to chapter 15. electrical characteristics for rated value. 16.1.1 port standard characteristics (1) programmable i/o port (cmos output) p channel i oh Cv oh characteristics (2) programmable i/o port (cmos output) n channel i ol Cv ol characteristics 50.0 40.0 30.0 20.0 10.0 0 1.0 2.0 3.0 4.0 5.0 v oh [v] i oh [ma] p channel ta = 25 c ta = 85 c power source voltage v cc = 5 v 50.0 40.0 30.0 20.0 10.0 0 1.0 2.0 3.0 4.0 5.0 v ol [v] i ol [ma] n channel ta = 25 c ta = 85 c power source voltage v c c = 5 v
standard characteristics 7702/7703 group users manual 16C3 16.1 standard characteristics 16.1.2 i cc Cf(x in ) standard characteristics (1) i cc Cf(x in ) characteristics on operating and at reset (2) i cc Cf(x in ) characteristics during wait 4.0 0 5 1015202530 icc [ma] f(x in ) [mhz] measurement condition (vcc = 5 v, ta = 25 ?, f(x in ) : square waveform input, single-chip mode) 3.0 2.0 1.0 10 20 0 5 1015202530 icc [ma] f(x in ) [mhz] on operating at reset measurement condition (v cc = 5 v, ta = 25 ?, f(x in ) : square waveform input, single-chip mode)

chapter 17 applica tion 17.1 memory expansion 17.2 sample program execution rate comparison
application 7702/7703 group users manual 17C2 17.1 memory expansion this chapter describes application. application shown here is just an example. the user shall modify them according to the actual application and test them. 17.1 memory expansion this section shows examples for memory and i/o expansion. refer to chapter 12. connection with external devices for details about the functions and operation of used pins when expanding a memory or i/o. refer to chapter 15. electrical characteristics for timing requirements of the microcomputer. refer to chapter 18. low voltage version for timing requirements and application of the low voltage version. 17.1.1 memory expansion model memory expansion to the external is possible in the memory expansion mode or the microprocessor mode. the level of the external data bus width select signal makes it possible to select the four memory expansion models shown in table 17.1.1. (1) minimum model this is an expansion model of which external data bus width is 8 bits and accessible area is expanded up to 64 kbytes. it is unnecessary to connect the address latch externally. this is an expansion model having the cost priority which is suited for connecting the memory of which external data bus width is 8 bits. (2) medium model a this is an expansion model of which external data bus width is 8 bits and accessible area is expanded up to 16 mbytes. in this expansion model, the high-order 8 bits of the external address bus (a 23 to a 16 ) are multiplexed with the external data bus. accordingly, an n-bit (n 8) address latch is required for latching addresses (n bits of a 23 to a 16 ). (3) medium model b this is an expansion model of which external data bus width is 16 bits and accessible area is expanded up to 64 kbytes. this expansion model is used when having the speed performance priority. in this expansion model, the middle-order 8 bits of the external address bus (a 15 to a 8 ) are multiplexed with the external data bus. accordingly, an 8-bit address latch is required for latching address (a 15 to a 8 ). (4) maximum model this is an expansion model of which external data bus width is 16 bits and accessible area is expanded up to 16 mbytes. in this expansion model, the high- and middle-order 16 bits of the external address bus (a 23 to a 8 ) are multiplexed with the external data bus. accordingly, an 8-bit address latch for latching a 15 to a 8 and an n-bit (n 8) address latch for latching n bits of a 23 to a 16 are required.
application 7702/7703 group users manual 17C3 17.1 memory expansion table 17.1.1 memory expansion model byte byte m37702 byte m37702 byte m37702 a 0 Ca 15 16 d 0 Cd 7 8 a 0 Ca 15 e d 0 Cd 15 8 16 16 dq a 0 Ca 15+n d 0 Cd 7 8 16+n e n dq latch e a 0 Ca 15+n d 0 Cd 15 8 16 n 16+n dq e dq p0 p1 p2 ale bhe m37702 p0 p1 p2 p0 p1 p2 ale ale bhe p0 p1 p2 8-bit width; byte = h notes 1 : refer to chapter 12. connection with external devices about the functions and operation of used pins when expanding a memory. refer to chapter 15. electrical characteristics for timing requirements. 2 : because the address bus width is used as maximum 24 bits when expanding a memory, strengthen the m37702s vss line. (refer to appendix 5. countermeasures against noise. ) external data bus width 16-bit width; byte = l access area maximum 64 kbytes maximum 16 mbytes memory expansion model minimum model latch memory expansion model medium model b memory expansion model medium model a latch latch memory expansion model maximum model
application 7702/7703 group users manual 17C4 17.1 memory expansion parameter f(x in ) 1 5 10 9 f(x in ) 100 + C 125 1.2 5 10 9 f(x in ) C 75 30 + f(x in ) 8 mhz no wait wait 8 mhz < f(x in ) 16 mhz no wait wait 16 mhz < f(x in ) 25 mhz C 30 4 5 10 9 f(x in ) C 30 4 5 10 9 f(x in ) C 30 C 30 2 5 10 9 f(x in ) wait no wait 1 5 10 9 f(x in ) 12 + C 40 C 30 2 5 10 9 f(x in ) 4 5 10 9 f(x in ) C 30 table 17.1.3 data of each parameter (unit: ns) 17.1.2 how to calculate timing when expanding a memory, use a memory of which standard specifications satisfy the address access time and the data setup time for write. the following describes how to calculate each timing. external memorys address access time; t a(ad) t a(ad) = t d(p0a/p1a/p2a-e) + t w(el) C t su(p2d/p1dCe) C (address decode time ] 1 + address latch delay time ] 2 ) t d(p0a/p1a/p2aCe) : t d(p0aCe) , t d(p1aCe) , or t d(p2aCe) t su(p2d/p1dCe) : t su(p2dCe) or t su(p1dCe) address decode time ] 1 : time required for the chip select signal to be enabled after decoding address address latch delay time ] 2 : delay time required when latching address (unnecessary in minimum model) external memorys data setup time for write; t su(d) t su(d) = t w(el) C t d(eCp2q/p1q) t d(eCp2q/p1q) : t d(eCp2q) or t d(eCp1q) table 17.1.2 lists the calculation formulas for each parameter; table 17.1.3 lists the data of each parameter; figure 17.1.1 shows the bus timing diagrams. figures 17.1.2 and 17.1.4 show the relationship between t a(a-d) and f(x in ); figures 17.1.3 and 17.1.5 show the relationship between t su(d) and f(x in ). table 17.1.2 calculation formulas for each parameter (unit: ns) 2 5 10 9 f(x in ) parameter type t d(p0ae) t d(p1ae) t d(p2ae) t w(el) t su(p1de) t su(p2de) t d(ep1q) t d(eCp2q) 25 mhz version 16 mhz version 70 45 45 30
application 7702/7703 group users manual 17C5 17.1 memory expansion t su(p1d-e) e ale t d(p0a-e) t d(p2a-e) t su(p2d-e) t w(el) t d(e-p2q) t d(p1a-e) t d(e-p1q) r/w e ale address low-order t d(p0a-e) t d(p1a-e) t d(p2a-e) t su(p2d-e) t w(el) a 0 Ca 7 a 8 Ca 15 a 16 /d 0 C a 23 /d 7 t d(e-p2q) r/w data data t a(ad) t su(d) t w(el) t a(ad) t su(d) t w(el) a 0 Ca 7 a 8 /d 8 C a 15 /d 15 a 16 /d 0 C a 23 /d 7 : m37702s standard characteristics (the others are the external memorys.) external data bus width = 8 bits (byte = h) external data bus width = 16 bits (byte = l) data data address low-order address middle-order address middle-order address high-order address high-order when writing data when reading data when writing data when reading data data low-order address middle-order data high-order address middle-order address high-order address high-order address low-order address low-order fig. 17.1.1 bus timing diagrams
application 7702/7703 group users manual 17C6 17.1 memory expansion fig. 17.1.2 relationship between t a(ad) and f(x in ) (16 mhz version) fig. 17.1.3 relationship between t su(d) and f(x in ) (16 mhz version) 7 8 9 10 11 12 13 14 15 16 0 50 100 150 200 250 300 350 400 450 500 550 600 650 457 400 352 313 280 251 226 205 614 525 280 235 200 170 146 126 108 93 80 328 275 530 memory access time t a(ad) ] external clock input frequency f(x in ) no wait wait [ns] [mhz] ] address decode time and address latch delay time are not considered. data setup time t su(d) 7 8 9 10 11 12 13 14 15 16 0 50 100 150 200 250 300 350 400 450 500 400 344 300 263 233 207 185 166 150 150 122 100 81 66 53 42 33 25 471 185 [mhz] [ns] external clock input frequency f(x in ) no wait wait
application 7702/7703 group users manual 17C7 17.1 memory expansion fig. 17.1.4 relationship between t a(ad) and f(x in ) (25 mhz version) fig. 17.1.5 relationship between t su(d) and f(x in ) (25 mhz version) 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 100 200 300 400 500 600 700 224 206 189 175 162 150 139 129 120 112 545 472 415 367 328 295 266 241 220 629 540 99 88 78 69 62 54 48 42 37 32 295 250 215 185 161 141 123 108 95 343 290 [ns] [mhz] memory access time t a(ad) ] external clock input frequency f(x in ) no wait wait ] address decode time and address latch delay time are not considered. 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 0 50 100 150 200 250 300 350 400 450 500 496 425 369 325 288 258 232 210 191 175 160 147 135 125 115 106 98 91 85 210 175 147 125 106 91 78 67 58 50 42 36 30 25 20 15 11 8 5 [mhz] [ns] data setup time t su(d) external clock input frequency f(x in ) no wait wait
application 7702/7703 group users manual 17C8 17.1 memory expansion 17.1.3 points in memory expansion (1) reading data figure 17.1.6 shows the timing at which data is read from an external memory. when reading data, the external data bus is placed in a floating state, and data is read from the _ external memory. this floating state is maintained from t pxz(eCp1z/p2) after the falling edge of the e _ signal till t pzx(eCp1z/p2z) after the rising edge of the e signal. table 17.1.4 lists the values of t pxz(eCp1z/p2z) and the formulas to calculate t pzx(eCp1z/p2z) . consider timing during data read to avoid collision between the data being readCin and the preceding or following address output because the external data bus is multiplexed with the external address bus. (refer to (3) precautions on memory expansion. ) fig. 17.1.6 timing at which data is read from an external memory external memory data output ] 1 this applies when the external data bus has a width of 16 bits (byte = l). external memory output enable signal (read signal) oe e external memory chip select signal ce, s ] 2 if one of the external memorys specifications is smaller than t pxz (e-p1z/p2z) , there is a possibility of the tail of address colliding with the head of data. ? refer to (3) precautions on memory expansion. ] 3 if one of the external memorys specifications is greater than t pzx (e-p1z/p2z) , there is a possibility of the tail of data colliding with the head of address. ? refer to (3) precautions on memory expansion. address output and data input a 8 / d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 ] 1 t en (oe) address t pzx (e-p1z/p2z) t su (p1d/p2d-e) : specifications of the m37702 (the others are specifications of external memory.) t a (oe) t a (ce) , t a (s) t df , t dis (oe) ] 2 ] 3 t w(el) data t pxz (e-p1z/p2z) t en (ce) , t en (s) address
application 7702/7703 group users manual 17C9 17.1 memory expansion table 17.1.4 values of t pxz(eCp1z/p2z) and formulas to calculate t pzx(eCp1z/p2z) (unit : ns) parameter f(x in ) t pxz(ep1z) t pxz(ep2z) t pzx(ep1z) t pzx(eCp2z) f(x in ) 8 mhz 8 mhz < f(x in ) 16 mhz 16 mhz < f(x in ) 25 mhz 5 5 5 1 5 10 9 f(x in ) C 30 C 26 1 5 10 9 f(x in ) 1 5 10 9 f(x in ) C 22 note: in the m37702e2axxxfp, the M37702E2AFS, the m37702e4axxxfp, the m37702e4afs, the m37703e2axxxsp, and the m37703e4axxxsp, refer to section 19.5.4 bus timing and eprom mode. (note)
application 7702/7703 group users manual 17C10 17.1 memory expansion (2) writing data figure 17.1.7 shows the timing at which data is written to an external memory. _ when writing data, the output data starts after t d(e-p1q/p2q) passes from falling of the e signal. its _ validated data is output continuously until t h(e-p1q/p2q) passes from rising of the e signal. table 17.1.5 lists the calculation formulas of t h(e-p1q/p2q) . table 17.1.6 lists the constants of t d(e-p1q/p2q) . data output at writing data must satisfy the data set up time, t su(d) , and the data hold time, t h(d) , for write to an external memory. fig. 17.1.7 timing at which data is written to an external memory table 17.1.5 calculation formulas of t h(e-p1q/p2q) (unit: ns) parameter 1 5 10 9 2 5 f(x in ) C 12.5 f(x in ) 8 mhz 1 5 10 9 2 5 f(x in ) C 6.25 8 mhz < f(x in ) 16 mhz 16 mhz < f(x in ) 25 mhz 1 5 10 9 2 5 f(x in ) C 2 f(x in ) t h(ep1q) t h(ep2q) table 17.1.6 constants of t d(e-p1q/p2q) (unit: ns) parameter t d(ep1q) t d(ep2q) 70 45 t su (d) t h (d) address data e w, we external memory chip select signals ce, s t w(el) t h (e-p1q/p2q) (the others are specifications of external memory.) : specifications of the m37702 ] this applies when the external data bus has a width of 16 bits (byte = l). t d (e-p1q/p2q) a 8 /d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 ] address and data output external memory write signals address microcomputer type 25 mhz version 16 mhz version
application 7702/7703 group users manual 17C11 17.1 memory expansion (3) precautions on memory expansion as described in to a below, if specifications of the external memory do not match those of the m37702, some considerations must be incorporated into circuit design as in the following cases: when using an external memory that requires a long access time, t a(ad) when using an external memory that outputs data within t pxz(e-p1z/p2z) after the falling edge of the _ e signal a when using an external memory that outputs data for more than t pzx(e-p1z/p2z) after the rising edge _ of the e signal when using external memory that requires long access time, t a(ad) if the m37702s t su(p1d/p2d-e) cannot be satisfied because the external memory requires a long access time, t a(ad) , examine the method described below. l lower f(x in ). l select software wait. (refer to section 12.2 software wait. ) l use ready function. (refer to section 12.3 ready function. ) figure 17.1.8 shows an example of a ready signal generating circuit (no wait). figure 17.1.9 shows an example of a ready signal generating circuit (with wait). ready function is valid for the internal areas, so that the circuits in figures 17.1.8 and 17.1.9 use ___ the chip select signal (cs 2 ) to specify the area where ready function is valid.
application 7702/7703 group users manual 17C12 17.1 memory expansion m37702m2axxxfp cs 1 a 8 Ca 23 (d 0 Cd 15 ) a 0 Ca 7 ac74 d t q 1 rdy e ac32 ac32 ac04 address bus data bus cs 2 1 e 1 cs 2 q rdy t c t d(e- 1 ) t su(rdy- 1 ) ] address latch circuit address decode circuit circuit condition: f(x in ) 14.5 mhz, no wait insert wait by ready function only for areas accessed by cs 2 . : wait by ready function. :the condition satisfying t su(rdy- 1) 3 60 ns is tc 3 68.5 ns. accordingly, when f(x in ) 14.5 mhz, this circuit example satisfies t su(rdy- 1) 3 60 ns. ] ac32 propagation delay time (max. : 8.5 ns) ] this applies when using the 16 mhz version. fig. 17.1.8 example of ready signal generating circuit (no wait)
application 7702/7703 group users manual 17C13 17.1 memory expansion m37702m2bxxxfp cs 1 a 8 Ca 23 (d 0 Cd 15 ) a 0 Ca 7 1d 1t 1q 1 rdy e f32 f32 address bus data bus address latch circuit address decode circuit cs 2 2d 2t 2q rd f04 f04 f74 ] 1 ] 2 ] 3 1 e cs 2 1q rdy t h( 1 -rdy) 2q : software wait t su(rdy- 1 ) 1 ] 1C ] 3 (f(x in ) = 25 mhz, 25 ns). 2 5 10 f(x in ) Ct su (rdyC 1 ) 9 circuit condition: f(x in ) 25 mhz, wait insert wait by ready function only for areas accessed by cs 2 . : wait by ready function. ] this applies when using the 25 mhz version. use the elements of which sum of propagation delay time is within fig. 17.1.9 example of ready signal generating circuit (wait)
application 7702/7703 group users manual 17C14 17.1 memory expansion _ when using external memory that outputs data within t pxz(e-p1z/p2z) after falling edge of e signal _ because the external memory outputs data within t pxz(e-p1z/p2z) after the falling edge of the e signal, there will be a possibility of the tail of address colliding with the head of data. in this case, __ _ generate the memory read signal (oe) by delaying only the leading edge of the fall of the e. (refer to figure 17.1.10.) fig. 17.1.10 example of causing to delay data output timing note: satisfy t pxz (e-p1z/p2z) t en (oe) +d. if t en (oe) t pxz (e-p1z/p2z) (= 5 ns), ensure a certain time (i.e., d in this diagram) by delaying the falling edge of oe after the falling edge of e . address output external memory data output t pxz (e-p1z/p2z) e oe d address address data t a (oe) t en (oe) external memory output enable signal (read signal) (the others are specifications of external memory.) : specifications of the m37702
application 7702/7703 group users manual 17C15 17.1 memory expansion a when using external memory that outputs data for more than t pzx(e-p1z/p2z) after rising edge of _ e signal because the external memory outputs data for more than t pzx(e-p1z/p2z) after the rising edge of the _ e signal, there will be a possibility of the tail of data colliding with the head of address. in this case, examine the method described below. l cut the tail of data output from the external memory by using a bus buffer and others. l use the mitsubishis memories that can be connected without a bus buffer. figures 17.1.11 to 17.1.14 show examples for how to use a bus buffer and the timing diagrams. table 17.1.7 lists the memories that can be connected without a bus buffer. these memories do not require a bus buffer because timing parameters t df and t dis(oe) listed below are guaranteed. _ (however, the read signal must go high within 10 ns after the rising edge of e signal.) table 17.1.7 memories that can be connected without bus buffer type description m5m27c256ak-85, -10, -12, -15 m5m27c512ak-10, -12, -15 m5m27c100k-12. -15 m5m27c101k-12, -15 m5m27c102k-12, -15 m5m27c201k, jk-10, -12, -15 m5m27c202k, jk-10, -12, -15 m5m27c256ap, fp, vp, rv-12, -15 m5m27c512ap, fp-15 m5m27c100p-15 m5m27c101p, fp, j, vp, rv-15 m5m27c102p, fp, j, vp, rv-15 m5m27c201p, fp, j, vp, rv-12, -15 m5m27c202p, fp, j, vp, rv-12, -15 m5m28f101p, fp, j, vp, rv-10, -12, -15 m5m28f102fp, j, vp, rv-10, -12, -15 m5m5256cp, fp, kp, vp, rv-55ll, -55xl, -70ll, -70xl, -85ll, -85xl, -10ll, -10xl m5m5278cp, fp, j-20, -20l m5m5278cp, fp, j-25, -25l m5m5278dp, j-12 m5m5278dp, fp, j-15, -15l m5m5278dp, fp, j-20, -20l memory eprom one-time prom frash memory sram conditions f(x in ) 20 mhz f(x in ) 25 mhz t df /t dis(oe) (maximum) 15 ns (guaranteed by kit) (note) 8 ns 10 ns 6 ns 7 ns 8 ns note: when the user needs a specification of the memories listed above, add the comment t df /t dis(oe) 15 ns product, microcomputer and kit.
application 7702/7703 group users manual 17C16 17.1 memory expansion fig. 17.1.11 example for using bus buffer (1) f245 byte a 8 /d 8 a 15 /d 15 25 mhz data bus (odd) le dq oe ac573 dir ab le dq oe ac573 ale a 1 ? 7 address bus m37702 dir ab e a 0 r/w bhe bc32 ac04 rd wo we ac32 x in x out circuit condition: wait f245 ] 2 ] 2 ] 3 a 16 /d 0 a 23 /d 7 ] 1 cnv ss ] 4 oc oc data bus (even) ] 1: use the elements of which propagation delay time is within 20 ns. ] 2, ] 3 : use the elements of which sum of output disable time in ] 2 and propagation delay time in ] 3 is within 18 ns and the sum of output enable time in ] 2 and propagation delay time in ] 3 is 5 ns or more. ] 4: use the elements of which propagation delay time is within 12 ns.
applica tion 7702/7703 group users manual 17C17 17.1 memory expansion a 8 /d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 e oc (f245), rd 5 (max.) 130 (min.) 18 (min.) bc32 (t phl ) bc32 (t plh ) d a a f245 (t phz /t plz ) f245 (t pzh /t pzl ) a 8 /d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 e 130 (min.) bc32 (t plh ) d a d f245 (t phl /t plh ) (unit : ns) f245 (t phz /t plz ) oc (f245), wo, we 45 (max.) bc32 (t phl ) external memory data output a (f245) external memory data output b (f245) fig. 17.1.12 timing chart for sample circuit using bus buffe rs (1) a
application 7702/7703 group users manual 17C18 17.1 memory expansion fig. 17.1.13 example for using bus buffer (connecting with memory requiring a long hold time for write) als245a byte e 16 mhz data bus (even) data bus (odd) le dq oe ac573 oc dir ab le dq oe ac573 ale a 1 Ca 7 address bus dir ab a 0 r/w bhe ac32 ac04 rd we wo 1d1q 1t 2d 2q 2t 1 ac74 ac32 ac04 x in x out als245a a 8 /d 8 C a 15 /d 15 m37702 a 16 /d 0 C a 23 /d 7 ] 1 ] 2 cnv ss ] 2 oc 1 this is the circuit that extends the write hold time by making the rising of the write signal 1/2 1 clock earlier. circuit condition : wait ] 1: use the elements of which propagation delay time is within 30 ns. ] 2: use the elements of which output enable time is 5 ns or more and output disable time is within 36 ns.
application 7702/7703 group users manual 17C19 17.1 memory expansion fig. 17.1.14 timing chart for sample circuit using bus buffers (2) a 8 /d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 rd 5 (max.) 220 (min.) 36 (min.) ac32 (t phl ) ac32 (t plh ) d a als245a (t phz /t plz ) e, oc (als245a) als245a (t pzh /t pzl ) (unit : ns) d a d ac32 5 2 (t plh ) als245a (t phz /t plz ) a 8 /d 8 Ca 15 /d 15 a 16 /d 0 Ca 23 /d 7 wo, we 2q(ac74) 1q (ac74) e, oc (als245a) ac04 (t plh )+ac74 (t plh ) 70 (max.) als245a (t phl /t plh ) 220 (min.) 1 1 external memory data output a (als245a) write hold time external memory data output b (als245a) a
application 7702/7703 group users manual 17C20 17.1 memory expansion 17.1.4 example of memory expansion (1) example of sram expansion (minimum model) figure 17.1.15 shows a memory expansion example (minimum model) using a 32-kbyte sram in the memory expansion mode. figure 17.1.16 shows the timing chart for this example. fig. 17.1.15 example of sram expansion (minimum model) d 0 ? 7 ac32 25 mhz x in x out m37702m4b byte r/w e open bhe a 0 ? 14 oe s m5m5256cp-70ll a 15 cnv ss we 0880 16 sfr area internal ram area external ram area (m5m5256cp) memory map ] 2 0000 16 0080 16 ac32 ] 1 a 0 ? 14 d 0 ? 7 ] 1, ] 2: use the elements of which propagation delay time is within 18 ns. ffff 16 8000 16 circuit condition : wait internal rom area
application 7702/7703 group users manual 17C21 17.1 memory expansion fig. 17.1.16 timing chart for sram expansion example (minimum model) d 0 ? 7 external ram data output (a) (a) d s t a (ad) 130 (min.) 12 (min.) 5 (max.) 18 (min.) t a (oe) t su (p2d-e) 3 30 15 (max.) (kit guaranteed) e, oe ac32 (t plh ) ac32 (t phl ) t a (s) e, oe a 0 ? 14 aa d 0 ? 7 s (a) (a) we d 130 (min.) t su (d) 3 30 ac32 (t phl ) ac32 (t plh ) 45 (max.) 18 (min.) ac32 (t plh ) ac32 (t phl ) a 0 ? 14 a (unit : ns)
application 7702/7703 group users manual 17C22 17.1 memory expansion (2) example of rom expansion (maximum model) figure 17.1.17 shows a memory expansion example (maximum model) using a 2-mbits rom in the microprocessor mode. figure 17.1.18 shows the timing chart for this example. fig. 17.1.17 example of rom expansion (maximum model) a 0 a 16 m5m27c202k-10 oe a 1 ? 7 ac04 25 mhz x in x out m37702s1b byte data bus a 1 ? 17 address bus a 16 /d 0 , a 17 /d 1 ale d 1 ? 7 e r/w a 8 /d 8 a 15 /d 15 ac573 ce d 0 ? 15 d 0 d 15 a 8 ? 15 0000 16 0080 16 sfr ar ea internal ram area external rom area (m5m27c202k) memory map q le d cnv ss [ 2 [ 1 ac573 q le d a 16 , a 17 3ffff 16 0280 16 circuit condition : wait ] 1: use the elements of which propagation delay time is within 12 ns. ] 2: use the elements of which propagation delay time is within 20 ns.
application 7702/7703 group users manual 17C23 17.1 memory expansion a 8 /d 8 Ca 15 /d 15 a 16 /d 0 a 130 (min.) 12 (min.) t a (ad) +ac573 (t phl /t plh ) ce t a (oe) r/w 20 (min.) t a (ce) ac04 (t phl ) 18 (min.) a 5 (max.) d (kit guaranteed) t su (p1d/p2d-e) 3 30 18 (max.) e, oe ac04 (t plh ) 15 (max.) (unit : ns) external rom data output fig. 17.1.18 timing chart for rom expansion example (maximum model)
application 7702/7703 group users manual 17C24 17.1 memory expansion (3) example of rom and sram expansion (maximum model) figure 17.1.19 shows a memory expansion example (maximum model) using two 32-kbyte rom and two 32-kbyte sram in the microprocessor mode. figure 17.1.20 shows the timing diagram for this example. fig. 17.1.19 example of rom and sram expansion (maximum model) 0000 16 0080 16 external rom area (m5m27c256ak 5 2) sfr area internal ram area external ram area (m5m5256cp 5 2) memory map ac32 ac04 20 mhz x in x out m37702s1b byte a16 a8 C a15 data bus (odd) ac573 dq le ac32 ac04 rd d0 C d7 d8 C d15 address bus wo a 0 Ca 14 d 0 Cd 7 m5m27c256ak-15 a1 C a15 d 0 Cd 7 oe a 0 Ca 14 ce a1 C a15 s s a 0 Ca 14 a 0 Ca 14 dq 1 Cdq 8 dq 1 Cdq 8 oe w oe w a1 C a15 a1 C a15 d0 C d7 m5m5256cp-70ll oe d8 C d15 ce we a 1 Ca 7 a 8 /d 8 C a 15 /d 15 ale a 16 /d 0 d 1 Cd 7 r/w e a 0 bhe cnv ss [ 2 [ 1 ] 3 ac573 dq le [ 2 1ffff 16 10000 16 0280 16 data bus (even) circuit condition : wait ] 1, ] 2 : use the elements of which sum of propagation delay time is within 92 ns. ] 2: use the elements of which propagation delay time is within 12 ns. ] 3: use the elements of which propagation delay time is within 13 ns.
application 7702/7703 group users manual 17C25 17.1 memory expansion a 1 ? 7 aa e a 8 / d 8 ? 15 / d 15 a 16 / d 0 , d 1 ? 7 s aa d 170 (min.) 45 (max.) 22 (min.) ac32 (t phl ) t su (d) 3 30 (unit: ns) we, wo ac573 (t phl )+ac04 (t phl ) ac32 (t plh ) a 8 / d 8 ? 15 / d 15 a 16 / d 0 external memory data output aa d e 170 (min.) 22 (min.) 5 (max.) 28 (min.) (kit guaranteed) t a (ad) , t a (ce) t su (p1d/p2d-e) 3 30 t a (s) oe ac32 (t plh ) a 1 ? 7 aa ce, s t a (oe) ac04 (t phl ) ac573 (t phl ) ce s ac32 (t phl ) 15 (max.) 23 (min.) fig. 17.1.20 timing diagram for rom and sram expansion example (maximum model)
application 7702/7703 group users manual 17C26 17.1 memory expansion 17.1.5 example of i/o expansion (1) example of port expansion circuit using m66010fp figure 17.1.21 shows an example of a port expansion circuit using the m60010fp. use 1.923 mhz or less frequency for serial i/o transfer clock. serial i/o control in this expansion example is described below. in this example, 8-bit data transmission/reception is performed 3 times by using uart0 and 24-bit port expansion is realized. setting of uart0 is described below. l clock synchronous serial i/o mode; transmission/reception enable state l selected internal clock. transfer clock frequency of 1.5625 mhz. l lsb first the control procedure is described below. output l level from port p4 5 . (expansion i/o ports of m66010fp become floating state by this signal.) output h level from port p4 5 . a output l level from port p4 4 . ? transmit/receive 24-bit data by using uart0. ? output h level from port p4 4 . figure 17.1.22 shows serial transfer timing between m37702 and m66010fp.
application 7702/7703 group users manual 17C27 17.1 memory expansion fig. 17.1.21 example of port expansion circuit using m60010fp 25 mhz txd 0 rxd 0 clk 0 p4 4 p4 5 rts 0 m37702 x in x out di do clk cs s v cc gnd cnv ss byte m66010fp d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 a 0 Ca 7 a 8 /d 8 C a 15 /d 15 a 16 /d 0 C a 23 /d 7 ale e f 1 r/w bhe open expanded i/o port f 2 2 (3 + 1) circuit condition: ?uart0 used in clock synchronous serial i/o mode ?internal clock selected ?frequency of transfer clock = = 1.5625 mhz
application 7702/7703 group users manual 17C28 17.1 memory expansion fig. 17.1.22 serial transfer timing between m37702 and m66010fp do1 do2 do3 do4 do5 do6 do7 do8 do20 do21 do22 do23 do24 di1 di2 di3 di4 di5 di6 di7 di8 di20 di21 di22 di23 di24 di1 di2 di24 s cs clk di do expanded i/o port do24 do2 do1 C d1 d2 d24 p4 5 p4 4 clk 0 t x d 0 r x d 0 expanded i/o port expanded i/o port terminating floating of expanded i/o ports inputting data of expanded i/o ports to shift register 1 inputting serial data to shift register 2 serial outputting data of shift register 1 ] expanded i/o ports are n-channel open-drain output type. : m37702s pin name (the others are m66010fps pin name and operation.) outputting data of shift register 2 to expanded i/o ports
applica tion 7702/7703 group users manual 17C29 17.2 sample program execution rate comparison 17.2 sample program execution rate comparison sample program execution rates are compared in this paragrap h. the execution time ratio depends on the program or the usage conditions. 17.2.1 difference depending on data bus width and software w ait internal areas are always accessed at 16-bit data bus width and without software wait. in the external areas, the external data bus width and software wait are sel ectable. table 17.2.1 lists the sample program (refer to figure 17.2.1) execution time ratio depending on t hese selection and used memory areas. table 17.2.1 sample program execution time ratio (external d ata bus width and software wait) memory area ram internal internal external rom internal external external external data bus width (bit) software wait sample program execution time ratio sample b 1.00 1.00 1.10 1.08 1.46 1.00 1.17 1.13 1.65 0.90 sample a 1.00 1.00 1.17 1.19 1.67 1.00 1.25 1.19 1.78 0.92 (16) 16 8 16 8 (nothing) nothing inserted nothing inserted nothing inserted nothing inserted calculation value ] calculation value ] : the value is calculated from the shortest execution cycle number of each instruction described in the software manual.
application 7702/7703 group users manual 17C30 17.2 sample program execution rate comparison fig. 17.2.1 sample program list sep m,x lda.b a,#0 sta a,dest+64 sta a,dest+65 sta a,dest+66 ldx.b #63 lda a,sour,x tay and.b a,#00000011b sta a,dest,x tya and.b a,#00001100b ora a,dest+1,x sta a,dest+1,x tya and.b a,#00110000b ora a,dest+2,x sta a,dest+2,x tya and.b a,#11000000b ora a,dest+3,x sta a,dest+3,x dex bpl italic italic: sep x clm .data 16 .index 8 ldy #69 ldx #69 asl sour,x sem .data 8 rol sour+2,x rol b clm .data 16 ror a dex dex dex bne loop1 sta a,dest,y sem .data 8 sta b,dest+2,y clm .data 16 dey dey dey bne loop0 loop0: loop1: sample a sample b ] sour, dest : work area (direct page area : access this area at the following mode.) ?irect addressing mode ?irect indexed x addressing mode ?bsolute indexed y addressing mode
application 7702/7703 group users manual 17C31 17.2 sample program execution rate comparison 17.2.2 comparison software wait (f(x in ) = 20 mhz) with software wait + ready (f(x in ) = 25 mhz) the following condiitons and are compared. refer to figure 17.2.1 about executed sample program. the execution time ratio depends on the program or the usage conditions. condition : when selecting software wait and f(x in ) = 20 mhz condition : when selecting software wait and f(x in ) = 25 mhz and inserting a wait which is 1 cycle of f (inserting total wait of 2 cycles of f ). table 17.2.2 comparison condition item processor mode f(x in ) external data bus width software wait ready program area work area condition microprocessor mode 20 mhz 16 bits inserted invalid external eprom internal or external sram condition microprocessor mode 25 mhz 16 bits inserted valid only to external eprom areas external eprom internal or external sram fig. 17.2.2 memory allocation at execution rate comparison external sram sfr area condition ready valid area insert wait of 5 2 cycles at access (including software wait) m37702 memory map internal sram program area external eprom software wait valid area specify either area as the work area
application 7702/7703 group users manual 17C32 17.2 sample program execution rate comparison figure 17.2.3 shows that there is almost no difference between conditions and about the execution time. the bus buffers become unnecessary by using the specific memory. (see table 17.1.7.) consequently, the case selecting f(x in ) = 20 mhz and inserting software wait is superior in the cost performance. 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 1.10 1.04 1.01 1.00 1.00 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 1.10 1.05 1.03 1.00 1.00 : condition : condition execution time ratio in sample b execution time ratio in sample a work area = internal ram work area = external ram work area = internal ram work area = external ram fig. 17.2.3 execution time ratio
chapter 18 low voltage version 18.1 performance overview 18.2 pin configuration 18.3 functional description 18.4 electrical characteristics 18.5 standard characteristics 18.6 application
low voltage version 7702/7703 group users manual 18C2 the low voltage version has the following characteristics: ? low power source voltage (2.7 to 5.5 v) ? wide operating temperature range (C40 to 85 c) the low voltage version is suitable to control equipment which is required to process a large amount of data with a low power dissipation, for example portable equipment which is driven by a battery and oa equipment. differences between the m37702m2lxxxgp and the m37702m2bxxxfp are mainly described below. for the eprom mode of the prom version, refer to chapter 19. prom version.
low voltage version 7702/7703 group users manual 18C3 input/output withstand voltage output current 18.1 performance overview 18.1 performance overview table 18.1.1 shows the performance overview of the m37702m2lxxxgp. table 18.1.1 m37702m2lxxxgp performance overview functions 103 500 ns (the minimum instruction at f(x in ) = 8 mhz) 8 mhz (maximum) 16384 bytes 512 bytes 8 bits 5 8 4 bits 5 1 16 bits 5 5 16 bits 5 3 (uart or clock synchronous serial i/o) 5 2 8-bit successive approximation method 5 1 (8 channels) 12 bits 5 1 3 external, 16 internal (priority levels 0 to 7 can be set for each interrupt with software) built-in (externally connected to a ceramic resonator or a quartz-crystal oscillator) 2.7 C 5.5 v 12 mw (at supply voltage = 3 v, f(x in ) = 8 mhz frequency) 30 mw (at supply voltage = 5 v, f(x in ) = 8 mhz frequency) 5 v 5 ma maximum 16 mbytes C40c to 85c cmos high-performance silicon gate process 80-pin plastic molded qfp parameters number of basic instructions instruction execution time external clock input frequency f(x in ) memory size programmable input/output ports multifunction timers serial i/o a-d converter watchdog timer interrupts clock generating circuit supply voltage power dissipation port input/output characteristics memory expansion operating temperature range device structure package rom ram p0Cp2, p4Cp8 p3 ta0Cta4 tb0Ctb2 uart0, uart1 note: low voltage versions except the m37702m2lxxxgp are the same except for the package type, memory type, and memory size.
low voltage version 7702/7703 group users manual 18C4 18.2 pin configuration figure 18.2.1 shows the m37702m2lxxxgp and the m37702m2lxxxhp pin configuration. figure 18.2.2 shows the m37702m4lxxxfp pin configuration. 18.2 pin configuration p3 2 /ale p3 1 /bhe p3 3 /hlda x out e cnv ss reset p4 0 /hold 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 outline m37702m2lxxxgp ? ? ? ? ? ? 80p6s-a p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 60 59 58 75 74 73 72 71 69 68 67 66 65 70 80 79 78 77 76 64 63 62 61 30 26 27 28 29 31 32 33 34 35 36 21 23 22 24 25 37 38 39 40 p4 1 /rdy p4 2 / 1 byte x in v ss p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p2 3 /a 19 /d 3 p2 2 /a 18 /d 2 p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 7 p8 5 /clk 1 p8 4 /cts 1 /rts 1 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad trg p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 p7 0 /an 0 p6 7 /tb2 in m37702m2lxxxgp or m37702m2lxxxhp p4 3 p4 4 p4 5 p4 6 ] ] ] 1 2 3 4 5 outline m37702m2lxxxhp ? ? ? ? ? ? 80p6d-a ] ] : the m37702m2lxxxgp and the m37702m2lxxxhp have the pin configuration shifted to 2 pins assignment from the m37702m2bxxxfp. fig. 18.2.1 m37702m2lxxxgp and m37702m2lxxxhp pin configuration (top view)
low voltage version 7702/7703 group users manual 18C5 18.2 pin configuration fig. 18.2.2 m37702m4lxxxfp pin configuration (top view) 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 0 /hold byte cnv ss reset x in x out e v ss p3 3 /hlda p3 2 /ale p3 1 /bhe p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p7 4 /an 4 p7 5 /an 5 p7 6 /an 6 p7 7 /an 7 /ad trg v ss av ss v ref av cc v cc p8 0 /cts 0 /rts 0 p8 1 /clk 0 p8 2 /r x d 0 p8 3 /t x d 0 p8 4 /cts 1 /rts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 1 4 3 2 5 6 7 8 9 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 outline: 80p6n-a p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 p2 2 /a 18 /d 2 p2 3 /a 19 /d 3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 m37702m4lxxxfp 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 p4 1 /rdy p4 7 p4 6 p4 5 p4 4 p4 3 p4 2 / 1 p7 1 /an 1 p7 2 /an 2 p7 3 /an 3
low voltage version 7702/7703 group users manual 18C6 18.3 functional description 18.3 functional description the m37702m2lxxxgp has the same functions as the m37702m2bxxxfp except for the power-on reset conditions. power-on reset conditions are described below. for the other functions, refer to chapters 2. central processing unit to 14. clock generating circuit.
low voltage version 7702/7703 group users manual 18C7 18.3.1 power-on reset conditions figure 18.3.1 shows the power-on reset conditions and figure 18.3.2 shows an example of power-on reset circuit. for details of reset, refer to chapter 13. reset. fig. 18.3.1 power-on reset conditions 18.3 functional description fig. 18.3.2 example of power-on reset circuit 0 v 0 v v cc reset power-on 2.7 v 0.55 v ] in the case of c d = 0.07 f, delay time td is about 10 ms. v cc c d int gnd reset reset v cc c d 5 v m62003l m37702m2lxxxgp t d ? 0.152 5 c d [ s], c d : [ f ] int i (i = 0C2) ] (interrupt signal) (reset signal)
low vol t age version 7702/7703 group users manual 18C8 18.4 electrical characteristics 18.4 electrical characteristics the electrical characteristics of m37702m2lxxxgp and m37702m 2lxxxhp is described below. for the latest data, inquire of addresses described last ( contact addresses for further information) . 18.4.1 absolute maximum ratings absolute maximum ratings parameter power source voltage analog power source voltage input voltage input voltage output voltage power dissipation operating temperature storage temperature conditions ta = 25 c ta = 25 c unit v v v v v mw c c ratings C0.3 to 7 C0.3 to 7 C0.3 to 12 C0.3 to vcc+0.3 C0.3 to v cc +0.3 300 200 C40 to 85 C65 to 150 reset , cnv ss , byte p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , v ref , x in p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x out , _ e symbol v cc av cc v i v i v o p d t opr t stg m37702m2lxxxgp m37702m2lxxxhp
low volt age version 7702/7703 group users manual 18C9 18.4.2 recommended operating conditions recommended operating conditions (v cc = 2.7 C 5.5 v, ta = C40 to 85 c, unless otherwise noted) 18.4 electrical characteristics v v v v v v v v v v ma ma ma ma mhz power source voltage analog power source voltage power source voltage analog power source voltage high-level input voltage high-level input voltage high-level input voltage low-level input voltage low-level input voltage low-level input voltage high-level peak output current high-level average output current low-level peak output current low-level average output current external clock input frequency v cc av cc v ss av ss v ih v ih v ih v il v il v il i oh (peak) i oh (avg) i ol (peak) i ol (avg) f(x in ) parameter symbol limits min. max. 5.5 2.7 v cc 0 0 typ. unit v cc v cc v cc 0.2v cc 0.2v cc 0.16v cc C10 C5 10 5 8 0.5v cc 0 0 0 p0 0 Cp0 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p1 0 Cp1 7 , p2 0 Cp2 7 (in single-chip mode) p1 0 Cp1 7 , p2 0 Cp2 7 (in memory expansion mode and microprocessor mode) p0 0 Cp0 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p1 0 Cp1 7 , p2 0 Cp2 7 (in single-chip mode) p1 0 Cp1 7 , p2 0 Cp2 7 (in memory expansion mode and microprocessor mode) p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 3 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 3 , p5 4 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 0.8v cc 0.8v cc notes 1: average output current is the average value of a 100 ms int erval. 2: the sum of i ol (peak) for ports p0, p1, p2, p3, and p8 must be 80 ma or les s, the sum of i oh (peak) for ports p0, p1, p2, p3, and p8 must be 80 ma or les s, the sum of i ol (peak) for ports p4, p5, p6, and p7 must be 80 ma or less, a nd the sum of i oh (peak) for ports p4, p5, p6, and p7 must be 80 ma or less.
low voltage version 7702/7703 group users manual 18C10 high-level output voltage high-level output voltage high-level output voltage high-level output voltage low-level output voltage low-level output voltage low-level output voltage low-level output voltage hysteresis hysteresis hysteresis high-level input current low-level input current ram hold voltage power source current 18.4.3 electrical characteristics electrical characteristics (v cc = 5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) 18.4 electrical characteristics symbol parameter test conditions min. max. v v v v v v v v v v v v m a m a v ma m a m a unit 2 0.5 0.45 1.9 0.43 0.4 1.6 0.4 0.4 1 0.7 0.5 0.4 0.3 0.2 5 4 C5 C4 12 8 1 20 typ. limits p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 p3 2 e p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 , p3 1 , p3 3 p3 2 e reset x in p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte p0 0 Cp0 7 , p1 0 Cp1 7 , p2 0 Cp2 7 , p3 0 Cp3 3 , p4 0 Cp4 7 , p5 0 Cp5 7 , p6 0 Cp6 7 , p7 0 Cp7 7 , p8 0 Cp8 7 , x in , reset , cnv ss , byte hold , rdy , ta0 in Cta4 in , tb0 in Ctb2 in , int 0 C int 2 , ad trg , cts 0 , cts 1 , clk 0 , clk 1 v oh v oh v oh v oh v ol v ol v ol v ol v t+ Cv tC v t+ Cv tC v t+ Cv tC i ih i il v ram i cc v cc = 5 v, i oh = C10 ma v cc = 3 v, i oh = C1 ma v cc = 5 v, i oh = C400 a v cc = 5 v, i oh = C10 ma v cc = 5 v, i oh = C400 m a v cc = 3 v, i oh = C1ma v cc = 5 v, i oh = C10 ma v cc = 5 v, i oh = C400 m a v cc = 3 v, i oh = C1ma v cc = 5 v, i ol = 10 ma v cc = 3 v, i ol = 1 ma v cc = 5 v, i ol = 2 ma v cc = 5 v, i ol = 10 ma v cc = 5 v, i ol = 2 ma v cc = 3 v, i ol = 1 ma v cc = 5 v, i ol = 10 ma v cc = 5 v, i ol = 2 ma v cc = 3 v, i ol = 1 ma v cc = 5 v v cc = 3 v v cc = 5 v v cc = 3 v v cc = 5 v v cc = 3 v v cc = 5 v, v i = 5 v v cc = 3 v, v i = 3 v v cc = 5 v, v i = 0 v v cc = 3 v, v i = 0 v when clock is stopped. in single-chip mode, output pins are open, and the other pins are connected to v ss . f(x in ) = 8 mhz ta = 25 c , when clock is stopped ta = 85 c , when clock is stopped v cc = 3 v v cc = 5 v 3 2.5 4.7 3.1 4.8 2.6 3.4 4.8 2.6 0.4 0.1 0.2 0.1 0.1 0.06 2 6 4
low voltage version 7702/7703 group users manual 18C11 18.4.4 a-d converter characteristics a-d converter characteristics (v cc = av cc = 2.7 C 5.5 v, v ss = av ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) unit parameter resolution absolute accuracy ladder resistance conversion time reference voltage analog input voltage test conditions v ref = v cc v ref = v cc v ref = v cc limits min. 2 28.5 2.7 0 typ. max. 8 3 10 v cc v ref bits lsb k s v v 18.4 electrical characteristics symbol r ladder t conv v ref v ia
low voltage version 7702/7703 group users manual 18C12 18.4.5 internal peripheral devices timing requirements (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) 18.4 electrical characteristics timer a input (count input in event counter mode) tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width t c(ta) t w(tah) t w(tal) ns ns ns min. 250 125 125 max. limits unit parameter symbol timer a input (gating input in timer mode) ns ns ns t c(ta) t w(tah) t w(tal) tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width max. min. note: tai in input cycle time must be 4 cycles or more of count source, tai in input high-level pulse width must be 2 cycles or more of count source, tai in input low-level pulse width must be 2 cycles or more of count source. 1000 500 500 limits unit symbol parameter timer a input (external trigger input in one-shot pulse mode) max. min. ns ns ns tai in input cycle time tai in input high-level pulse width tai in input low-level pulse width t c(ta) t w(tah) t w(tal) 500 250 250 limits unit data formula (minimum) symbol parameter 4 5 10 9 f(x in ) timer a input (external trigger input in pulse width modulation mode) max. min. 250 250 tai in input high-level pulse width tai in input low-level pulse width ns ns t w(tah) t w(tal) limits unit symbol parameter timer a input (up-down input in event counter mode) max. min. t c(up) t w(uph) t w(upl) t su(upCt in ) t h(t in Cup) tai out input cycle time tai out input high-level pulse width tai out input low-level pulse width tai out input setup time tai out input hold time ns ns ns ns ns 5000 2500 2500 1000 1000 limits unit parameter symbol data formula (minimum) 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in )
low voltage version 7702/7703 group users manual 18C13 timer a input (two-phase pulse input in event counter mode) 18.4 electrical characteristics min. 2000 500 500 max. limits unit parameter symbol ns ns ns t c(ta) t su(taj in Ctaj out ) t su(taj out Ctaj in ) taj in input cycle time taj in input setup time taj out input setup time
low voltage version 7702/7703 group users manual 18C14 18.4 electrical characteristics l count input in event counter mode l gating input in timer mode l external trigger input in one-shot pulse mode l external trigger input in pulse width modulation mode test conditions ? v cc = 2.7C5.5 v ? input timing voltage : v il = 0.2 v, v ih = 0.8 v tai in input t c(ta) t w(tah) t w(tal) tai out input (up-down input) t c(up) t w(uph) t w(upl) tai in input (selecting falling count) tai in input (selecting rising count) tai out input (up-down input) t h(t in Cup) t su(upCt in ) t su(taj in Ctaj out ) taj in input taj out input t su(taj out Ctaj in ) t su(taj in Ctaj out ) t su(taj out Ctaj in ) internal peripheral devices l up-down input, count input in event counter mode l two-phase pulse input in event counter mode t c(ta)
low voltage version 7702/7703 group users manual 18C15 timer b input (count input in event counter mode) 18.4 electrical characteristics min. max. t c(tb) t w(tbh) t w(tbl) t c(tb) t w(tbh) t w(tbl) ns ns ns ns ns ns tbi in input cycle time (one edge count) tbi in input high-level pulse width (one edge count) tbi in input low-level pulse width (one edge count) tbi in input cycle time (both edges count) tbi in input high-level pulse width (both edges count) tbi in input low-level pulse width (both edges count) 250 125 125 500 250 250 unit limits symbol parameter timer b input (pulse period measurement mode) tbi in input cycle time tbi in input high-level pulse width tbi in input low-level pulse width t c(tb) t w(tbh) t w(tbl) note: tbi in input cycle time must be 4 cycles or more of count source, tbi in input high-level pulse width must be 2 cycles or more of count source, tbi in input low-level pulse width must be 2 cycles or more of count source. max. min. 1000 500 500 ns ns ns max. limits unit data formula symbol parameter 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in ) timer b input (pulse width measurement mode) min. t c(tb) t w(tbh) t w(tbl) tbi in input cycle time tbi in input high-level pulse width tbi in input low-level pulse width note: tbi in input cycle time must be 4 cycles or more of count source, tbi in input high-level pulse width must be 2 cycles or more of count source, tbi in input low-level pulse width must be 2 cycles or more of count source. max. min. 1000 500 500 ns ns ns a-d trigger input max. t c(ad) t w(adl) ns ns 2000 250 limits unit parameter ad trg input cycle time (minimum allowable trigger) ad trg input low-level pulse width symbol limits unit data formula 8 5 10 9 f(x in ) 4 5 10 9 f(x in ) 4 5 10 9 f(x in ) parameter symbol
low voltage version 7702/7703 group users manual 18C16 18.4 electrical characteristics serial i/o min. max. 170 ns ns ns ns ns ns ns clk i input cycle time clk i input high-level pulse width clk i input low-level pulse width txd i output delay time txd i hold time rxd i input setup time rxd i input hold time t c(ck) t w(ckh) t w(ckl) t d(cCq) t h(cCq) t su(dCc) t h(cCd) 500 250 250 0 80 100 limits unit parameter symbol external interrupt int i input ns ns min. 250 250 max. int i input high-level pulse width int i input low-level pulse width t w(inh) t w(inl) unit parameter symbol limits
low voltage version 7702/7703 group users manual 18C17 18.4 electrical characteristics internal peripheral devices tbi in input t c(tb) t w(tbh) t w(tbl) t c(ad) t w(adl) ad trg input t w(inl) t w(inh) int i input t c(ck) t w(ckh) t w(ckl) t h(c?) t su(d?) clk i input txd i input rxd i input t d(c?) t h(c?) test conditions ? cc = 2.7?.5 v ?nput timing voltage ?utput timing voltage : v il = 0.2 v, v ih = 0.8 v : v ol = 0.8 v, v oh = 2.0 v
low voltage version 7702/7703 group users manual 18C18 18.4.6 ready and hold timing requirements (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) 18.4 electrical characteristics max. min. t su(rdyC f 1 ) t su(holdC f 1 ) t h( f 1 Crdy) t h( f 1 Chold) rdy input setup time hold input setup time rdy input hold time hold input hold time ns ns ns ns 90 90 0 0 unit symbol parameter limits switching characteristics (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) max. min. ns 120 hlda output delay time note: for test conditions, refer to figure 18.4.1. t d( f 1 Chlda) limits unit symbol parameter
low voltage version 7702/7703 group users manual 18C19 18.4 electrical characteristics test conditions ?v cc = 2.7C5.5 v ?input timing voltage: v il = 0.2 v, v ih = 0.8 v ?output timing voltage: v ol = 0.8 v, v oh = 2.0 v 1 with no wait 1 with wait rdy input l ready e output e output rdy input t su(rdyC 1 ) t h( 1 Crdy) t su(rdyC 1 ) t h( 1 Crdy)
low voltage version 7702/7703 group users manual 18C20 18.4 electrical characteristics test conditions ?v cc = 2.7C5.5 v ?input timing voltage : v il = 0.2 v, v ih = 0.8 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v 1 hold input hlda output t h( 1 Chold) t d( 1 Chlda) l hold t d( 1 Chlda) t su(holdC 1 )
low voltage version 7702/7703 group users manual 18C21 18.4 electrical characteristics 18.4.7 single-chip mode timing requirements (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns t c t w(h) t w(l) t r t f t su(p0dCe) t su(p1dCe) t su(p2dCe) t su(p3dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp0d) t h(eCp1d) t h(eCp2d) t h(eCp3d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p0 input setup time port p1 input setup time port p2 input setup time port p3 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p0 input hold time port p1 input hold time port p2 input hold time port p3 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time 20 20 125 50 50 300 300 300 300 300 300 300 300 300 0 0 0 0 0 0 0 0 0 min. max. limits unit parameter symbol switching characteristics (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, unless otherwise noted) max. min. 300 300 300 300 300 300 300 300 300 ns ns ns ns ns ns ns ns ns t d(eCp0q) t d(eCp1q) t d(eCp2q) t d(eCp3q) t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) port p0 data output delay time port p1 data output delay time port p2 data output delay time port p3 data output delay time port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time limits parameter symbol unit note: for test conditions, refer to figure 18.4.1.
low voltage version 7702/7703 group users manual 18C22 18.4 electrical characteristics t d(eCp0q) t su(p0dCe) t h(eCp0d) t d(eCp1q) t su(p1dCe) t h(eCp1d) t d(eCp2q) t su(p2dCe) t h(eCp2d) t d(eCp3q) t su(p3dCe) t h(eCp3d) t w(h) t c t r t f e port p0 output port p0 input port p1 output port p1 input port p2 output port p2 input port p3 output port p3 input f(x in ) t d(eCp4q) t su(p4dCe) t h(eCp4d) t d(eCp5q) t su(p5dCe) t h(eCp5d) t d(eCp6q) t su(p6dCe) t h(eCp6d) t d(eCp7q) t su(p7dCe) t h(eCp7d) t d(eCp8q) t su(p8dCe) t h(eCp8d) port p4 output port p4 input port p5 output port p5 input port p6 output port p6 input port p7 output port p7 input port p8 output port p8 input t w(l) single-chip mode test conditions ? v cc = 2.7C5.5 v ? input timing voltage ? output timing voltage : v il = 0.2 v, v ih = 0.8 v : v ol = 0.8 v, v oh = 2.0 v
low voltage version 7702/7703 group users manual 18C23 18.4 electrical characteristics 18.4.8 memory expansion mode and microprocessor mode : with no wait timing requirements (v cc = 2.7 C 5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) 20 20 t c t w(h) t w(l) t r t f t su(p1dCe) t su(p2dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp1d) t h(eCp2d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p1 input setup time port p2 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p1 input hold time port p2 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time max. min. 125 50 50 80 80 300 300 300 300 300 0 0 0 0 0 0 0 limits unit parameter symbol ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns switching characteristics (v cc = 2.7C5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) max. min. port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time f 1 output delay time _ e low-level pulse width port p0 address output delay time port p1 data output delay time (byte = l) port p1 floating start delay time (byte = l) port p1 address output delay time port p1 address output delay time port p2 data output delay time port p2 floating start delay time port p2 address output delay time port p2 address output delay time ale output delay time ale pulse width bhe output delay time r/w output delay time t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) t d(eC f 1 ) t w(el) t d(p0aCe) t d(eCp1q) t pxz(eCp1z) t d(p1aCe) t d(p1aCale) t h(eCp2q) t pxz(eCp2z) t d(p2aCe) t h(p2aCale) t d(aleCe) t w(ale) t d(bheCe) t d(r/wCe) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns note: for test conditions, refer to figure 18.4.1. ] this is the value depending on f(x in ). for data formula, refer to table 18.4.1. 0 210 50 50 40 50 40 4 60 50 50 ] ] ] ] ] ] ] ] ] 300 300 300 300 300 40 130 10 130 10 limits unit parameter symbol
low voltage version 7702/7703 group users manual 18C24 18.4 electrical characteristics switching characteristics (v cc = 2.7C5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) max. min. t h(eCp0a) t h(aleCp1a) t h(eCp1q) t pzx(eCp1z) t h(eCp1a) t h(aleCp2a) t h(eCp2q) t pzx(eCp2z) t h(eCbhe) t h(eCrw) port p0 address hold time port p1 address hold time (byte = l) port p1 data hold time (byte = l) port p1 floating release delay time (byte = l) port p1 address hold time (byte = h) port p2 address hold time port p2 data hold time port p2 floating release delay time ___ bhe hold time _ r/w hold time ns ns ns ns ns ns ns ns ns ns 50 9 50 95 50 9 50 95 18 18 notes 1: for test conditions, refer to figure 18.4.1. ] : this is depending on f(x in ). for data formula, refer to table 18.4.1. ] ] ] ] ] ] limits unit parameter symbol f(x in ) 8 mhz 1 5 10 9 2 5 f(x in ) C 12.5 symbol table 18.4.1 bus timing data formula (note) (note) (note) (note) (note) (note) (note) e pulse width port p0 address output delay time port p1 address output delay time port p2 address output delay time port p1 address output delay time port p2 address output delay time ale pulse width bhe output delay time r/w output delay time port p0 address hold time port p1 address hold time port p1 data hold time port p2 data hold time port p1 floating start delay time port p2 floating start delay time t w(el) t d(p0aCe) t d(p1aCe) t d(p2aCe) t d(p1aCale) t d(p2aCale) t w(ale) t d(bhe-e) t d(r/w-e) t h(eCp0a) t h(eCp1a) t h(eCp1q) t h(eCp2q) t pzx(eCp1z) t pzx(eCp2z) parameter 2 5 10 9 f(x in ) C 40 1 5 10 9 f(x in ) C 125 50 + 1 5 10 9 f(x in ) C 125 50 + 1 5 10 9 f(x in ) C 85 1 5 10 9 f(x in ) C 65 1 5 10 9 f(x in ) C 30 1 5 10 9 2 5 f(x in ) C 12.5 note: for the m37702e2lxxxgp and the m37702e4lxxxfp, refer to section 19.5.4 bus timing and eprom mode. unit : ns
low voltage version 7702/7703 group users manual 18C25 18.4 electrical characteristics t d(p1a C e) t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(e C 1 ) t h(e C p0a) t h(e C p1a) t h(e C p1q) t d(e C p1q) address address data t h(e C p2q) t d(e C p2q) data address t h(ale C p1a) t h(ale C p2a) t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) t d(e C piq) f(x in ) 1 address output a 0 Ca 7 bhe output port pi output (i = 4C8) test conditons (p4Cp8) ?v cc = 2.7C5.5 v ?input timing voltage: v il = 0.2 v, v ih = 0.8 v ?output timing voltage: v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte =h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) test conditions ( 1 , e, p0Cp3) ?v cc = 2.7C5.5 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input : v il = 0.16 v, v ih = 0.5 v memory expansion mode and microprocessor mode ; with no wait address t d(p1a C e) t d(p0a C e) t d(p2a C e) t d(p1a C ale) t d(p2a C ale)
low voltage version 7702/7703 group users manual 18C26 18.4 electrical characteristics t su(p1dCe) t d(p0aCe) data t d(p1aCe) t d(p1aCe) t w(l) t w(h) t r t f t c t w(el) t d(eC 1 ) t d(eC 1 ) t h(eCp0a) t h(eCp1a) t pzx(eCp1z) t pxz(eCp1z) address address address t d(p1aCale) t h(eCbhe) t d(bheCe) t d(aleCe) t w(ale) t d(r/wCe) t h(eCr/w) t h(eCp1d) t h(aleCp1a) data t d(p2aCe) t pzx(eCp2z) t h(eCp2d) address t h(eCpid) t su(pidCe) f(x in ) 1 address output a 0 Ca 7 bhe output test conditions ( 1 , e, p0Cp3) ?v cc = 2.7C5.5 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input : v il = 0.16 v, v ih = 0.5 v port pi input (i = 4C8) test conditions (p4Cp8) ?v cc = 2.7C5.5 v ?input timing voltage : v il = 0.2 v, v ih = 0.8 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data input a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) t su(p2dCe) t pxz(eCp2z) t h(aleCp2a) t d(p2aCale) memory epxansion mode and microprocessor mode ; with no wait
low volt age version 7702/7703 group users manual 18C27 18.4 electrical characteristics 18.4.9 memory expansion mode and microprocessor mode : with wait timing requirements (v cc = 2.7C5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) 1 80 80 300 300 300 300 300 0 0 0 0 0 0 0 t c t w(h) t w(l) t r t f t su(p1dCe) t su(p2dCe) t su(p4dCe) t su(p5dCe) t su(p6dCe) t su(p7dCe) t su(p8dCe) t h(eCp1d) t h(eCp2d) t h(eCp4d) t h(eCp5d) t h(eCp6d) t h(eCp7d) t h(eCp8d) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns external clock input cycle time external clock input high-level pulse width external clock input low-level pulse width external clock rise time external clock fall time port p1 input setup time port p2 input setup time port p4 input setup time port p5 input setup time port p6 input setup time port p7 input setup time port p8 input setup time port p1 input hold time port p2 input hold time port p4 input hold time port p5 input hold time port p6 input hold time port p7 input hold time port p8 input hold time 20 20 min. max. limits unit parameter symbol switching characteristics (v cc = 2.7C5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) min. max. port p4 data output delay time port p5 data output delay time port p6 data output delay time port p7 data output delay time port p8 data output delay time f 1 output delay time _ e low-pulse width port p0 address output delay time port p1 data output delay time (byte = l) port p1 floating start delay time (byte = l) port p1 address output delay time port p1 address output delay time port p2 data output delay time port p2 floating start delay time port p2 address output delay time port p2 address output delay time ale output delay time ale pulse width ____ bhe output delay time __ r/w output delay time t d(eCp4q) t d(eCp5q) t d(eCp6q) t d(eCp7q) t d(eCp8q) t d(eC f 1 ) t w(el) t d(p0aCe) t d(eCp1q) t pxz(eCp1z) t d(p1aCe) t d(p1aCale) t d(eCp2q) t pxz(eCp2z) t d(p2aCe) t d(p2aCale) t d(aleCe) t w(ale) t d(bheCe) t d(r/wCe) ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns 300 300 300 300 300 40 130 10 130 10 0 460 50 50 40 50 40 4 60 50 50 ] ] ] ] ] ] ] ] ] note: for test conditions, refer to figure 18.4.1. ] : this is depending on f(x in ). for data formula, refer to table 18.4.2. unit limits parameter symbol
low voltage version 7702/7703 group users manual 18C28 18.4 electrical characteristics switching characteristics (v cc = 2.7C5.5 v, v ss = 0 v, ta = C40 to 85 c, f(x in ) = 8 mhz, unless otherwise noted) min. max. ns ns ns ns ns ns ns ns ns ns port p0 address hold time port p1 address hold time (byte = l) port p1 data hold time (byte = l) port p1 floating release delay time (byte = l) port p1 address hold time (byte = h) port p2 address hold time port p2 data hold time port p2 floating release delay time ____ bhe hold time __ r/w hold time t h(eCp0a) t h(aleCp1a) t h(eCp1q) t pzx(eCp1z) t h(eCp1a) t h(aleCp2a) t h(eCp2q) t pzx(eCp2z) t h(eCbhe) t h(eCr/w) 50 9 50 95 50 9 50 95 18 18 ] ] ] ] ] ] note: for test conditions, refer to figure 18.4.1. ] : this is depending on f(x in ). for data formula, refer to table 18.4.2. limits parameter symbol unit f(x in ) 8 mhz 1 5 10 9 2 5 f(x in ) C 12.5 symbol table 18.4.2 bus timing data formula (note) (note) (note) (note) (note) (note) (note) e pulse width port p0 address output delay time port p1 address output delay time port p2 address output delay time port p1 address output delay time port p2 address output delay time ale pulse width bhe output delay time r/w output delay time port p0 address hold time port p1 address hold time port p1 data hold time port p2 data hold time port p1 floating start delay time port p2 floating start delay time t w(el) t d(p0aCe) t d(p1aCe) t d(p2aCe) t d(p1aCale) t d(p2aCale) t w(ale) t d(bhe-e) t d(r/w-e) t h(eCp0a) t h(eCp1a) t h(eCp1q) t h(eCp2q) t pzx(eCp1z) t pzx(eCp2z) parameter 4 5 10 9 f(x in ) C 40 1 5 10 9 f(x in ) C 125 50 + 1 5 10 9 f(x in ) C 125 50 + 1 5 10 9 f(x in ) C 85 1 5 10 9 f(x in ) C 65 1 5 10 9 f(x in ) C 30 1 5 10 9 2 5 f(x in ) C 12.5 note: for the m37702e2lxxxgp and the m37702e4lxxxfp, refer to section 19.5.4 bus timing and eprom mode. unit : ns
low volt age version 7702/7703 group users manual 18C29 18.4 electrical characteristics memory expansion mode and microprocessor mode ; with wai t t d(p1aCe) t d(p1aCe) t w(l) t w(h) t r t f t c t w(el) t d(eC 1 ) t d(eC 1 ) t h(eCp0a) t h(eCp1a) t d(p0aCe) t h(eCp1q) t d(eCp1q) address address data t h(eCp2q) t d(eCp2q) t d(p2aCe) data address t h(aleCp1a) t d(p1aCale) t h(aleCp2a) t d(p2aCale) t h(eCbhe) t d(bheCe) t d(aleCe) t w(ale) t d(r/wCe) t h(eCr/w) t d(eCpiq) address f(x in ) 1 address output a 0 Ca 7 bhe output test conditions (p4Cp8) ?v cc = 2.7C5.5 v ?input timing voltage : v il = 0.2 v, v ih = 0.8 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h ) data input d 8 Cd 15 (byte = l ) address/data output a 16 /d 0 Ca 23 /d 7 ale output port pi output (i = 4C8) r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l ) test conditions ( 1 , e, p0Cp3) ?v cc = 2.7 C 5.5 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input :v il = 0.16 v, v ih =0.5 v
low voltage version 7702/7703 group users manual 18C30 18.4 electrical characteristics memory expansion mode and microprocessor mode ; with wait t su(p1d C e) t d(p0a C e) data t d(p1a C e) t d(p1a C e) t w(l) t w(h) t r t f t c t w(el) t d(e C 1 ) t d(e C 1 ) t h(e C p0a) t h(e C p1a) t pzx(e C p1z) t pxz(e C p1z) address address address t d(p1a C ale) t h(e C bhe) t d(bhe C e) t d(ale C e) t w(ale) t d(r/w C e) t h(e C r/w) t h(e C p1d) t h(ale C p1a) t d(p2a C e) t pzx(e C p2z) t pxz(e C p2z) t h(e C p2d) t h(ale C p2a) t h(e C pid) t su(pid C e) f(x in ) 1 address output a 0 Ca 7 bhe output port pi input (i = 4C8) test conditons (p4Cp8) ?v cc = 2.7C5.5 v ?input timing voltage : v il = 0.2 v, v ih = 0.8 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v e address output a 8 Ca 15 (byte = h) data input d 8 Cd 15 (byte = l) address/data output a 16 /d 0 Ca 23 /d 7 ale output r/w output data input d 0 Cd 7 address/data output a 8 /d 8 Ca 15 /d 15 (byte = l) test conditions ( 1 , e, p0Cp3) ?v cc = 2.7 C 5.5 v ?output timing voltage : v ol = 0.8 v, v oh = 2.0 v ?data input : v il = 0.16 v, v ih = 0.5 v t su(p2d C e) t d(p2a C ale) data address
low voltage version 7702/7703 group users manual 18C31 18.4 electrical characteristics 18.4.10 testing circuit for ports p0 to p8, f 1 , and e _ fig. 18.4.1 testing circuit for ports p0 to p8, f 1 , and e p0 p1 p2 p3 p4 p5 p6 p7 p8 100 pf 1 e
low voltage version 7702/7703 group users manual 18C32 18.5 standard characteristics 18.5 standard characteristics the data described below are characteristic examples for m37702m2lxxxgp. the data is not guaranteed value. refer to section 18.4 electrical characteristics for rated value. 18.5.1 port standard characteristics (1) programmable i/o port (cmos output) p channel i oh Cv oh characteristics (2) programmable i/o port (cmos output) n channel i ol Cv ol characteristics 25.0 20.0 15.0 10.0 5.0 0 0.5 1.0 1.5 2.0 2.5 v oh [v] i oh [ma] ta=25? ta=85? 3.0 ta=?0? p channel power source voltage v cc = 3 v 25.0 20.0 15.0 10.0 5.0 0 0.5 1.0 1.5 2.0 2.5 v ol [v] i ol [ma] 3.0 ta=25? ta=85? ta=?0? power source voltage v cc = 3 v n channel
low voltage version 7702/7703 group users manual 18C33 18.5 standard characteristics 4.0 0 51015 icc [ma] f(x in ) [mhz] 2.0 6.0 at reset measurement condition (v cc = 3 v, ta = 25 c, f(x in ) : square waveform input, microprocessor mode) on operating 18.5.2 i cc Cf(x in ) standard characteristics (1) i cc Cf(x in ) characteristics on operating and at reset (2) i cc Cf(x in ) characteristics during wait icc [ma] 0 51015 f(x in ) [mhz] 2.0 1.0 measurement condition (v cc = 3 v, ta = 25 c, f(x in ) : square waveform input, microprocessor mode)
low voltage version 7702/7703 group users manual 18C34 18.5 standard characteristics 18.5.3 aCd converter standard characteristics the lower lines of the graph indicate the absolute precision errors. these are expressed as the deviation from the ideal value when the output code changes. for example, the change in output code from 04 16 to 05 16 should occur at 52.7 mv, but the measured value is 2.9 mv. therefore, the measured point of change is 52.7 + 2.9 = 55.6 mv. the upper lines of the graph indicate the input voltage width for which the output code is constant. for example, the measured input voltage width for which the output code is 0f 16 is 12.4 mv. therefore, the differential non-linear error is 12.4 C 11.7 = 0.7 mv (0.06lsb). measurement condition (v cc = 3 v, f(x in ) = 8 mhz, temp. = 25 c )
low voltage version 7702/7703 group users manual 18C35 18.6 application 18.6 application some application examples of connecting external memorys for the low voltage version are described bellow. applications shown here are just examples. modify the desired application to suit the users need and make sufficient evaluation before actually using it. 18.6.1 memory expansion the following items of the low voltage version are the same as those of section 17.1 memory expansion. however, a part of the formulas and constants for parameters is different. ?memory expansion model ?formulas for address access time of external memory ?bus timing ?memory expansion method address access time of external memory t a(ad) t a(ad) = t d(p0a/p1a/p2aCe) + t w(el) C t su(p2d/p1d-e) C (address decode time ] 1 + address latch delay time ] 2 ) t d(p0a/p1a/p2aCe) : t d(p0aCe) , t d(p1aCe) , or t d(p2aCe) t su(p2d/p1dCe) : t su(p2dCe) , or t su(p1dCe) address decode time ] 1 : time necessary for validating a chip select signal after an address is decoded address latch delay time ] 2 : delay time necessary for latching an address (this is not necessary on the minimum model.) data setup time of external memory for writing data t su(d) t su(d) = t w(el) C t d(eCp2q/p1q) t d(eCp2q/p1q) : t d(eCp2q) , or t d(eCp1q) table 18.6.1 lists the calculation formulas and constants for each parameter of the low voltage version. figure 18.6.1 shows the relationship between t a(ad) and f(x in ). figure 18.6.2 shows the relationship between t su(d) and f(x in ). table 18.6.1 calculation formulas and constants for each parameter (unit : ns) parameter t d(p0a-e) t d(p1a-e) t d(p2a-e) t w(el) t su(p1d-e) t su(p2d-e) t d(e-p1q) t d(e-p2q) t pxz(e-p1z) t pxz(e-p2z) t pzx(e-p1z) t pzx(e-p2z) no wait wait f(x in ) 8 mhz f(x in ) 1 5 10 9 f(x in ) 50 + C 125 2 5 10 9 f(x in ) C 40 4 5 10 9 f(x in ) C 40 80 130 10 1 5 10 9 f(x in ) C 30 note: for m37702e2lxxxgp and m37702e4lxxxfp, refer to section 19.5.4 bus timing and eprom mode. (note) (note)
low voltage version 7702/7703 group users manual 18C36 18.6 application fig. 18.6.1 relationship between t a(ad) and f(x in ) fig. 18.6.2 relationship between t su(d) and f(x in ) 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 0 500 1000 2000 2305 1805 1471 1233 1055 916 805 714 638 574 519 471 430 1305 1005 805 662 555 471 405 350 305 266 233 205 180 [ns] [mhz] memory access time t a(ad) ] external clock input frequency f(x in ) no wait wait ] address decode time and address latch delay time are not considered. 1500 2500 [mhz] [ns] 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 0 200 400 600 800 1200 1400 1600 1800 1830 1430 1163 972 830 718 630 557 496 445 401 363 330 830 630 496 401 330 274 230 193 163 137 115 96 80 2000 data setup time t su(d) external clock input frequency f(x in ) no wait wait 1000
low voltage version 7702/7703 group users manual 18C37 18.6 application fig. 18.6.3 memory expansion example on minimum model 18.6.2 memory expansion example on minimum model figure 18.6.3 shows a memory expansion example on the minimum model (with external ram) and figure 18.6.4 shows the corresponding timing diagram. in this example, an atmel companys eprom (at27lv256r) is used as the external rom. in figure 18.6.3, the circuit condition is no wait. 0000 16 0080 16 a 15 a 0 Ca 14 d 0 Cd 7 ac04 ac32 8 mhz x in x out m37702s1l byte r/w e bhe open a 0 Ca 14 d 0 Cd 7 oe m5m5256cfp-10vll oe rd wr ce s at27lv256r-15di ac04 ac32 a 0 Ca 14 dq 1 Cdq 8 vcc = 3.0C3.3 v ] 1 ] 2 ] 3 8000 16 ffff 16 0280 16 w sfr area internal ram area external rom area (at27lv256r) memory map circuit condition : no wait use the elements of which propagation delay time is within 30 ns. use the elements of which propagation delay time is within 50 ns. external ram area (m5m5256cfp) ] 1 ] 1, ] 2: ] 3:
low voltage version 7702/7703 group users manual 18C38 18.6 application d 0 ? 7 a a d s, oe 210 (min.) 50 (min.) 10 (max.) 95 (min.) t su (p2d-e) 3 80 rom : 25 (max.) ram : 30 (max.) e ac32 (t plh ) ac32 (t phl ) e a 1 ? 14 aa d 0 ? 7 aa s, w d 210 (min.) t su (d) 3 40 ac32 (t phl ) ac32 (t plh ) 130 (max.) 50 (min.) a 1 ? 14 a t a (ad) t a (ce) ac04 (t phl ) ce 50 (min.) a external memory data output (unit : ns) t a (s) , t a (oe) fig. 18.6.4 timing diagram on minimum model
low voltage version 7702/7703 group users manual 18C39 18.6 application 18.6.3 memory expansion example on medium model a figure 18.6.5 shows a memory expansion example on the medium model a of mask rom version and prom version. figure 18.6.6 shows the corresponding timing diagram. fig. 18.6.5 memory expansion example on medium model a a 16 /d 0 Ca 23 /d 7 8 mhz x in x out m37702m2l / e2lxxxgp byte r/w e open bhe a 0 Ca 16 oe s1 m5m51008afp-10vll a 0 Ca 15 cnv ss w 000000 16 000080 16 dq 1 Cdq 8 03ffff 16 00c000 16 00027f 16 not used not used 00ffff 16 020000 16 d q le s2 ale a 16 a 17 ac573 d 0 Cd 7 v cc = 2.7C3.3 v sfr area internal ram area memory map circuit condition : no wait ] : use the elements of which propagation delay time is within 50 ns. external ram area (m5m51008afp) internal rom area ]
low voltage version 7702/7703 group users manual 18C40 18.6 application fig. 18.6.6 memory expansion example on medium model a a 0 Ca 15 a e, oe, s1 a 16 / d 0 Ca 23 / d 7 a 16 , a 17 , s2 aa d 210 (min.) 130 (max.) 50 (min.) t su (d) 3 40 r/w, we ac573 (t phl ) a 16 / d 0 Ca 23 / d 7 a d e, oe, s1 210 (min.) 50 (min.) 10 (max.) 95 (min.) t a (oe), t a (s1) t su (p1d/p2d-e) 3 80 t a (s2) ac573 (t plh ) a 0 Ca 15 a a 16 , a 17 , s2 ac573 (t phl ) 35 (max.) 50 (min.) t a (a) +ac573 external memory data output (unit : ns) a a a
low voltage version 7702/7703 group users manual 18C41 18.6 application 18.6.4 memory expansion example on maximum model figure 18.6.7 shows a memory expansion example on the maximum model. figure 18.6.8 shows the corresponding timing diagram. in this example, atmel companys eproms (at27lv256r) are used as the external roms. in figure 18.6.7, the circuit condition is no wait. fig. 18.6.7 memory expansion example on maximum model ram area r/w e bhe ac04 8 mhz x in x out m37702s1l byte a 17 a 8C a 16 ac573 ac32 rd d0Cd7 d 8C d 15 wo a1Ca15 d 0C d 7 oe a 0C a 14 ce a 1C a 15 a0 C a14 d0 C d7 oe ce we at27lv256r-15di ac32 dq le dq le a 16 /d 0 C a 17 /d 1 a1Ca16 d0Cd7 m5m51008afp-10vll a 0C a 15 dq 1C dq 8 oe w a 1C a 16 d 8C d 15 a 0C a 15 dq 1C dq 8 oe w ac32 03ffff 16 000000 16 000080 16 000280 16 00ffff 16 020000 16 not used ac04 s 1 s 1 a 1C a 7 a 8 /d 8 C a 15 /d 15 ale d 2C d 7 a 16 a 16 a 16 vcc = 3.0C3.3 v s 2 s 2 ] 1 ] 3 ] 2 ] 2 a 0 external rom area (at27lv256r 5 2) sfr area internal external ram area (m5m51008afp 5 2) memory map data bus (odd) address bus data bus (even) circuit condition : no wait use the elements of which propagation delay time is within 30 ns. use the elements of which propagation delay time is within 50 ns. ] 1, ] 2 : ] 3:
low voltage version 7702/7703 group users manual 18C42 18.6 application fig. 18.6.8 timing diagram on maximum model a 1 Ca 7 a e a 8 / d 8 Ca 15 / d 15 a 16 / d 0 , d 1 Cd 7 a d 210 (min.) 130 (max.) 50 (min.) ac32 (t phl ) t su (d ) 40 (unit : ns) w ac32 (t plh ) a 8 / d 8 Ca 15 / d 15 a 16 / d 0 a d e 210 (min.) 50 (min.) 10 (max .) 95 (min.) t a (ad), t a (ce) t su (p1d/p2d-e) 80 oe a c 32 (t plh ) a 1 Ca 7 a ce, s1 t a (oe) a c 573 (t phl ) ce ac32 (t phl ) rom : 25 (max.) ram : 35 (max.) 50 (min.) t a (s1) a c 04 (t phl ) s1 s1 ac573 (t phl )+ac04 (t phl ) external memory data output a a a a
low voltage version 7702/7703 group users manual 18C43 18.6 application 18.6.5 ready generating circuit example when validating wait only for a certain area (for example, rom area) in figures 18.6.3 to 18.6.8, use ready function. figure 18.6.9 shows a ready generating circuit example. fig. 18.6.9 ready generating circuit example m37702 a 8 Ca 23 (d 0 Cd 15 ) a 0 Ca 7 ac74 d t q 1 rdy e ac32 ac32 ac04 address bus e 1 ale rdy ce ce cs 1 address latch circuit address decode circuit data bus rdy signal falling timing term expanded by rdy input wait by ready is inserted in only area accessed by ce.
low voltage version 7702/7703 group users manual 18C44 18.6 application memorandum
chapter 19 prom version 19.1 overview 19.2 eprom mode 19.3 1m mode 19.4 256k mode 19.5 usage precaution
prom version 7702/7703 group users manual 19C2 19.1 overview this chapter describes the prom version including the prom. the prom version can be used with the program written into the built-in prom. 7703 group refer to chapter 20. 7703 group about the pin connections and others. 19.1 overview in the prom version, programming to the built-in prom can be performed by using a general-purpose prom programmer and a programming adapter, which is suitable for the used microcomputer. the prom version has the following two types : l one time prom version programming to the prom can be performed once. this version is suitable for a small quantity of and various productions. l eprom version programming to the prom can be performed repeatedly because a program can be erased by exposing the erase window on the top of the package to an ultraviolet light source. this version can be used only for program development, evaluation only. the built-in prom version has the same functions as the mask rom version except that the former has a built-in prom.
prom version 19.1 overview 7702/7703 group users manual 19C3 table 19.1.1 write address of prom version type name m37702e2bxxxfp m37702e2bxxxhp m37702e2axxxfp ( note 1 ) m37702e2lxxxgp ( note 1 ) m37702e2lxxxhp m37702e4bxxxfp m37702e4axxxfp ( note 1 ) m37702e4lxxxfp ( note 1 ) m37702e4lxxxgp m37702e6bxxxfp m37702e6lxxxfp m37702e8bxxxfp m37702e8bxxxhp m37702e8lxxxfp m37702e8lxxxhp m37702e2bfs M37702E2AFS ( note 1 ) m37702e4bfs m37702e4afs ( note 1 ) m37702e6bfs m37702e8bfs prom size (byte) 16k ram size (byte) 512 write address 1m mode 256k mode 1c000 16 to 1ffff 16 4000 16 to 7fff 16 1c000 16 to 1ffff 16 18000 16 to 1ffff 16 0000 16 to 7fff 16 32k 2048 48k 60k 2048 2048 18000 16 to 1ffff 16 14000 16 to 1ffff 16 11000 16 to 1ffff 16 1c000 16 to 1ffff 16 4000 16 to 7fff 16 18000 16 to 1ffff 16 0000 16 to 7fff 16 14000 16 to 1ffff 16 11000 16 to 1ffff 16 16k 32k 48k 60k 512 2048 2048 2048 eprom version one time prom version notes 1 : refer also to section 19.5.4 bus timing and eprom mode . 2 : a blank product of the one time prom version does not have the rom number, which is printed on the xxx position. for example, m37702e2bfp.
7702/7703 group users manual prom version 19C4 19.2 eprom mode 19.2 eprom mode the built-in prom version has the following two modes : l normal operating mode this mode has the same function as the mask rom version. l eprom mode the built-in prom can be programmed and read in this mode. the prom version enters this mode when ______ l level is input to the reset pin 19.2.1 write method there are 2 types of the eprom mode: 1m mode and 256k mode. 256k mode is recommended to write data deeply for the one time prom version of which internal prom size is 32 kbytes or less. 1m mode is recommended for the eprom version owing to its write velocity faster than 256k mode. it is because to write and erase is repeated for the eprom version. however, the M37702E2AFS and m37702e4afs cannot use 1m mode. additionally, use 1m mode to write and read in the built-in prom version of which prom size is 32 kbytes or more.
prom version 7702/7703 group users manual 19C5 19.2 eprom mode 19.2.2 pin description table 19.2.1 lists the pin description in the eprom mode. in the normal operating mode, each pin has the same function as the mask rom version. functions apply 5 v 10% to pin vcc, and 0 v to pin vss. apply v pp level when programming or verifying. connect to pin vss. connect a ceramic resonator or a quartz-crystal oscillator between pins x in and x out . when an external generated clock is input, the clock must be input to pin x in , and pin x out must be left open. open. connect pin avcc to vcc and pin avss to vss. connect to pin vss. input pins for a 0 Ca 7 of address. input pins for a 8 Ca 15 of address. connect p1 7 to vcc in 256k mode. i/o pins for data d 0 Cd 7 . connect to vss. connect to vss. _____ p5 0 functions as pgm input pin in 1m mode. connect to vcc in 256k mode. ___ ___ p5 1 functions as oe input pin and p5 2 does as ce input pin. connect to vcc. connect to vcc in 1m mode or to vss in 256k mode. connect to vss. connect to vss. connect to vss. connect to vss. pin vcc, vss cnvss byte ______ reset x in x out e avcc, avss v ref p0 0 Cp0 7 p1 0 Cp1 7 p2 0 Cp2 7 p3 0 Cp3 3 p4 0 Cp4 7 p5 0 p5 1, p5 2 p5 3 Cp5 5 p5 6 p5 7 p6 0 Cp6 7 p7 0 Cp7 7 p8 0 Cp8 7 input/output CC input input input output output CC input input input i/o input input input input input input input name power source input v pp input reset input clock input clock output enable output analog power source input reference voltage input address input (a 0 Ca 7 ) address input (a 8 Ca 15 ) data input/output (d 0 Cd 7 ) input port p3 input port p4 control input input port p5 input port p6 input port p7 input port p8 table 19.2.1 pin description in eprom mode
7702/7703 group users manual prom version 19C6 19.3 1m mode 19.3 1m mode 1m mode can perform reading/programming from and to the built-in prom with the same manner as m5m27c101k. however, there is no device identification code. accordingly, programming conditions must be set carefully. table 19.3.1 lists the pin correspondence with m5m27c101k. figures 19.3.1 and 19.3.2 show the pin connections in 1m mode. m5m27c101k vcc v pp vss a 0 Ca 15 d 0 Cd 7 ce oe pgm vcc v pp input vss address input data i/o __ ce input __ oe input ____ pgm input table 19.3.1 pin correspondence with m5m27c101k vcc cnvss, byte vss p0, p1 p2 p5 2 p5 1 p5 0 m37702e2bxxxfp (m37702e2bfp) m37702e2bfs
prom version 7702/7703 group users manual 19C7 19.3 1m mode 66 p8 2 /rxd 0 67 p8 1 /clk 0 1 p6 6 /tb1 in 2 p6 5 /tb0 in 3 p6 4 /int 2 4 p6 3 /int 1 5 p6 2 /int 0 6 p6 1 /ta4 in 7 p6 0 /ta4 out 8 p4 1 /rdy 64 p8 4 /cts 1 /rts 1 63 p8 5 /clk 1 62 p8 6 /rxd 1 61 p8 7 /txd 1 60 p0 0 /a 0 59 p0 1 /a 1 58 p0 2 /a 2 57 p0 3 /a 3 9 10 p5 7 /ta3 in 11 p5 6 /ta3 out 12 p5 5 /ta2 in 13 p5 4 /ta2 out 14 p5 3 /ta1 in 15 p5 2 /ta1 out 16 p5 1 /ta0 in 17 p5 0 /ta0 out 18 p4 7 19 p4 6 20 p4 5 21 p4 4 22 p4 3 23 p4 2 / 1 24 56 p0 4 /a 4 55 p0 5 /a 5 54 p0 6 /a 6 53 p0 7 /a 7 52 p1 0 /a 8 /d 8 51 p1 1 /a 9 /d 9 50 p1 2 /a 10 /d 10 49 p1 3 /a 11 /d 11 48 p1 4 /a 12 /d 12 47 p1 5 /a 13 /d 13 46 p1 6 /a 14 /d 14 45 p1 7 /a 15 /d 15 44 p2 0 /a 16 /d 0 43 p2 1 /a 17 /d 1 42 p2 2 /a 18 /d 2 41 p2 3 /a 19 /d 3 80 p7 1 /an 1 79 p7 2 /an 2 78 p7 3 /an 3 77 p7 4 /an 4 76 p7 5 /an 5 75 p7 6 /an 6 74 p7 7 /an 7 /ad trg 73 v ss 72 av ss 71 v ref 70 av cc 69 v cc 68 p8 0 /cts 0 /rts 0 65 p8 3 /txd 0 39 p2 5 /a 21 /d 5 38 p2 6 /a 22 /d 6 25 p4 0 /hold 26 byte 27 cnv ss 28 reset 29 x in 30 x out 31 32 v ss 33 p3 3 /hlda 34 p3 2 /ale 35 p3 1 /bhe 36 p3 0 /r/w 37 p2 7 /a 23 /d 7 40 p2 4 /a 20 /d 4 m37702e2bxxxfp or m37702e2bfs outline 80p6n-a ] : connect an oscillating circuit. a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 a 8 a 9 a 10 a 11 a 12 a 13 a 14 d 0 d 1 d 2 d 3 oe ce v pp d 4 d 5 d 6 d 7 v ss : eprom pins a 15 pgm v cc e p7 0 /an 0 p6 7 /tb2 in ] l 1m mode (top view) outline 80d0 fig. 19.3.1 pin connections in 1m mode (1)
7702/7703 group users manual prom version 19C8 19.3 1m mode d 2 a 14 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 outline 80p6s-a outline 80p6d-a 1 4 3 2 5 p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 60 59 58 75 74 73 72 71 69 68 67 66 65 70 80 79 78 77 76 64 63 62 61 30 26 27 28 29 31 32 33 34 35 36 21 23 22 24 25 37 38 39 40 p4 2 / 1 p4 1 /rdy p4 0 /hold byte cnv ss reset x in x out e v ss p3 3 /hlda p3 2 /ale p3 1 /bhe p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 7 p8 5 /clk 1 p8 4 /cts 1 /rts 1 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad trg p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 p7 0 /an 0 p6 7 /tb2 in m37702e2lxxxgp or m37702e2lxxxhp p4 3 p4 4 p4 5 p4 6 p2 3 /a 19 /d 3 p2 2 /a 18 /d 2 v cc a 15 a 13 a 12 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 d 0 d 1 d 7 d 6 d 5 d 4 d 3 v pp v ss ce pgm oe ] l 1m mode (top view) ] : connect an oscillating circuit. : eprom pins fig. 19.3.2 pin connections in 1m mode (2)
prom version 7702/7703 group users manual 19C9 19.3.1 read/program/erase table 19.3.2 lists the built-in prom state in 1m mode and each mode is described bellow. (1) read ___ ___ when pins ce and oe are set to l level and an address is input to address input pins, the contents of the built-in prom can be output from data i/o pins and read. ___ ___ when pins ce and oe are set to h level, data i/o pins enter the floating state. (2) program (write) ___ ___ when pin ce is set to l level and pin oe is set to h level and v pp level is applied to pin v pp , programming to the built-in prom becomes possible. input an address to address input pins and supply data to be programmed to data i/o pins in 8-bit ____ parallel. in this condition, when pin pgm is set to l level, the data is programmed at the specified address, input address, into the built-in prom. (3) erase (possible only in eprom version) the contents of the built-in prom is erased by exposing the glass window on top of the package to an ultraviolet light which has a wave length of 2537 angstrom. the light must be 15 j/cm 2 or more. 19.3 1m mode table 19.3.2 built-in prom state in 1m mode pin name data i/o output floating floating input output floating v il v il v ih v il v il v ih v il v ih 5 v ih v il v ih 5 5 5 v il v ih v ih 5 v 5 v 5 v 12.5 v 12.5 v 12.5 v vcc v pp pgm ce 5 v 5 v 5 v 6 v 6 v 6 v oe mode read-out output disable program program verify program disable 5 : it may be v il or v ih .
7702/7703 group users manual prom version 19C10 19.3.2 programming algorithm of 1m mode figure 19.3.3 shows the programming algorithm flow chart of 1m mode. set vcc = 6 v, v pp = 12.5 v, and address to 1c000 16 ] . after applying a programming pulse of 0.2 ms, check whether data can be read or not. a if the data cannot be read, apply a programming pulse of 0.2 ms again. ? repeat the procedure, which consists of applying a programming pulse of 0.2 ms and read check, until the data can be read. additionally, record the number of applied pulses ( c ) before the data has been read. ? apply c pulses (0.2 5 c ms) (described in ? ) as additional programming pulses. ? when this procedure ( to ? ) is completed, increment the address and repeat the above procedure until the last address is reached. ? after programming to the last address, read data when vcc = v pp = 5 v (or vcc = v pp = 5.5 v). ] : this applies to the m37702e2bfs. refer to table 19.1.1 about each write address of other products. 19.3 1m mode fig. 19.3.3 programming algorithm flow chart of 1m mode verify all byte start addr = first location = 0 v cc = v pp = 5.0 v ] device failed device passed v cc = 6.0 v v pp = 12.5 v = + 1 = 25? verify byte increment addr verify byte device failed last addr? fail yes no pass pass yes fail pass no fail program one pulse of 0.2 ms program pulse of 0.2 5 ms duration ] : 4.5 v v cc = v pp 5.5 v
prom version 7702/7703 group users manual 19C11 ac electrical characteristics (ta = 25 5 c, vcc = 6 v 0.25 v, v pp = 12.5 0.3 v, unless otherwise noted) 19.3.3 electrical characteristics of programming algorithm in 1m mode max. 130 0.21 5.25 150 typ. 0.2 min. limits unit parameter s s s s s ns s s ms ms s ns address setup time oe setup time data setup time address hold time data hold time ___ output floating delay time after oe vcc setup time v pp setup time ____ pgm pulse width ____ additional pgm pulse width ___ ce setup time ___ data delay time after oe t as t oes t ds t ah t dh t dfp t vcs t vps t pw t opw t ces t oe symbol 2 2 2 0 2 0 2 2 0.19 0.19 2 19.3 1m mode switching characteristics measuring conditions l input voltage : v il = 0.45 v, v ih = 2.4 v l input signal rise/fall time (10%?0%) : 20 ns l reference voltage in timing measurement : input/output ??= 0.8 v, ??= 2 v t vcs t vps t ds t dh t dfp t as t ah verify program data set data output valid v ih v il v ih /v oh v il /v ol v pp v cc v cc + 1 v cc address data v pp v cc t oes t oe t opw t pw v ih v il v ih v il pgm oe v ih v il t ces ce programming timing diagram
7702/7703 group users manual prom version 19C12 19.4 256k mode 19.4 256k mode 256k mode can perform reading/programming from and to the built-in prom with the same manner as m5m27c256k. however, there is no device identification code. accordingly, programming conditions must be set carefully. table 19.4.1 lists the pin correspondence with m5m27c256k. figures 19.4.1 and 19.4.2 show the pin connections in 256k mode. m5m27c256k vcc v pp vss a 0 Ca 14 d 0 Cd 7 __ ce __ oe vcc v pp input vss address input data i/o __ ce __ oe table 19.4.1 pin correspondence with m5m27c256k vcc cnvss, byte vss p0, p1 p2 p5 2 p5 1 m37702e2bxxxfp (m37702e2bfp) m37702ehbfs
prom version 7702/7703 group users manual 19C13 19.4 256k mode 25 27 26 28 34 29 30 31 32 33 35 36 37 38 39 40 p7 0 /an 0 p6 7 /tb2 in p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 0 /hold byte cnv ss reset x in x out e v ss p3 3 /hlda p3 2 /ale p3 1 /bhe p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p7 1 /an 1 p7 2 /an 2 p7 3 /an 3 p7 4 /an 4 p7 5 /an 5 p7 6 /an 6 p7 7 /an 7 /ad trg v ss av ss v ref av cc v cc p8 0 /cts 0 /rts 0 p8 1 /clk 0 p8 2 /r x d 0 p8 3 /t x d 0 p8 4 /cts 1 /rts 1 p8 5 /clk 1 p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 80 79 78 77 76 75 74 73 72 71 69 68 67 66 65 70 outline 80p6n-a p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 p2 2 /a 18 /d 2 p2 3 /a 19 /d 3 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 m37702e2bxxxfp p4 1 /rdy p4 7 p4 6 p4 5 p4 4 p4 3 p4 2 / 1 1 4 3 2 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 a 12 a 13 a 14 d 0 d 1 d 2 d 3 v pp d 7 d 6 d 5 d 4 ] v ss vcc ce oe l 256k mode (top view) ] : connect an oscillating circuit. : eprom pins fig. 19.4.1 pin connections in 256k mode (1)
7702/7703 group users manual prom version 19C14 19.4 256k mode d 2 a 14 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 outline 80p6s-a outline 80p6d-a 1 4 3 2 5 p8 6 /r x d 1 p8 7 /t x d 1 p0 0 /a 0 p0 1 /a 1 p0 2 /a 2 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p1 0 /a 8 /d 8 p1 1 /a 9 /d 9 p1 2 /a 10 /d 10 p1 3 /a 11 /d 11 p1 4 /a 12 /d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p2 0 /a 16 /d 0 p2 1 /a 17 /d 1 60 59 58 75 74 73 72 71 69 68 67 66 65 70 80 79 78 77 76 64 63 62 61 30 26 27 28 29 31 32 33 34 35 36 21 23 22 24 25 37 38 39 40 p4 2 / 1 p4 1 /rdy p4 0 /hold byte cnv ss reset x in x out e v ss p3 3 /hlda p3 2 /ale p3 1 /bhe p3 0 /r/w p2 7 /a 23 /d 7 p2 6 /a 22 /d 6 p2 5 /a 21 /d 5 p2 4 /a 20 /d 4 p6 6 /tb1 in p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p6 1 /ta4 in p6 0 /ta4 out p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 4 /ta2 out p5 3 /ta1 in p5 2 /ta1 out p5 1 /ta0 in p5 0 /ta0 out p4 7 p8 5 /clk 1 p8 4 /cts 1 /rts 1 p8 3 /t x d 0 p8 2 /r x d 0 p8 1 /clk 0 p8 0 /cts 0 /rts 0 v cc av cc v ref av ss v ss p7 7 /an 7 /ad trg p7 6 /an 6 p7 5 /an 5 p7 4 /an 4 p7 3 /an 3 p7 2 /an 2 p7 1 /an 1 p7 0 /an 0 p6 7 /tb2 in m37702e2lxxxgp or m37702e2lxxxhp p4 3 p4 4 p4 5 p4 6 p2 3 /a 19 /d 3 p2 2 /a 18 /d 2 v cc a 13 a 12 a 0 a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 a 11 d 0 d 1 d 7 d 6 d 5 d 4 d 3 v pp v ss ce oe ] ] : connect an oscillating circuit. : eprom pins l 256k mode (top view) fig. 19.4.2 pin connections in 256k mode (2)
prom version 7702/7703 group users manual 19C15 19.4.1 read/program/erase table 19.4.2 lists the built-in prom state in 256k mode and each mode is described bellow. (1) read ___ ___ when pins ce and oe are set to l level and an address is input to address input pins, the contents of the built-in prom can be output from data i/o pins and read. ___ ___ when pins ce and oe are set to h level, data i/o pins enter the floating state. (2) program (write) ___ when pin oe is set to h level and v pp level is applied to pin v pp , programming to the built-in prom becomes possible. input an address to address input pins and supply data to be programmed to data i/o pins in 8-bit ___ parallel. in this condition, when pin ce is set to l level, the data is programmed at the specified address, input address, into the built-in prom. (3) erase (possible only in eprom version) the contents of the built-in prom is erased by exposing the glass window on top of the package to an ultraviolet light which has a wave length of 2537 angstrom. the light must be 15 j/cm 2 or more. 19.4 256k mode table 19.4.2 built-in prom state in 256k mode pin name data i/o __ ce 5 v 5 v 5 v 6 v 6 v 6 v mode read-out output disable program program verify program disable 5 : it may be v il or v ih . v il v il v ih v il v ih v ih __ oe v pp 5 v 5 v 5 v 12.5 v 12.5 v 12.5 v v il v ih 5 v ih v il v ih vcc output floating floating input output floating
7702/7703 group users manual prom version 19C16 19.4.2 programming algorithm of 256k mode figure 19.4.3 shows the programming algorithm flow chart of 256k mode. set vcc = 6 v, v pp = 12.5 v, and address to 4000 16 ] . after applying a programming pulse of 1 ms, check whether data can be read or not. a if the data cannot be read, apply a programming pulse of 1 ms again. ? repeat the procedure, which consists of applying a programming pulse of 1 ms and read check, until the data can be read. additionally, record the number of pulses applied ( c ) before the data has been read. ? apply three times as many numbers as c pulses (described in ? ), that is, 3 5 c ms as additional programming pulses. ? when this procedure ( to ? ) is completed, increment the address and repeat the above procedure until the last address is reached. ? after programming to the last address, read data when vcc = v pp = 5 v (or vcc = v pp = 5.5 v). ] : this applies to the m37702e2bxxxfp. refer to table 19.1.1 about each write address of other products. 19.4 256k mode verify all byte start addr = first location = 0 v cc = v pp = 5.0 v ] device failed device passed v cc = 6.0 v v pp = 12.5 v = + 1 = 25? verify byte increment addr verify byte device failed last addr? fail yes no pass pass yes fail pass no fail program one pulse of 1 ms program pulse of 3 5 ms duration ] : 4.5 v v cc = v pp 5.5 v fig. 19.4.3 programming algorithm flow chart of 256k mode
prom version 7702/7703 group users manual 19C17 ac electrical characteristics (ta = 25 5 c, vcc = 6 v 0.25 v, v pp = 12.5 0.3 v, unless otherwise noted) 19.4.3 electrical characteristics of programming algorithm in 256k mode max. 130 1.05 78.75 150 typ. 1 min. limits unit parameter s s s s s ns s s ms ms ns address setup time oe setup time data setup time address hold time data hold time ___ output floating delay time after oe vcc setup time v pp setup time __ ce initial program pulse width __ additional ce pulse width ___ data delay time after oe symbol 2 2 2 0 2 0 2 2 0.95 2.85 19.4 256k mode t as t oes t ds t ah t dh t dfp t vcs t vps t fpw t opw t oe t vcs t vps t ds t dh t oes t oe t dfp t as t opw t fpw t ah v ih v il v ih /v oh v il /v ol v pp v cc v cc +1 v cc v ih v il v ih v il ce oe v pp v cc verify program data set data output valid address data programming timing diagram
7702/7703 group users manual prom version 19C18 19.5 usage precaution the usage precaution of prom version is described bellow. 19.5.1 precautions on all prom versions when programming to the built-in prom, high voltage is required. accordingly, be careful not to apply excessive voltage to the microcomputer. furthermore, be especially careful during power-on. 19.5.2 precautions on one time prom version one time prom versions shipped in a blank, of which built-in proms are programmed by users, are also provided. for these microcomputers, a programming test and screening are not performed in the assembly process and the following processes. to improve their reliability after programming, we recommend to program and test as the flow shown in figure 19.5.1 before use. 19.5 usage precaution fig. 19.5.1 programming and test flow for one time prom version programming with prom programmer screening ( note ) (leave at 150 ? for 40 hours) verify test with prom programmer function check in target device note: never expose to 150 ? exceeding 100 hours. 19.5.3 precautions on eprom version (1) cover transparent glass window cover the transparent glass window with a shield or others during the read mode because exposing to sun light or fluorescent lamp can cause erasing the programmed data. a shield to cover the transparent window is available from mitsubishi electric corporation. be careful that the shield does not touch the eprom lead pins. (2) erase clean the transparent glass before erasing. there is a possibility that fingers fat and paste disturb the passage of ultraviolet rays and affect badly the erasure capability. (3) usage the eprom version is a tool only for program development, evaluation only, and do not use it for the mass product run.
prom version 7702/7703 group users manual 19C19 19.5 usage precaution 19.5.4 bus timing and eprom mode the prom versions shown in tables 19.5.1 and 19.5.2 have the different bus timing from other prom versions, mask rom, external rom versions. additionally, they can use 256k mode as eprom mode though its prom size is 32 kbytes or less. table 19.5.1 prom versions having peculiar bus timing (16mhz version) bus timing type name m37702e2axxxfp M37702E2AFS m37702e4axxxfp m37702e4afs t pzx(e C p1z) , t pzx(e C p2z) f(x in ) 8 mhz 8mhz < f(x in ) 16 mhz limits: 50 ns limits: 25 ns formulas: formulas: C 6.25 1 5 10 9 2 5 f(x in ) C 12.5 1 5 10 9 2 5 f(x in ) table 19.5.2 prom versions having peculiar bus timing (low voltage version) (1) bus timing the limits and formulas of the prom versions having the peculiar bus timing which is different from other prom versions are shown in tables 19.5.1 and 19.5.2. when the user is planning to use the product shown in tables 19.5.1 and 19.5.2 for evaluation or in early production and replace it later with the mask rom version, we recommend to use the substitute shown in table 19.5.3 for evaluation or in early production. however, the substitute for the low voltage version has the larger rom and ram size. make sure of its memory usage. the substitute for the 16 mhz version has the higher frequency of external clock input. there are no precaution about its operation. type name m37702e2lxxxgp m37702e4lxxxfp 1 5 10 9 2 5 f(x in ) C 12.5 1 5 10 9 2 5 f(x in ) 50 + C 62.5 t pzx(e C p1z) , t pzx(e C p2z) t d(p0a C e) , t d(p1a C e) , t d(p2a C e) , t d(bhe C e), t d(r/w C e) limits: 50 ns limits: 50 ns formulas: formulas: bus timing table 19.5.3 substitutes type name to be used substitute remark m37702e2axxxfp m37702e2bxxxfp the substitute has the higher frequency of external clock input. M37702E2AFS m37702e2bfs m37702e4axxxfp m37702e4bxxxfp m37702e4afs m37702e4bfs m37702e2lxxxgp m37702e4lxxxgp the substitute has the larger rom and ram size. m37702e4lxxxfp m37702e6lxxxfp (2) eprom mode the products shown in table 19.5.1 can use only 256k mode as the eprom mode. do not use 1m mode.
7702/7703 group users manual prom version 19C20 19.5 usage precaution memorandum
chapter 20 7703 group 20.1 description 20.2 performance overview 20.3 pin configuration 20.4 functional description 20.5 electrical characteristics 20.6 prom version
7703 group 7702/7703 group users manual 20C2 this chapter describes the 7703 group. the 7703 group has the same functions as the 7702 group except for some functions. this chapter mainly describes the differences between the 7703 and 7702 groups. refer to the relevant descriptions of the 7702 group about the common functions. 20.1 description the 16-bit single-chip microcomputers 7703 group is suitable for office, business, and industrial equipment controllers that require high-speed processing. these microcomputers develop with the m37703m2bxxxsp as the base chip. this manual describes the functions about the m37703m2bxxxsp unless there is a specific difference and the m37703m2bxxxxsp is referred to as m37703. 20.1 description
7703 group 7702/7703 group users manual 20C3 functions 103 160 ns (the minimum instruction at f(x in ) = 25 mhz) 250 ns (the minimum instruction at f(x in ) = 16 mhz) 25 mhz (maximum) 16 mhz (maximum) 16384 bytes 512 bytes 8 bits 5 4 6 bits 5 1 4 bits 5 3 3 bits 5 1 16 bits 5 5; with i/o function 5 4 16 bits 5 3; with input function 5 1 uart 5 2 (uart0 also as clock synchronous serial i/o) 8-bit successive approximation method 5 1 (4 channels) 12 bits 5 1 3 external, 16 internal (priority levels 0 to 7 can be set for each interrupt with software) built-in (externally connected to a ceramic resonator or a quartz-crystal oscillator) 5 v 10 % 95 mw (at f(x in ) = 25 mhz frequency, typ.) 5 v 5 ma maximum 16 mbytes C20c to 85c cmos high-performance silicon gate process 80-pin plastic molded sdip 20.2 performance overview 20.2 performance overview table 20.2.1 lists the performance overview of the m37703. table 20.2.1 m37703 performance overview parameters number of basic instructions instruction execution time external clock input frequency f(x in ) memory size programmable input/output ports multifunction timers serial i/o a-d converter watchdog timer interrupts clock generating circuit supply voltage power dissipation port input/output characteristics memory expansion operating temperature range device structure package m37703m2bxxxsp m37703m2axxxsp m37703m2bxxxsp m37703m2axxxsp rom ram p0, p1, p2, p5 p8 p4, p6, p7 p3 ta0Cta4 tb0Ctb2 uart0, uart1 input/output withstand voltage output current
7703 group 7702/7703 group users manual 20C4 20.3 pin configuration figure 20.3.1 shows the m37703m2bxxxsp pin configuration. 20.3 pin configuration 64 63 62 61 60 59 58 57 56 55 54 53 52 50 49 48 47 46 45 44 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 av cc v ref p7 1 /an 1 av ss p7 2 /an 2 p7 7 /an 7 /ad trg p7 0 /an 0 p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 2 /ta1 out p5 4 /ta2 out p5 3 /ta1 in p5 1 /ta0 in p5 0 /ta0 out p4 7 p4 2 / 1 p4 1 /rdy p4 0 /hold byte cnv ss reset x in x out p3 2 /ale v ss p3 1 /bhe e v cc p1 0 /a 8 /d 8 p8 1 /clk 0 p8 0 /cts 0 /rts 0 p0 0 /a 0 p8 2 /r x d 0 p8 3 /t x d 0 p8 6 /r x d 1 p8 7 /t x d 1 p0 2 /a 2 p0 1 /a 1 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p2 0 /a 16 /d 0 p1 2 /a 10 /d 10 p1 1 /a 9 /d 9 p1 3 /a 11 /d 11 p1 4 /a 12 d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p3 0 /r/w p2 2 /a 18 /d 2 p2 1 /a 17 /d 1 p2 3 /a 19 /d 3 p2 4 /a 20 /d 4 p2 5 /a 21 /d 5 p2 6 /a 22 /d 6 p2 7 /a 23 /d 7 outline 64p4b m37703m2bxxxsp 51 43 42 41 40 39 38 37 36 35 34 33 23 24 25 26 27 28 29 30 31 32 22 fig. 20.3.1 m37703m2bxxxsp pin configuration (top view)
7703 group 7702/7703 group users manual 20C5 20.4 functional description the m37703 has the same internal circuit as the m37702. the control registers in the sfr area and the memory assignment are also the same. however, part of the m37703 functions varies from the m37702s, because the number of m37703s pins is 64 pins. table 20.4.1 lists the differences between the m37703 and m37702. this paragraph describes the differences from the m37702. refer to the relevant functional descriptions of the m37702 about others. table 20.4.1 differences between the m37703 and m37702 parameters programmable i/o port port p0 port p1 port p2 port p3 port p4 port p5 port p6 port p7 port p8 timer ta0 ta1 ta2 ta3 ta4 tb0 tb1 tb2 serial i/o uart0 uart1 a-d converter package 20.4 functional description m37703m2bxxxsp 53 (in single-chip mode) 8 bits 8 bits 8 bits _____ 3 bits; without p3 3 /hlda pin 4 bits; without p4 3 to p4 6 pins 8 bits 4 bits; without p6 0 , p6 1 , p6 6 , and p6 7 pins 4 bits; without p7 3 to p7 6 pins 6 bits; without p8 4 and p8 5 pins 16 bits 5 8 with timer i/o pins: input pin (tai in ); output pin (tai out ) (i = 0 to 3) internal timer; without i/o pins with timer input pin (tb0 in ) internal timer; without i/o pins 2 clock synchronous or clock asynchronous clock asynchronous resolution 8 bits 5 1 analog input pin 4 channels: an 0 , an 1 , an 2 , an 7 pins; without an 3 to an 6 pins) 64-pin plastic molded sdip; 64p4b m37702m2bxxxfp 68 (in single-chip mode) 8 bits 8 bits 8 bits 4 bits 8 bits 8 bits 8 bits 8 bits 8 bits 16 bits 5 8 with timer i/o pins: input pin (taj in ); output pin (taj out ) (j = 0 to 4) with timer input pins: input pin (tbk in ) (k = 0 to 2) 2 clock synchronous or clock asynchronous clock synchronous or clock asynchronous resolution 8 bits 5 1 analog input pin 8 channels: an 0 to an 7 pins 80-pin plastic molded qfp; 80p6n-a
7703 group 7702/7703 group users manual 20C6 20.4 functional description 20.4.1 i/o pin the m37703 does not have the following pins of the m37702: ?port p3 3 ?ports p4 3 to p4 6 ?ports p6 0 , p6 1 , p6 6 , p6 7 ?ports p7 3 to p7 6 ?ports p8 4 , p8 5 (1) port direction register fix the bits of port pi (i = 3, 4, 6, 7, 8) direction register which do not have the corresponding pins to 1. all products of the m37703 need this procedure. do it regardless of the product type and the used mode. all bits of port pi direction register are cleared to 0 after reset. accordingly, follow the procedure shown by figure 20.4.1 in the initial setting program after reset. do not write 0 after that to the bits to be fixed to 1. paragraph 1.3.1 example for processing unused pins explains the examples when there are pins, however, those pins are not used. the above explanation is independent of that example explanation. (2) memory expansion and microprocessor modes _____ _____ the m37703 does not have the hlda pin, so that the hlda signal cannot be used in those modes. b1 b0 b2 b3 b4 b5 b6 b7 1 1111 11 11 1111 11 l be sure to set 1 to the bit indicated by using 1. though these bits do not have the corresponding pins, follow the above procedure. the above procedure is necessary whether or not other programmable i/o ports are used. port p3 direction register (address 9 16 ) port p4 direction register (address c 16 ) port p6 direction register (address 10 16 ) port p7 direction register (address 11 16 ) port p8 direction register (address 14 16 ) notes 1 : when executing the instruction to write to bits 4 to 7 of port p3 direction register, the value cannot be written into them. when reading to those bits, 0 is read. 2 : the bits which are not indicated by using 1 and bits 4 to 7 of port p3 direction register function as a programmable i/o port. just as in ports p0Cp2 and p5, set 0 when using as an input port, and set 1 when using as an output port. fig. 20.4.1 procedure of port pi (i = 3, 4, 6, 7, 8) direction register
7703 group 7702/7703 group users manual 20C7 20.4 functional description 20.4.2 timer a the m37703 does not have the i/o functions of timer a4. it c an be used only in the timer mode. fix bits 5 to 0 of the timer a4 mode register to 000000 2 . figure 20.4.2 shows the structure of the timer a4 mode regis ter. bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer a4 mode register (addresses 5a 16 ) 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits 0 0 bit at reset rw 5 to 0 0 rw 6 7 0 rw 0 rw fix these bits to 0. in timer mode, without pulse output and gate functions. 0 000 fig. 20.4.2 structure of timer a4 mode register 20.4.3 timer b the m37703 does not have the input functions of timers b1 an d b2. they can be used only in the timer mode. fix bits 1 and 0 of the timer b1 and b2 mode registers to 00 2 . figure 20.4.3 shows the structure of the timer b1 and b2 mod e registers. b7 b6 b5 b4 b3 b2 b1 b0 00 bit this bit is ignored in timer mode. nothing is assigned. bit name count source select bits functions at reset rw these bits are ignored in timer mode. 1 0 5 5 0 2 rw rw 3 rw rw timer b1 mode register (addresses 5c 16 ) timer b2 mode register (addresses 5d 16 ) 5 0 0 0 C undefined 4 undefined 5 6 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 rw 0 rw 0 C fix these bits to 0. in timer mode. fig. 20.4.3 structure of timer b1 and b2 mode registers
7703 group 7702/7703 group users manual 20C8 20.4 functional description 20.4.4 serial i/o the m37703s uart1 can be used only in the clock asynchronous serial i/o mode, uart mode. it cannot be used in the clock synchronous serial i/o mode. do not set the serial i/o mode select bits (bits 2 to 0 at address 38 16 ) to 001 2 to select the clock synchronous serial i/o mode. figure 20.4.4 shows the structure of the uart1 transmit/receive mode register. (1) clk 1 pin the m37703 does not have the clk 1 pin. set the internal/external clock select bit (bit 3 at address 38 16 ) to 0 to select the internal clock. fig. 20.4.4 structure of uart1 transmit/receive mode register b7 b6 b5 b4 b3 b2 b1 b0 bit 4 2 1 0 bit name at reset 0 rw functions b2 b1 b0 3 7 6 5 rw rw rw rw rw rw rw rw 0 0 0 0 serial i/o mode select bits 0 0 0: serial i/o disabled (p8 functions as a programmable i/o port.) 0 0 1: not selected 0 1 0: not selected 0 1 1: not selected 1 0 0: uart mode (transfer data length = 7 bits) 1 0 1: uart mode (transfer data length = 8 bits) 1 1 0: uart mode (transfer data length = 9 bits) 1 1 1: not selected sleep select bit (valid in uart mode) ( note ) parity enable bit (valid in uart mode) ( note ) odd/even parity select bit (valid in uart mode when parity enable bit is 1) ( note ) stop bit length select bit (valid in uart mode) ( note ) uart1 transmit/receive mode register (address 38 16 ) note: bits 4 to 6 are ignored in the clock synchronous serial i/o mode. (they may be either 0 or 1.) additionally, fix bit 7 to 0. 0 : odd parity 1 : even parity 0 : parity disabled 1 : parity enabled 0 : sleep mode cleared (ignored) 1 : sleep mode selected 0 : one stop bit 1 : two stop bits 0 0 0 0 fix these bits to 0. (to select internal clock.)
7703 group 7702/7703 group users manual 20C9 20.4 functional description ____ ____ (2) cts 1 /rts 1 pin ____ ____ ____ ____ the m37703 does not have the cts 1 /rts 1 pin. fix the cts/rts select bit (bit 2 at address 3c 16 ) to 1. figure 20.4.5 shows the structure of the uart1 transmit/receive control register 0 and figure 20.4.6 shows the structure of the port p8 direction register when using uart1. fix this bit to 1. bit 1 brg count source select bits bit name at reset rw functions b7 b6 b5 b4 b3 b2 b1 b0 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 uart1 transmit/receive control register 0 (address 3c 16 ) b1 b0 transmit register empty flag 0 : data present in transmit register. (during transmitting) 1 : no data present in transmit register. (transmitting completed) 1 0 0 0 7 to 4 0 2 rw rw ro 3 rw nothing is assigned. undefined C 1 fig. 20.4.5 structure of uart1 transmit/receive control register 0 fig. 20.4.6 structure of port p8 direction register when using uart1 bit corresponding pin functions 0 1 2 3 4 5 6 7 cts 0 / rts 0 pin rxd 0 pin txd 0 pin rxd 1 pin 0 : input mode 1 : output mode when using pin p8 2 as serial data input pin (rxd 0 ),set bit 2 to 0. port p8 direction register (address 14 16 ) b1 b0 b2 b3 b4 b5 b6 b7 clk 0 pin txd 1 pin at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw when using pin p8 6 as serial data input pin (rxd 1 ),set bit 6 to 0. fix these bits to 1. 11 : bits 0 to 3 are not used in uart1.
7703 group 7702/7703 group users manual 20C10 20.4 functional description 20.4.5 a-d converter the m37703s analog inputs are 4 channels: an 0 to an 2 and an 7 . (1) one-shot and repeat modes set the analog input select bits (bits 2 to 0 at address 1e 16 ) to one of 000 2 , 001 2 , 010 2 and 111 2 . set the bits of the port p7 direction register which do not have pins corresponding to analog inputs an 3 to an 6 to 1 to make them output mode. figure 20.4.7 shows the structure of the a-d control register and figure 20.4.8 shows the structure of the port p7 direction register when using a-d converter. (2) single sweep and repeat sweep modes set the bits of the port p7 direction register corresponding to an 0 to an 2 and an 7 pins to 0 to make them input mode. set the bits of the port p7 direction register which do not have pins corresponding to analog inputs an 3 to an 6 to 1 to make them output mode. the a-d register contents corresponding to analog inputs an 3 to an 6 , which do not have their pins, become undefined. fig. 20.4.7 structure of a-d control register b7 b6 b5 b4 b3 b2 b1 b0 a-d control register (address 1e 16 ) bit a-d conversion frequency ( ad ) select bit a-d conversion start bit trigger select bit 4 a-d operation mode select bits 2 1 0 bit name at reset 0 undefined rw functions 0 0 0 : an 0 selected 0 0 1 : an 1 selected 0 1 0 : an 2 selected 0 1 1 : not selected 1 0 0 : not selected 1 0 1 : not selected 1 1 0 : not selected 1 1 1 : an 7 selected (note 2) b2 b1 b0 0 : internal trigger 1 : external trigger 0 0 : one-shot mode 0 1 : repeat mode 1 0 : single sweep mode 1 1 : repeat sweep mode 0 : stop a-d conversion 1 : start a-d conversion b4 b3 notes 1: these bits are ignored in the single sweep and repeat sweep modes. (they may be either 0 or 1.) 2: when selecting an external trigger, the an 7 pin cannot be used as an analog input pin. 3: writing to each bit except bit 6 of the a-d control register must be performed while the a-d converter halts. analog input select bits (valid in one-shot and repeat modes) (note 1) 3 7 6 5 undefined undefined rw rw rw rw rw rw rw rw 0 0 0 0 0 : f 2 divided by 4 1 : f 2 divided by 2
7703 group 7702/7703 group users manual 20C11 fig. 20.4.8 structure of the port p7 direction register when using a-d converter 20.4 functional description bit corresponding bit name functions 0 1 2 3 4 5 6 an 0 pin an 2 pin 0: input mode 1: output mode port p7 direction register (address 11 16 ) b1 b0 b2 b3 b4 b5 b6 b7 an 1 pin at reset 0 when using these pins as a-d converters input pins, set the corresponding bits to 0. 7 an 7 pin/ad trg pin rw rw when using this pin as a-d converters input pin or external trigger input pin, set this bit to 0. 0: input mode 1: output mode 0 rw 0 rw 0 rw 0 rw 0 rw 0 rw 0 rw 1 111 fix these bits to 1.
7703 group 7702/7703 group users manual 20C12 20.5 electrical characteristics 20.5 electrical characteristics the m37703 electrical characteristics is the same as the m37702s except for the absolute maximum ratings shown in table 20.5.1 and the parameters of not existing pins of the m37703. refer to chapter 15. electrical characteristics . additionally, the m37703 standard characteristics is the same as the m37702s and refer to chapter 16. standard characteristics . table 20.5.1 absolute maximum ratings symbol parameter conditions ratings unit p d power dissipation ta = 25 c 1000 mw note: the electrical characteristics except above is the same as the m37702s.
7703 group 7702/7703 group users manual 20C13 type name m37703e2bxxxsp m37703e2axxxsp ( note 1 ) m37703e4bxxxsp m37703e4axxxsp ( note 1 ) 20.6 prom version in the prom version, programming to the built-in prom can be performed by using a general-purpose prom programmer and a programming adapter, which is suitable for the used microcomputer. the prom version of m37703 is the one time prom version. programming to the prom can be performed once in this version. the one time prom version has the same functions as the mask rom version except that the former has a built-in prom. table 20.6.1 lists the write address of prom version. the m37703 does not have the eprom version. use the eprom version of m37702 with a pitch converter for the m37703 evaluation. 20.6 prom version table 20.6.1 write address of prom version prom size (byte) 16k ram size (byte) 512 write address 1m mode 256k mode 1c000 16 to 1ffff 16 4000 16 to 7fff 16 32k 2048 18000 16 to 1ffff 16 0000 16 to 7fff 16 notes 1 : refer also to section 20.6.2 bus timing and eprom mode . 2 : a blank product of the one time prom version does not have the rom number, which is printed on the xxx position. for example, m37703e2bsp. 20.6.1 eprom mode the eprom mode of m37703 is the same as the m37702s. refer to section 19.2 eprom mode . the pin connections vary from the m37702s. figure 20.6.1 shows the pin connections in eprom mode.
7703 group 7702/7703 group users manual 20C14 20.6 prom version fig. 20.6.1 pin connections in eprom mode 64 63 62 61 60 59 58 57 56 55 54 53 52 50 49 48 47 46 45 44 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 av cc v ref p7 1 /an 1 av ss p7 2 /an 2 p7 7 /an 7 /ad trg p7 0 /an 0 p6 5 /tb0 in p6 4 /int 2 p6 3 /int 1 p6 2 /int 0 p5 7 /ta3 in p5 6 /ta3 out p5 5 /ta2 in p5 2 /ta1 out p5 4 /ta2 out p5 3 /ta1 in p5 1 /ta0 in p5 0 /ta0 out p4 7 p4 2 / 1 p4 1 /rdy p4 0 /hold byte cnv ss reset x in x out p3 2 /ale v ss p3 1 /bhe e v cc p1 0 /a 8 /d 8 p8 1 /clk 0 p8 0 /cts 0 /rts 0 p0 0 /a 0 p8 2 /r x d 0 p8 3 /t x d 0 p8 6 /r x d 1 p8 7 /t x d 1 p0 2 /a 2 p0 1 /a 1 p0 3 /a 3 p0 4 /a 4 p0 5 /a 5 p0 6 /a 6 p0 7 /a 7 p2 0 /a 16 /d 0 p1 2 /a 10 /d 10 p1 1 /a 9 /d 9 p1 3 /a 11 /d 11 p1 4 /a 12 d 12 p1 5 /a 13 /d 13 p1 6 /a 14 /d 14 p1 7 /a 15 /d 15 p3 0 /r/w p2 2 /a 18 /d 2 p2 1 /a 17 /d 1 p2 3 /a 19 /d 3 p2 4 /a 20 /d 4 p2 5 /a 21 /d 5 p2 6 /a 22 /d 6 p2 7 /a 23 /d 7 outline 64p4b m37703e2bxxxsp 51 43 42 41 40 39 38 37 36 35 34 33 23 24 25 26 27 28 29 30 31 32 22 a 8 a 7 a 6 a 5 a 4 a 3 a 2 a 1 a 0 a 9 a 10 a 11 a 12 a 13 a 14 a 15 d 0 d 1 d 2 d 4 d 5 d 6 d 7 d 3 ce oe v pp pgm ] vss vcc equivalent to m5m27c256k equivalent to m5m27c101k equivalent to m5m27c256k equivalent to m5m27c101k equivalent to m5m27c256k equivalent to m5m27c101k ] : connect an oscillating circuit. : eprom pins
7703 group 7702/7703 group users manual 20C15 20.6 prom version 20.6.2 bus timing and eprom mode the prom versions shown in table 20.6.2 have the different bus timing from other prom versions, mask rom, external rom versions. additionally, they can use only 256k mode as the eprom mode though its prom size is 32 kbytes or less. table 20.6.2 prom versions having peculiar bus timing bus timing type name m37703e2axxxsp m37703e4axxxsp t pzx(e C p1z) , t pzx(e C p2z) f(x in ) 8 mhz 8mhz < f(x in ) 16 mhz limits: 50 ns limits: 25 ns formulas: formulas: C 6.25 1 5 10 9 2 5 f(x in ) C 12.5 1 5 10 9 2 5 f(x in ) (1) bus timing the limits and formulas of the prom versions having the peculiar bus timing which is different from other prom versions are shown in table 20.6.2. when the user is planning to use the product shown in table 20.6.2 for evaluation or in early production and replace it later with the mask rom version, we recommend to use the substitute shown in table 20.6.3 for evaluation or in early production. however, the substitute version has the higher frequency of external clock input. there are no precaution about its operation. table 20.6.3 substitutes type name to be used substitute remark m37703e2axxxsp m37703e2bxxxsp the substitute has the higher frequency of external clock input. m37703e4axxxsp m37703e4bxxxsp (2) eprom mode the products shown in table 20.6.2 can use only 256k mode as the eprom mode. do not use 1m mode.
7703 group 7702/7703 group users manual 20C16 20.6 prom version memorandum
appendix appendix 1. memory assignment appendix 2. memory assignment in sfr area appendix 3. control registers appendix 4. package outlines appendix 5. countermeasures against noise appendix 6. q&a appendix 7. hexadecimal instruction code table appendix 8. machine instructions
appendix appendix 1. memory assignment 7702/7703 group users manual 21C2 appendix 1. memory assignment figure 1 to figure 5 show the memory assignment of the m37702 and the m37703 in each processor mode. refer to the memory assignment whose type name show suitable memory type and memory size. m37702m2bxxxfp memory type and memory size 000000 16 00007f 16 000080 16 00027f 16 00c000 16 00ffff 16 ?memory size/type......m2, e2 00047f 16 00a000 16 008000 16 l single-chip mode sfr area internal ram 512 bytes not used not used not used internal rom 16 kbytes internal rom 24 kbytes internal ram 1024 bytes sfr area ?memory size/type......m3 (note) ?memory size/type......md (note) sfr area internal ram 1024 bytes internal rom 32 kbytes note: these can be used only in the single-chip mode. fig. 1 memory assignment during single-chip mode (1)
appendix 1. memory assignment appendix 7702/7703 group users manual 21C3 fig. 2 memory assignment during single-chip mode (2) 000000 16 00007f 16 000080 16 00087f 16 008000 16 00ffff 16 004000 16 001000 16 ?memory size/type......m4, e4 l single-chip mode sfr area internal ram 2048 bytes not used internal rom 32 kbytes ?memory size/type......m6, e6 ?memory size/type......m8, e8 sfr area sfr area internal ram 2048 bytes internal ram 2048 bytes not used not used internal rom 48 kbytes internal rom 60 kbytes
appendix appendix 1. memory assignment 7702/7703 group users manual 21C4 01ffff 16 ff0000 16 000000 16 00007f 16 000080 16 00027f 16 00c000 16 00ffff 16 00087f 16 008000 16 010000 16 ffffff 16 000000 16 000002 16 000009 16 00007f 16 ? memory size/type . ..... m2, e2 l memory expansion mode sfr area internal ram 512 bytes ? memory size/type ...... m4, e4 bank 0 16 bank 1 16 bank ff 16 sfr area internal ram 2048 bytes external area external area external area internal rom 32 kbytes internal rom 16 kbytes external area external area fig. 3 memory assignment during memory expansion mode (1)
appendix 1. memory assignment appendix 7702/7703 group users manual 21C5 000000 16 00007f 16 000080 16 004000 16 00ffff 16 00087f 16 001000 16 010000 16 01ffff 16 ff0000 16 ffffff 16 000000 16 000002 16 000009 16 00007f 16 ? memory size/type......m6, e6 l memory expansion mode sfr area internal ram 2048 bytes bank 0 16 external area internal rom 48 kbytes ? memory size/type......m8, e8 sfr area internal ram 2048 bytes external area internal rom 60 kbytes bank 1 16 bank ff 16 external area external area external area fig. 4 memory assignment during memory expansion mode (2)
appendix appendix 1. memory assignment 7702/7703 group users manual 21C6 fig. 5 memory assignment during microprocessor mode 000000 16 00007f 16 000080 16 00ffff 16 010000 16 01ffff 16 ff0000 16 ffffff 16 000000 16 000002 16 000009 16 00007f 16 00027f 16 00087f 16 (note 2 ) external area ? memory size/type . .... . m2, e2, s1 ( note 1) l microprocessor mode sfr area internal ram 512 bytes ? memory size/type ..... . m4, e4, m6, e6, m8, e8, s4 ( note 1) bank 0 16 external area bank 1 16 bank ff 16 sfr area internal ram 2048 bytes external area (note 2 ) notes 1: these can be used only in the microprocessor mode . 2: interrupt vector table is assigned to addresses 00ffd6 16 to 00ffff 16 . set a rom to this area.
appendix 7702/7703 group users manual 21C7 appendix 2. memory assignment in sfr area appendix 2. memory assignment in sfr area figures 6 to 9 show the memory assignment in sfr area. the significations which are used in figures 6 to 9 is described below. fig. 6 memory assignment in sfr area (1) ? ? ? ? 10 16 11 16 12 16 13 16 port p8 direction register 14 16 15 16 16 16 17 16 18 16 19 16 1a 16 1b 16 1c 16 1d 16 1e 16 1f 16 0 16 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 b 16 c 16 d 16 e 16 f 16 a 16 address port p4 register port p5 register port p4 direction register port p5 direction register port p6 register port p7 register port p6 direction register port p7 direction register port p8 register a-d control register a-d sweep pin select register port p0 register port p1 register port p2 register port p3 register port p0 direction register port p1 direction register port p2 direction register port p3 direction register register name access characteristics state immediately after a reset rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw rw 00 16 00 16 ? ? 00 16 00 16 00 16 00000000 00 16 00000 ? 11 b7 b0 b7 b0 ? ? ? ? ? ? ? ? ? 00 16 ? ? ] : in the 7703 group, set 1 to the bit of which corresponding pin is nothing. (refer to section 20.4.1 input/output pins. ) rw ? 00 16 rw ???? ?? ?? ? ? ? ? 0000 ? ] ] ] ] ] : it is possible to read the bit state at reading. the written value becomes valid data. : it is possible to read the bit state at reading. the written value becomes invalid. : the written value becomes valid data. it is impossible to read the bit state. : nothing is assigned. it is impossible to read the bit state. the written value is ignored. rw ro wo access characteristics : 0 immediately after a reset. : 1 immediately after a reset. : undefined immediately after a reset. 0 1 ? : always 0 at reading 0 0 : always undefined at reading : 0 immediately after a reset. fix this bit to 0. ? state immediately after a reset
appendix appendix 2. memory assignment in sfr area 7702/7703 group users manual 21C8 uart0 transmit/receive control register 0 uart0 transmit/receive mode register uart0 baud rate register uart0 transmit buffer register uart1 receive buffer register register name uart0 transmit/receive control register 1 uart0 receive buffer register uart1 transmit/receive mode register uart1 baud rate register uart1 transmit buffer register uart1 transmit/receive control register 0 uart1 transmit/receive control register 1 30 16 31 16 32 16 33 16 34 16 35 16 36 16 37 16 38 16 39 16 3a 16 3b 16 3c 16 3d 16 3e 16 28 16 29 16 2b 16 2c 16 2d 16 2e 16 2f 16 2a 16 20 16 21 16 22 16 23 16 24 16 25 16 26 16 27 16 3f 16 address access characteristics rw wo wo b7 b0 wo rw ro state immediately after a reset b7 b0 00 16 ? ? ? a-d register 5 a-d register 1 a-d register 3 a-d register 2 a-d register 4 a-d register 0 a-d register 6 a-d register 7 ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro ro rw ro rw ro ro rw wo wo wo rw ro ro rw ro ro rw ro ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ???? 10 0 0 0000 00 1 0 ? 0 0 0000 0 ? 00 16 ? ? ? ???? 10 0 0 0000 00 1 0 ? 0 0 0000 0 ? fig. 7 memory assignment in sfr area (2)
appendix 7702/7703 group users manual 21C9 appendix 2. memory assignment in sfr area rw rw timer b2 register 40 16 41 16 42 16 43 16 44 16 45 16 46 16 47 16 48 16 49 16 50 16 51 16 52 16 53 16 54 16 55 16 56 16 57 16 58 16 59 16 5a 16 5b 16 5c 16 5d 16 5e 16 5f 16 4b 16 4c 16 4d 16 4e 16 4f 16 4a 16 address timer a2 register timer a3 register timer a4 register timer b0 register timer b1 register processor mode register one-shot start register timer a0 register up-down register timer a1 register register name count start register timer a1 mode register timer a2 mode register timer a3 mode register timer b0 mode register timer b1 mode register timer b2 mode register access characteristics rw b7 b0 rw rw wo state immediately after a reset 00 16 00 16 00 16 00 16 ? 00 16 b7 b0 00 16 rw rw timer a0 mode register timer a4 mode register (note 3) 0 00 0 0 0 0 0 0 0 0 0 0 00 0 00 0 00 0 0 0 0 0 rw rw ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ] 1: the access characteristics at addresses 46 16 to 4f 16 varies according to timer as operating mode. (refer to chapter 5. timer a. ) ] 2: the access characteristics at addresses 50 16 to 55 16 varies according to timer bs operating mode. (refer to chapter 6. timer b. ) ] 3: the access characteristics of bit 5 at addresses 5b 16 to 5d 16 varies according to timer bs operating mode. (refer to chapter 6. timer b. ) ] 4: the access characteristics of bit 1 at address 5e 16 and its state immediately after a reset vary according to the voltage level supplied to the cnv ss pin. (refer to section 2.5 processor modes. ) rw rw 00 0 00 0 ? ? 00 0 00 0 ? ? wo wo rw ] 3 ] 4 ] 3 ] 3 rw rw rw rw rw ] 2 ] 2 ] 2 ] 2 ] 2 ] 1 ] 1 ] 1 ] 1 ] 1 ] 1 ] 1 ] 1 ] 1 ] 1 ] 4 ] 2 ? fig. 8 memory assignment in sfr area (3)
appendix appendix 2. memory assignment in sfr area 7702/7703 group users manual 21C10 uart1 receive interrupt control register 60 16 61 16 62 16 63 16 64 16 65 16 66 16 67 16 68 16 69 16 70 16 71 16 72 16 73 16 74 16 75 16 76 16 77 16 78 16 79 16 7a 16 7b 16 7c 16 7d 16 7e 16 7f 16 6b 16 6c 16 6d 16 6e 16 6f 16 6a 16 address a-d conversion interrupt control register uart0 transmit interrupt control register uart1 transmit interrupt control register int 2 interrupt control register watchdog timer frequency select register register name watchdog timer register timer a0 interrupt control register timer a2 interrupt control register timer a3 interrupt control register timer a4 interrupt control register timer b1 interrupt control register timer b2 interrupt control register int 0 interrupt control register access characteristics rw b7 b0 rw state immediately after a reset 0 ? (note) b7 b0 uart0 receive interrupt control register timer a1 interrupt control register timer b0 interrupt control register int 1 interrupt control register 0 0 0 0 00 0 ] 5 : by writing dummy data to address 60 16 , a value fff 16 is set to the watchdog timer. the dummy data is not retained anywhere. rw ? ? ? rw rw rw rw rw rw rw rw rw rw rw rw rw rw 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 ? 0 00 0 0 00 0 0 00 0 0 0 0 0 0 0 ? ? ? ] 5 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 0 note: a value fff 16 is set to the watchdog timer. (refer to chapter 9. watchdog timer .) fig. 9 memory assignment in sfr area (4)
appendix appendix 3. control registers 7702/7703 group users manual 21C11 appendix 3. control registers the register structure of each control register assignment i n the sfr area are shown on the following pages. the view of the register structure is described below. 0 1 0 xxx register (address xx 16 ) b1 b0 b2 b3 b4 b5 b6 b7 0 ] 1 ] 2 ] 3 2 3 ... select bit 0 : ... 1 : ... ... select bit 0 : ... 1 : ... the value is 0 at reading. 0 : ... 1 : ... fix this bit to 0. 4 7 t o 5 nothing is assigned. 5 rw wo ro rw rw 0 0 0 bit bit name this bit is ignored in ... mode. functions at reset rw ... flag undefined undefined ] 1 blank 0 1 5 : this bit is not used in the specific mode or state. it may be either 0 or 1. : nothing is assigned. ] 2 0 1 undefined ] 3 rw ro value may be either 0 or 1. wo reading. however, the bit with the commentaries of the valu e is 0 at reading in the functions column or the notes is always 0 at reading.(see ] 4 above.) ? commentaries of the value is 0 at reading in the functio ns column or the notes is always 0 at reading.(see ] 4 above.) the written value becomes invalid. accordingly, the written value may be 0 or 1. ] 4 e : set to 1 at writing. : set to 0 at writing. : set to 0 or 1 to meet the purpose. : 0 immediately after a reset. : 1 immediately after a reset. : undefined immediately after a reset. : it is possible to read the bit state at reading. the writt en value becomes valid data. : it is possible to read the bit state at reading. the writt en value becomes invalid. accordingly, the written : the written value becomes valid data. it is impossible to read the bit state. the value is undefined at it is impossible to read the bit state. the value is undefi ned at reading. however, the bit with the :
appendix appendix 3. control registers 7702/7703 group users manual 21C12 port pi register bit bit name functions 0 1 2 3 4 5 6 7 port pi 0 port pi 2 port pi 3 port pi 4 port pi 6 data is input/output to/from a pin by reading/writing from/to the corres- ponding bit. port pi 5 port pi register (i = 0 to 8) (addresses 2 16 , 3 16 , 6 16 , 7 16 , a 16 , b 16 , e 16 , f 16 , 12 16 ) b1 b0 b2 b3 b4 b5 b6 b7 port pi 1 port pi 7 at reset rw undefined note: bits 7 to 4 of the port p3 register cannot be written (they may be either 0 or 1) and are fixed to 0 at reading. undefined undefined undefined undefined undefined undefined undefined 0 : l level 1 : h level rw rw rw rw rw rw rw rw port pi direction register bit bit name functions 0 1 2 3 4 5 6 7 port pi 0 direction bit port pi 2 direction bit port pi 3 direction bit port pi 4 direction bit port pi 6 direction bit 0 : input mode (functions as an input port) 1 : output mode (functions as an output port) port pi 5 direction bit port pi direction register (i = 0 to 8) (addresses 4 16 , 5 16 , 8 16 , 9 16 , c 16 , d 16 , 10 16 , 11 16 , 14 16 ) b1 b0 b2 b3 b4 b5 b6 b7 port pi 1 direction bit port pi 7 direction bit at reset rw 0 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw notes 1: bits 7 to 4 of the port p3 direction register cannot be written (they may be either 0 or 1) and are fixed to 0 at reading. 2: in the memory expansion mode or the microprocessor mode, fix bits 0 and 1 of the port p4 direction register to 0. 7703 group fix the following bits which do not have the corresponding pin to 1. ? bit 3 of port p3 direction register ? bits 3 to 6 of port p4 direction register ? bits 0, 1, 6, and 7 of port p6 direction register ? bits 3 to 6 of port p7 direction register ? bits 4 and 5 of port p8 direction register bit corresponding pin b7 b6 b5 b4 b3 b2 b1 b0 pi 7 pi 6 pi 5 pi 4 pi 3 pi 2 pi 1 pi 0
appendix appendix 3. control registers 7702/7703 group users manual 21C13 a-d control register b7 b6 b5 b4 b3 b2 b1 b0 a-d control register (address 1e 16 ) bit a-d conversion frequency ( ad ) select bit a-d conversion start bit trigger select bit 4 a-d operation mode select bits 2 1 0 bit name at reset 0 undefined rw functions 0 0 0 : an 0 selected 0 0 1 : an 1 selected 0 1 0 : an 2 selected 0 1 1 : an 3 selected 1 0 0 : an 4 selected 1 0 1 : an 5 selected 1 1 0 : an 6 selected 1 1 1 : an 7 selected (note 2) b2 b1 b0 0 : internal trigger 1 : external trigger 0 0 : one-shot mode 0 1 : repeat mode 1 0 : single sweep mode 1 1 : repeat sweep mode 0 : stop a-d conversion 1 : start a-d conversion b4 b3 notes 1: these bits are ignored in the single sweep and repeat sweep mode. (they may be either 0 or 1.) 2: when selecting an external trigger, the an 7 pin cannot be used as an analog input pin. 3: writing to each bit (except bit 6) of the a-d control register must be performed while the a-d converter halts. analog input select bits (valid in one-shot and repeat modes) (note 1) 3 7 6 5 undefined undefined rw rw rw rw rw rw rw rw 0 0 0 0 0 : f 2 divided by 4 1 : f 2 divided by 2
appendix appendix 3. control registers 7702/7703 group users manual 21C14 a-d sweep pin select register b7 b6 b5 b4 b3 b2 b1 b0 a-d sweep pin select register (address 1f 16 ) bit 1 0 bit name at reset 1 undefined rw functions notes 1: these bits are invalid in the one-shot and repeat modes. (they may be either 0 or 1.) 2: when selecting an external trigger, the an 7 pin cannot be used as an analog input pin. 3: writing to each bit of the a-d sweep pin select register must be performed while the a-d converter halts. 7 to 2 rw 0 0 : an 0 , an 1 (2 pins) 0 1 : an 0 to an 3 (4 pins) 1 0 : an 0 to an 5 (6 pins) 1 1 : an 0 to an 7 (8 pins) (note 2) a-d sweep pin select bits (valid in single sweep and repeat sweep mode ) (note 1) b1 b0 1 rw nothing is assigned. C a-d register i a-d register 0 (addresses 20 16 ) a-d register 1 (addresses 22 16 ) a-d register 2 (addresses 24 16 ) a-d register 3 (addresses 26 16 ) a-d register 4 (addresses 28 16 ) a-d register 5 (addresses 2a 16 ) a-d register 6 (addresses 2c 16 ) a-d register 7 (addresses 2e 16 ) bit 7 to 0 at reset undefined rw functions ro reads an a-d conversion result. b7 b6 b5 b4 b3 b2 b1 b0
appendix appendix 3. control registers 7702/7703 group users manual 21C15 uarti transmit/receive mode register b7 b6 b5 b4 b3 b2 b1 b0 bit 4 2 1 0 bit name at reset 0 rw functions b2 b1 b0 3 7 6 5 rw rw rw rw rw rw rw rw 0 0 0 0 serial i/o mode select bits 0 0 0 : serial i/o disabled (p8 functions as a programmable i/o port.) 0 0 1 : clock synchronous serial i/o mode 0 1 0 : not selected 0 1 1 : not selected 1 0 0 : uart mode (transfer data length = 7 bits) 1 0 1 : uart mode (transfer data length = 8 bits) 1 1 0 : uart mode (transfer data length = 9 bits) 1 1 1 : not selected sleep select bit (valid in uart mode) ( note ) parity enable bit (valid in uart mode) ( note ) odd/even parity select bit (valid in uart mode when parity enable bit is 1) ( note ) stop bit length select bit (valid in uart mode) ( note ) internal/external clock select bit uart0 transmit/receive mode register (address 30 16 ) uart1 transmit/receive mode register (address 38 16 ) note: bits 4 to 6 are ignored in the clock synchronous serial i/o mode. (they may be either 0 or 1.) additionally, fix bit 7 to 0. 0 : odd parity 1 : even parity 0 : parity disabled 1 : parity enabled 0 : sleep mode cleared (ignored) 1 : sleep mode selected 0 : internal clock 1 : external clock 0 : one stop bit 1 : two stop bits 0 0 0 b7 b0 uart0 baud rate register (address 31 16 ) uart1 baud rate register (address 39 16 ) functions bit at reset rw 7 to 0 can be set to 00 16 to ff 16 . assuming that the set value = n, brgi divides the count source frequency by n + 1. undefined wo uarti baud rate register (brgi)
appendix appendix 3. control registers 7702/7703 group users manual 21C16 uarti transmit buffer register b7 b0 bit 8 to 0 at reset undefined rw functions wo b7 b0 (b15) (b8) 15 to 9 C undefined uart0 transmit buffer register (addresses 33 16 , 32 16 ) uart1 transmit buffer register (addresses 3b 16 , 3a 16 ) nothing is assigned. transmit data is set. uarti transmit/receive control register 0 cts/rts select bit bit 1 brg count source select bits bit name at reset rw functions b7 b6 b5 b4 b3 b2 b1 b0 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 uart0 transmit/receive control register 0 (address 34 16 ) uart1 transmit/receive control register 0 (address 3c 16 ) b1 b0 0 : cts function selected. 1 : rts function selected. transmit register empty flag 0 : data present in transmit register. (during transmitting) 1 : no data present in transmit register. (transmitting completed) 1 0 0 0 7 to 4 0 2 rw rw ro 3 rw nothing is assigned. undefined C
appendix appendix 3. control registers 7702/7703 group users manual 21C17 uarti transmit/receive control register 1 bit bit name at reset 5 framing error flag (valid in uart mode) 0 0 : no framing error 1 : framing error detected rw functions b7 b6 b5 b4 b3 b2 b1 b0 uart0 transmit/receive control register 1 (address 35 16 ) uart1 transmit/receive control register 1 (address 3d 16 ) notes 1: bits 7 to 4 are cleared to 0 when clearing the receive enable bit to 0 or when reading the low-order byte of the uarti receive buffer register (addresses 36 16 , 3e 16 ) out . 2: bits 5 to 7 are ignored in the clock synchronous serial i/o mode. 0 transmit enable bit 0 0 : transmission disabled 1 : transmission enabled 1 transmit buffer empty flag 1 0 : data present in transmit buffer register. 1 : no data present in transmit buffer register. 2 receive enable bit 0 0 : reception disabled 1 : reception enabled 3 receive complete flag 0 0 : no data present in receive buffer register. 1 : data present in receive buffer register. 4 overrun error flag 0 0 : no overrun error 1 : overrun error detected 6 parity error flag (valid in uart mode) 0 0 : no parity error 1 : parity error detected 7 error sum flag (valid in uart mode) 0 0 : no error 1 : error detected (notes 1, 2) (notes 1, 2) (notes 1, 2) (note 1) rw ro rw ro ro ro ro ro uarti receive buffer register b7 b0 bit 8 to 0 at reset undefined rw functions ro b7 b0 (b15) (b8) 15 to 9 C uart0 receive buffer register (addresses 37 16 , 36 16 ) uart1 receive buffer register (addresses 3f 16 , 3e 16 ) nothing is assigned. the value is 0 at reading. receive data is read out from here. 0
appendix appendix 3. control registers 7702/7703 group users manual 21C18 count start register bit timer b2 count start bit timer b1 count start bit timer b0 count start bit timer a4 count start bit timer a3 count start bit timer a2 count start bit timer a1 count start bit timer a0 count start bit bit name at reset 0 0 0 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 count start register (address 40 16 ) 0 : stop counting 1 : start counting rw rw rw rw rw rw rw rw 0 1 2 3 4 5 6 7 one-shot start register bit 7 to 5 nothing is assigned. timer a4 one-shot start bit timer a3 one-shot start bit timer a2 one-shot start bit timer a1 one-shot start bit timer a0 one-shot start bit bit name at reset 0 0 undefined 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 one-shot start register (address 42 16 ) 1 : start outputting one-shot pulse (valid when selecting internal trigger.) the value is 0 at reading. 0 1 2 3 4 wo wo wo wo wo C
appendix appendix 3. control registers 7702/7703 group users manual 21C19 up-down register bit bit name at reset 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 up-down register (address 44 16 ) 0 0 0 timer a4 up-down bit timer a3 up-down bit timer a2 up-down bit timer a1 up-down bit timer a0 up-down bit timer a2 two-phase pulse signal processing select bit (note) timer a3 two-phase pulse signal processing select bit (note) timer a4 two-phase pulse signal processing select bit (note) 0 : down-count 1 : up-count this function is valid when the contents of the up-down register is selected as the up-down switching factor. 0 : two-phase pulse signal processing function disabled 1 : two-phase pulse signal processing function enabled when not using the two-phase pulse signal processing function, make sure to set the bit to ?. the value is ??at reading. note: use the ldm or sta instruction when writing to bits 5 to 7. 0 1 2 3 4 5 6 7 rw rw rw rw rw wo wo wo
appendix appendix 3. control registers 7702/7703 group users manual 21C20 timer ai register timer ai mode register b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits have different functions according to the operating mode. undefined rw bit 7 5 4 3 1 bit name at reset 0 0 0 0 0 0 0 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 0 0 : timer mode 0 1 : event counter mode 1 0 : one-shot pulse mode 1 1 : pulse width modulation (pwm) mode b1 b0 these bits have different functions according to the operating mode. operating mode select bits 6 2 0 rw rw rw rw rw rw rw rw
appendix appendix 3. control registers 7702/7703 group users manual 21C21 timer mode b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0000 16 to ffff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined rw gate function select bits pulse output function select bit 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 0 0 : timer mode 0 : no pulse output (tai out pin functions as a programmable i/o port.) 1 : pulse output (tai out pin functions as a pulse output pin.) 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b4 b3 0 0 0 0 : no gate function 0 1 : (tai in pin functions as a prog- rammable i/o port.) 1 0 : gate function (counter counts only while tai in pins input signal is l level.) 1 1 : gate function (counter counts only while tai in pins input signal is h level.) bit 4 at reset rw 0 2 0 rw 0 rw 0 rw 3 0 rw 0 rw 5 0 rw 6 7 0 rw 0 rw fix this bit to 0 in the timer mode. 0
appendix appendix 3. control registers 7702/7703 group users manual 21C22 event counter mode b7 b6 b5 b4 b3 b2 b1 b0 001 bit up-down switching factor select bit count polarity select bit bit name these bits are ignored in event counter mode. fix this bit to ??in event counter mode. 5 : it may be either ??or ?. 7 functions 0 : counts at falling edge of external signal 1 : counts at rising edge of external signal 0 : contents of up-down register 1 : input signal to tai out pin at reset 0 0 0 0 0 rw pulse output function select bit operating mode select bits 1 0 : no pulse output (tai out pin functions as a programmable i/o port.) 1 : pulse output (tai out pin functions as a pulse output pin.) 0 1 : event counter mode b1 b0 0 0 0 55 0 2 rw rw 3 4 5 6 rw rw rw rw rw rw timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) rw 15 to 0 bit functions at reset rw these bits can be set to ?000 16 ?to ?fff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1 when down-counting, or by ffff 16 ?n + 1 when up-counting. when reading, the register indicates the counter value. undefined
appendix appendix 3. control registers 7702/7703 group users manual 21C23 one-shot pulse mode b7 b0 b7 b0 (b15) (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0001 16 to ffff 16 . assuming that the set value = n, the h level width of the one-shot pulse output from the tai out pin is expressed as follows : n / f i . undefined f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) wo trigger select bits fix this bit to 1 in one-shot pulse mode. 1 ?@ bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 1 0 : one-shot pulse mode 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b4 b3 fix this bit to 0 in one-shot pulse mode. 10 1 0 0 : writing 1 to one-shot start register 0 1 (tai in pin functions as a prog- rammable i/o port.) 1 0 : falling edge of tai in pins input signal 1 1 : rising edge of tai in pins input signal bit at reset 0 0 0 0 0 0 0 0 rw 0 4 0 2 3 5 6 rw rw rw rw rw rw rw rw operating mode select bits
appendix appendix 3. control registers 7702/7703 group users manual 21C24 pulse width modulation (pwm) mode b7 b0 b7 b0 timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 15 to 0 these bits can be set to 0000 16 to fffe 16 . assuming that the set value = n, the h level width of the pwm pulse output from the tai out pin is expressed as follows: undefined (b15) (b8) wo n f i f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) (b15) b7 b0 b7 b0 (b8) timer a0 register (addresses 47 16 , 46 16 ) timer a1 register (addresses 49 16 , 48 16 ) timer a2 register (addresses 4b 16 , 4a 16 ) timer a3 register (addresses 4d 16 , 4c 16 ) timer a4 register (addresses 4f 16 , 4e 16 ) functions bit at reset rw 7 to 0 15 to 8 undefined undefined these bits can be set to 00 16 to ff 16 . assuming that the set value = m, pwm pulses period output from the tai out pin is expressed as follows: (m + 1)(2 8 C 1) f i wo these bits can be set to 00 16 to fe 16 . assuming that the set value = n, the h level width of the pwm pulse output from the tai out pin is expressed as follows: n(m + 1) f i wo f i : frequency of count source (f 2 , f 16 , f 64 , or f 512 ) b7 b6 b5 b4 b3 b2 b1 b0 timer ai mode register (i = 0 to 4) (addresses 56 16 to 5a 16 ) 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits 11 1 at reset 0 rw trigger select bits fix this bit to 1 in pwm mode. 1 operating mode select bits bit name functions 1 1 : pwm mode b1 b0 b4 b3 16/8-bit pwm mode select bit 0 0 : writing 1 to count start register 0 1 : in pin functions as a pro- grammable i/o port.) 1 0 : falling edge of tai in pins input signal 1 1 : rising edge of tai in pins input signal bit 0 : as a 16-bit pulse width modulator 1 : as an 8-bit pulse width modulator 4 0 2 3 5 6 0 0 0 0 0 0 0 rw rw rw rw rw rw rw rw
appendix appendix 3. control registers 7702/7703 group users manual 21C25 timer bi register b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) functions bit at reset rw 15 to 0 these bits have different functions according to the operating mode. undefined rw timer bi mode register nothing is assigned. these bits have different functions according to the operating mode. 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 0 0 : timer mode 0 1 : event counter mode 1 0 : pulse period/pulse width measurement mode 1 1 : not selected b1 b0 bit 5 at reset rw 0 2 0 rw rw rw 6 7 note: bit 5 is ignored in the timer mode and event counter mode; its value is undefined at reading. 3 0 0 rw 0 C undefined 4 ro (note) undefined rw 0 rw 0 these bits have different functions according to the operating mode.
appendix appendix 3. control registers 7702/7703 group users manual 21C26 timer mode b7 b6 b5 b4 b3 b2 b1 b0 00 bit this bit is ignored in timer mode. nothing is assigned. bit name count source select bits 5 : it may be either ??or ?. functions at reset rw these bits are ignored in timer mode. operating mode select bits 1 0 0 : timer mode b1 b0 0 5 5 0 2 rw rw 3 rw rw timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 5 0 0 0 undefined 4 undefined 5 6 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 rw 0 rw 0 b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) rw 15 to 0 bit functions at reset these bits can be set to ?000 16 ?to ?fff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined rw
appendix appendix 3. control registers 7702/7703 group users manual 21C27 event counter mode b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) rw 15 to 0 bit functions at reset rw these bits can be set to 0000 16 to ffff 16 . assuming that the set value = n, the counter divides the count source frequency by n + 1. when reading, the register indicates the counter value. undefined 0 0 : count at falling edge of external signal 0 1 : count at rising edge of external signal 1 0 : counts at both falling and rising edges of external signal 1 1 : not selected b7 b6 b5 b4 b3 b2 b1 b0 01 bit count polarity select bits bit name these bits are ignored in event counter mode. this bit is ignored in event counter mode. 5 : it may be either 0 or 1. 7 functions at reset 0 0 0 undefined rw operating mode select bits 1 0 1 : event counter mode b1 b0 0 0 0 55 0 2 rw rw 3 4 5 6 rw rw rw rw timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) b3 b2 nothing is assigned. undefined 5
appendix appendix 3. control registers 7702/7703 group users manual 21C28 pulse period/pulse width measurement mode b7 b0 b7 b0 (b15) (b8) timer b0 register (addresses 51 16 , 50 16 ) timer b1 register (addresses 53 16 , 52 16 ) timer b2 register (addresses 55 16 , 54 16 ) functi ons bit at reset rw 15 to 0 the measurement result of pulse period or pulse width is read out. undefined ro measurement mode select bits 1 operating mode select bits bit name functions b7 b6 b5 b4 b3 b2 b1 b0 timer bi mode register (i = 0 to 2) (addresses 5b 16 to 5d 16 ) 1 0 : pulse period/pulse width measurement mode 7 0 0 : f 2 0 1 : f 16 1 0 : f 64 1 1 : f 512 b7 b6 count source select bits b1 b0 b3 b2 nothing is assigned. 0 1 0 0 : pulse period measurement (interval between falling edges of measurement pulse) 0 1 : pulse period measurement (interval between rising edges of measurement pulse) 1 0 : pulse width measurement (interval from a falling edge to a rising edge, and from a rising edge to a falling edge of measurement pulse) 1 1 : not selected bit at reset undefined 0 rw 4 0 2 3 6 rw rw rw rw C rw rw 5 0 0 0 timer bi overflow flag (note) 0 : no overflow 1 : overflowed undefined ro 0 0 note: the timer bi overflow flag is cleared to 0 by writing to the timer bi mode register with the count start bit = 1.
appendix appendix 3. control registers 7702/7703 group users manual 21C29 bit bit name functions at reset rw 0 1 2 3 4 5 6 7 processor mode bits software reset bit interrupt priority detection time select bits clock 1 output select bit (note 2) 0 0 0 0 0 0 : single-chip mode 0 1 : memory expansion mode 1 0 : microprocessor mode 1 1 : not selected the microcomputer is reset by writing 1 to this bit. the value is 0 at reading. 0 0 : 7 cycles of 0 1 : 4 cycles of 1 0 : 2 cycles of 1 1 : not selected 0 : clock 1 output disabled (p4 2 functions as a programmable i/o port.) 1 : clock 1 output enabled (p4 2 functions as a clock 1 out- put pin.) 0 0 b1 b0 b5 b4 processor mode register (address 5e 16 ) (note 1) notes 1: while supplying the vcc level to the cnvss pin, this bit becomes 1 after a reset. (fixed to 1.) 2: this bit is ignored in the microprocessor mode. (it may be either 0 or 1.) b1 b0 b2 b3 b4 b5 b6 b7 0 rw rw wait bit rw wo 0 rw 0 rw fix this bit to 0. rw rw 0 : software wait is inserted when accessing external area. 1 : no software wait is inserted when accessing external area. processor mode register
appendix appendix 3. control registers 7702/7703 group users manual 21C30 watchdog timer register watchdog timer register (address 60 16 ) bit initializes the watchdog timer. when a dummy data is written to this register, the watchdog timer? value is initialized to ?ff 16 .?(dummy data: 00 16 to ff 16 ) at reset undefined rw functions 7 to 0 b7 b0 watchdog timer frequency select register 0 : f 512 1 : f 32 at reset undefined 0 rw functions b7 b6 b5 b4 b3 b2 b1 b0 watchdog timer frequency select register (address 61 16 ) bit nothing is assigned. watchdog timer frequency select bit bit name 0 7 to 1 rw
appendix appendix 3. control registers 7702/7703 group users manual 21C31 interrupt control register b7 b6 b5 b4 b3 b2 b1 b0 a-d conversion, uart0 and 1 transmit, uart0 and 1 receive, timers a0 to a4, timers b0 to b2 interrupt control registers (addresses 70 16 to 7c 16 ) bit 7 to 4 interrupt request bit 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request interrupt priority level select bits 3 rw rw rw rw undefined 0 0 0 nothing is assigned. note: use the seb or clb instruction to set each interrupt control register. b7 b6 b5 b4 b3 b2 b1 b0 int 0 to int 2 interrupt control registers (addresses 7d 16 to 7f 16 ) bit 4 interrupt request bit (note 1) 2 1 0 bit name at reset 0 rw functions 0 0 0 : level 0 (interrupt disabled) 0 0 1 : level 1 low level 0 1 0 : level 2 0 1 1 : level 3 1 0 0 : level 4 1 0 1 : level 5 1 1 0 : level 6 1 1 1 : level 7 high level b2 b1 b0 0 : no interrupt request 1 : interrupt request 0 : edge sense 1 : level sense notes 1: the int 0 to int 2 interrupt request bits are invalid when selecting the level sense. interrupt priority level select bits 3 7, 6 5 rw rw rw rw rw rw 0 0 undefined 0 0 0 polarity select bit 0 : set the interrupt request bit at ??level for level sense and at falling edge for edge sense. 1 : set the interrupt request bit at ??level for level sense and at rising edge for edge sense. level sense/edge sense select bit nothing is assigned. 2: use the seb or clb instruction to set the int 0 to int 2 interrupt interrupt control registers.

appendix 7702/7703 group users manual 21C33 appendix 4. package outlines
appendix 7702/7703 group users manual 21C34 appendix 4. package outlines
7702/7703 group users manual 21C35 appendix appendix 5. countermeasures against noise appendix 5. countermeasures against noise the following describes some examples of countermeasures against noise. although the effect depends on the system, refer to the following if the problem being relevant to noise occurs. 1. reduction in wiring length wiring on a circuit board can serve as an antenna that pulls in noise into the microcomputer. shorter the total length of wiring (in mm), the smaller the possibility of pulling in noise into the microcomputer. (1) ______ wiring of reset pin ______ reduce the length of wiring connected to the reset pin. ______ especially, a capacitor that is inserted between the reset and vss pins must be connected to these pins in the shortest possible distance (within 20 mm). reasons: ______ if noise gets into the reset pin, the microcomputer will restart op- erating before its internal state is completely initialized, which can cause a program runaway. ______ fig. 10 wiring of reset pin reset reset circuit noise vss vss m37702 reset circuit vss reset vss m37702 o . k . n . g .
7702/7703 group users manual 21C36 appendix appendix 5. countermeasures against noise (2) wiring of clock input/output pins reduce the length of wiring connected to the clock input/output pins. connect the lead wire on the ground side of a capacitor connected to the oscillator and the microcomputers vss pin in the shortest possible distance (within 20 mm). separate the vss pattern for oscillation purpose from the other vss patterns. (refer to figure 19.) reasons: the microcomputer operates synchronously with the clock generated by the oscillation circuit. if noise gets into the clock input/ output pins, the clock waveform is disturbed, which can cause the microcomputer to malfunction or a program runaway. furthermore, if noise causes a potential difference between the microcomputers vss level and the oscillators vss level, the oscillator cannot generate an exact clock. (3) wiring of cnvss pin when connecting the cnvss and vss pins, connect them in the shortest possible distance. reasons: the voltage level on the cnvss pin affects the selection of microcomputers processor modes. if noise causes a potential difference between the voltage levels of the cnvss and vss pins when these pins are connected, the microcomputers processor mode will become unstable, causing the microcomputer to malfunction or a program runaway. fig. 11 wiring of clock input/output pins fig. 12 wiring of cnvss pin noise x in x out vss x in x out vss m37702 m37702 n . g . o . k . noise cnvss vss m37702 cnvss vss m37702 o . k . n . g .
7702/7703 group users manual 21C37 appendix appendix 5. countermeasures against noise (4) wiring of cnvss (v pp ) pin of built-in prom version < in single-chip or memory expansion mode> l connect the cnvss (v pp ) pin to the microcomputers vss pin in the shortest possible distance. l if the wiring cannot be shortened, insert a resistor of about 5 kohms as close to the cnvss (v pp ) pin as possible. by way of this resistor, connect the cnvss (v pp ) pin to the vss pin. < in microprocessor mode> l connect the cnvss (v pp ) and vcc pins in the shortest possible distance. reasons: the cnvss (v pp ) pin serves as a power source input pin for the built-in prom, and this pin has a reduced impedance to allow a programming current to flow in when programming to the built-in prom. (this means that noise gets in easily.) if noise gets into the cnvss (v pp ) pin, abnormal instruction codes or data will be read out from the built-in prom, causing a program runaway. in microprocessor mode shortest possible distance connect the cnvss pin to the vcc pin in the shortest possible distance. ?? cnv ss (v pp ) v cc m37702 shortest possible distance approx. 5 kohms connect the cnvss pin to the vss pin in the shortest possible distance. cnv ss (v pp ) v ss in single-chip and memory expansion modes m37702 ] the above processing is unnecessary for the byte (v pp ) pin. fig. 13 wiring of cnvss (v pp ) pin of built-in prom version
7702/7703 group users manual 21C38 appendix appendix 5. countermeasures against noise 2. inserting bypass capacitor between vss and vcc lines insert a bypass capacitor of about 0.1 m f between the vss and vcc lines. when inserting this bypass capacitor, make sure that the following conditions are satisfied. l wiring length between the vss pin and the bypass capacitor equals that between the vcc pin and the bypass capacitor. l wiring between the vss pin and the bypass capacitor and that between the vcc pin and the bypass capacitor have the shortest possible length. l the vss and vcc lines both have broader wiring width than the other signal wires. bypass capacitor aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa aa vcc vss m37702 wiring pattern wiring pattern fig. 14 bypass capacitor between vss and vcc lines
7702/7703 group users manual 21C39 appendix appendix 5. countermeasures against noise 3. wiring processing of analog input pin, analog power source pin and others (1) processing of analog input pin l connect a resistor in series to the analog signal wire connecting to an analog input pin at the position closest possible to the microcomputer. l insert a capacitor between the analog input pin and avss pin at a position closest possible to the avss pin. reasons: normally, the signal which is input to the analog input pin is an output signal from a sensor. a sensor used to detect changes in event is in many cases located away from the board on which the microcomputer is mounted. accordingly, wiring from the sensor to the analog input pin inevitably becomes long. this long wiring can serve as an antenna that pulls in noise into the microcomputer, letting noise get into the analog input pin easily. additionally, if the capacitor between the analog input pin and avss pin is grounded away from the avss pin, noise on that ground can get into the microcomputer via the capacitor. an i avss thermistor noise m37702 ri ci reference value ri : approximately 100 to 1000 ci : approximately 100 to 1000 pf notes 1 : make sure that the external circuit of the ani pin is designed so that the ani pin can be charged/discharged within 1 cycle of ad . 2 : this resistor is used to divide resistance from the thermistor. (note 2) n . g . o . k o . k fig. 15 example for protecting analog input pin against noise by using thermistor
7702/7703 group users manual 21C40 appendix appendix 5. countermeasures against noise (2) processing of analog power source pins and others l for each of the vcc, avcc, and v ref pins, use separated power sources. l insert capacitors between the avcc and avss pin, and between the v ref and avss pin, respectively. reasons: avoids affecting the a-d converter due to noise on vcc. avcc avss m37702 reference value c1 0.47 f c2 0.47 f note : connect capacitors with the thickest possible wiring in the shortest possible distance. v ref an i c1 c2 (sensor, and others) fig. 16 processing of analog power source pin and others
7702/7703 group users manual 21C41 appendix appendix 5. countermeasures against noise 4. consideration to oscillator the oscillator that generates the fundamental clock of the microcomputers operation requires careful consideration not to be affected by the other signals. (1) isolation from signal wires where a large current flows the signal wires where a large current exceeding the microcomputers current limits accepted flows must be located as far away from the microcomputer (especially the oscillator) as possible. reasons: a system using a microcomputer contains signal wires to control, for example, motors, leds, and thermal heads. when a large current flows in these signal wires, noise due to mutual inductance is generated. (2) isolation from signal wires whose levels change rapidly l the signal wires whose levels change rapidly must be located as far away from the oscillator as possible. l make sure that signal wires whose levels change rapidly do not cross any other clock-related or noise-susceptible signal wires. reasons: the signal wires whose voltage levels change rapidly tend to affect other signal wires as the signal level changes from high to low or from low to high. especially if these signal wires cross a clock-related signal wire, they can disturb the clock waveform, causing the microcomputer to malfunction or a program runaway. fig. 17 connection of signal wires where a large current flows x in x out vss m m37702 mutual inductance large current x in x out vss ] must not cross other signal wires. m37702 ] i/o pin for a signal whose level changes rapidly fig. 18 wiring of rapidly level changing signal wire
7702/7703 group users manual 21C42 appendix appendix 5. countermeasures against noise (3) protection with vss pattern for double-sided boards in which the oscillator is mounted on one side (mount side), make sure that there is a vss pattern at the same position as the oscillator on the reverse side (solder side) of the board. this vss pattern must be connected to the microcomputers vss pin in the shortest possible distance and must be located away from the other vss patterns. aaa aaa aaa aaa aa aa aa aa aaa aa aa aa aa aa a a x in x out vss example of vss pattern on reverse side of oscillator example of mount pattern for oscillator unit separate the vss pattern for oscillator from the vss supply line. m37702 fig. 19 vss pattern on reverse side of oscillator
7702/7703 group users manual 21C43 appendix appendix 5. countermeasures against noise 5. processing of ports take protective measures for ports in both hardware and software. l insert a resistor of 100 ohms or more in series. l for ports in the input mode, try reading in several times to detect whether their levels are matched or not. l for ports in the output mode, since the output data can reverse owing to noise, periodically set the port pi register. l set the port pi direction register again at stated periods. noise direction register port latch data bus port fig. 20 processing of ports
7702/7703 group users manual 21C44 appendix appendix 5. countermeasures against noise 6. reinforcement of the power supply line l use the broader wiring width than that of the other signal wire for the vss and vcc lines. l when using the multilayer boards, make sure that one of the middle layer is vss side, and the other one of middle layer is vcc side. l when using the double-sided boards, one side must be located with looped or mesh form to the vss line centering the microcomputer. the vacant space must be filled with the vss line. the other side must be located with the vcc line just as in the above-mentioned vss line. connect the power supply line of external devices connected to the microcomputer with the bus and the power supply line of the microcomputer in the shortest possible distance. reasons: the level of many wiring among 24 pieces of external address bus will change at the same time when connecting external devices. that may causes noise of the power supply line.
appendix 7702/7703 group users manual 21C45 appendix 6. q & a appendix 6. q & a information which may be helpful in fully utilizing the 7702 group and the 7703 group are provided in q & a format. in q & a, as a rule, one question and its answer are summarized within one page. the upper box on each page is a question, and a box below the question is its answer. (if a question or an answer extends to two or more pages, there is a page number at the lower right corner.) at the upper right corner of each page, the main function related to the contents of description in that page is listed.
appendix appendix 6. q & a 7702/7703 group users manual 21C46 interrupt q if an interrupt request (b) occurs while executing an interrupt routine (a), is the main routine is not executed before the intack sequence for the next interrupt (b) is executed after the interrupt routine (a) under execution is completed? (2) if the next interrupt request (b) occurs immediately after generating of the sampling pulse , the microcomputer executes one instruction of the main routine before executing the intack se- quence for (b) because the interrupt request is sampled by the next sampling pulse . sampling for interrupt requests are performed by sampling pulses generated synchronously with the cpus op-code fetch cycles. (1) if the next interrupt request (b) occurs before the sampling pulse ( ) for the rti instruction is generated, the microcomputer executes the intack sequence for (b) without executing the main routine (not even one instruction) because sampling is completed while executing the rti instruction. a condition l i is cleared to 0 with the rti instruction. l the interrupt priority level of the interrupt (b) is higher than the main routine ipl. l the interrupt priority detection time is 2 cycles of f. interrupt routine (a) main routine intack sequence for interrupt (b) sequence of execution rti instruction ? intack sequence for interrupt (b) interrupt request (b) interrupt routine (a) sampling pulse rti instruction main routine interrupt request (b) sampling pulse intack sequence for interrupt (b) one instruction executed interrupt routine (a) rti instruction
appendix 7702/7703 group users manual 21C47 appendix 6. q & a interrupt there is a routine where a certain interrupt request should not be accepted (with enabled acceptance of all other interrupt requests). accordingly, the program set the interrupt priority level select bits of the interrupt to be not accepted to 000 2 in order to disable it before executing the routine. however, the interrupt request of that interrupt has been accepted immediately after the priority level had been changed. why did this occur and what can i do about it? : clb #07h, xxxic ; writes 000 2 to interrupt priority level select bits. ; clears interrupt request bit to 0. lda a,data ; instruction at the beginning of the routine that should not accept one certain interrupt. :; when changing the interrupt priority level, the microcomputer can behave as if the interrupt request is accepted immediately after it is disabled if the next instruction (the lda instruction in the above case) is already stored in the bius instruction queue buffer and conditions to accept the interrupt request which should not be accepted are met immediately before executing the instruction which is in that buffer. when writing to a memory or an i/o, the cpu passes the address and data to the biu. then, the cpu executes the next instruction in the instruction queue buffer while the biu is writing data into the actual address. detection of interrupt priority level is performed at the beginning of each instruc- tion. in the above case, in the interrupt priority detection which is performed simultaneously with the execution of the next instruction, the interrupt priority level before changing it is detected and the interrupt request is accepted. it is because the cpu executes the next instruction before the biu finishes changing the interrupt priority levels. q a (1/2) previous instruction executed (instruction prefetch) cpu operation biu operation interrupt priority detection time sequence of execution interrupt priority level select bits set change of interrupt priority levels completed interrupt request accepted interrupt request generated clb instruction executed lda instruction executed interrupt request is accepted in this interval
appendix appendix 6. q & a 7702/7703 group users manual 21C48 interrupt to prevent this problem, use software to execute the routine that should not accept a certain interrupt request after change of interrupt priority level is completed. the following shows a sample program. [ sample program ] after an instruction which writes 000 2 to the interrupt priority level select bits, fill the instruc- tion queue buffer with the nop instruction to make the next instruction not be executed before the writing is completed. : clb #07h, xxxic ; sets the interrupt priority level select bits to 000 2 . nop ; nop ; nop ; lda a,data ; instruction at the beginning of the routine that should not accept a certain interrupt request (2/2) a
appendix 7702/7703 group users manual 21C49 appendix 6. q & a interrupt q ( 1 ) in both the edge sense and level sense, external interrupt r equests occur when the input ____ signal to the int i pin changes its level regardless of clock f 1 . in the edge sense, the interrupt request bit is set to 1 at this time. ( 2 ) there are two methods: one uses external interrupts level s ense, and the other uses the timers event counter mode. ? using external interrupts level sense ____ in hardware, input a logical sum of multiple interrupt signa ls (e.g., a, b, and c) to the int i pin, and input each signal to each corresponding port. ___ in software, check the ports input levels in the int i interrupt routine to determine that which of the signals a, b, and c is input. a (1) ____ which timing of clock f 1 is the external interrupts (input signals to the int i pin) detected? (2) ____ how can four or more external interrupt input pins (int i ) be used? a m37702 port port port int i b c ? using timers event counter mode in hardware, input interrupt signals to the tai in pins or tbi in pins. in software, set the timers operating mode to the event cou nter mode and a value 0000 16 into the timer register to the effective edge. the timers interrupt request occurs when an interrupt signa l (selected effective edge) is input.
appendix appendix 6. q & a 7702/7703 group users manual 21C50 ____ in the case selecting the cts function in uart (clock asynchronous serial i/o) mode, when the ____ transmitting side check the cts input level ? it is check near the middle of the stop bit (when two stop bits are selected, the second stop bit). a q serial i/o (uart mode) d 6 n: 1-bit length d 7 sp sp . . . . . . . . . . . . . . . . . . . . . . . . . . . . nnn n/2 n/2 d 6 transmit data d 7 sp . . . . . . . . . . . . . . . . . . . . . . . . . . . . nn n/2 n/2 input level to cts i pin is checked near here. input level to cts i pin is checked near here . transmit data
appendix 7702/7703 group users manual 21C51 appendix 6. q & a ______ when l level is input to the hold pin, how long is the bus actually opened ? a the bus is opened after 50 ns at maximum has passed from the rising edge of next clock f 1 when ____ the hlda pin output becomes l level. q hold function ....... term where bus is open clock 1 hold hlda t pxz(hold-pz) : maximum 50 ns _____ note: the 7703 group does not have the hlda pin.
appendix appendix 6. q & a 7702/7703 group users manual 21C52 processor mode if the processor mode is switched as described below by using the processor mode bits (bits 1 and 0 at address 5e 16 ) during program execution, is there any precaution in software? l single-chip mode ? microprocessor mode l memory expansion mode ? microprocessor mode q a if the processor mode is switched as described above by using the processor mode bits, the mode is switched simultaneously when the cycle to write to the processor mode bits is completed. then, the program counter indicates the address next to the address (address xxxx 16 ) that contains the write instruction for the processor mode bits. additionally, access to the internal rom area is disabled. however, since the instruction queue buffer can prefetch up to three instructions, the address in the external rom area and is accessed first after the mode is switched is one of xxxx 16 + 1 to xxxx 16 + 4. the instructions at addresses xxxx 16 + 1 to xxxx 16 + 3 in the internal rom area can be executed. to prevent this problem, process the following by software. write the write instruction for the processor mode bits and next instructions (at least three bytes) at the same addresses both in the internal rom and external rom areas. (see below.) transfer the write instruction for the processor mode bits to an internal ram area and make a branch to there in order to execute the write instruction. after that, make a branch to the program address in the external rom area. (contents of the instruction queue buffer is initialized by a branch instruction.) : : ldm . b #00000010b, pmr nop nop nop : : : : ldm . b #00000010b, pmr nop nop nop : xxxx 16 external rom area internal rom area xxxx 16 at least three bytes
appendix 7702/7703 group users manual 21C53 appendix 6. q & a sfr q is there any sfr for which instructions that can be used to set registers or bits are limited? (1) use the sta or ldm instruction to set the registers or the bits listed below. do not use read-modify-write instructions (i.e., clb, seb, inc, dec, asl, asr, lsr, rol, and ror ). uart0 baud rate register (address 31 16 ) uart1 baud rate register (address 39 16 ) uart0 transmit buffer register (addresses 33 16 , 32 16 ) uart1 transmit buffer register (addresses 3b 16 , 3a 16 ) timer a4 two-phase pulse signal processing select bit (bit 7 at address 44 16 ) timer a3 two-phase pulse signal processing select bit (bit 6 at address 44 16 ) timer a2 two-phase pulse signal processing select bit (bit 5 at address 44 16 ) (2) use the seb and clb instructions to set interrupt control registers (addresses 7f 16 to 70 16 ). a
appendix appendix 6. q & a 7702/7703 group users manual 21C54 watchdog timer when detecting the software runaway by the watchdog timer, if not software reset but setting the same value as the contents of the reset bector address to the watchdog timer interrupt bector address is processed , how does it result in? when branching the reset branch address within the watchdog timer interrupt routine, how does it result in? a the cpu registers and the sfr are not initialized in the above-mentioned way. accordingly, it is necessary that you must perform the initial setting for these all by software. the processor interrupt priority level (ipl) retains 7 of the watchdog timer interrupt priority level, and that is not initialized. consequently, all interrupt requests are not accepted. when rewriting the ipl by software, store once the 16-bit immediate value to the stack area and next return that 16-bit immediate value to all bits of the processor status register (ps). we recommend software reset in order to initialize the microcomputer for software runaway. q



appendix 7702/7703 group users manual 21C58 appendix 8. machine instructions appendix 8. machine instructions
appendix 7702/7703 group users manual 21C59 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C60 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C61 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C62 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C63 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C64 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C65 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C66 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C67 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C68 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C69 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C70 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C71 appendix 8. machine instructions
appendix 7702/7703 group users manual 21C72 appendix 8. machine instructions memorandum
glossary
glossary 7702/7703 group users manual 2 this section briefly explains the terms used in this users manual. the terms defined here apply to this manual only. term access access area access characteristics baud rate branch bus control signal count source counter contents (values) down-count event counter mode external area external bus external device gate function of timer internal area interrupt routine lsb first overflow power saving read-modify-write instruction signal required for access to external device stop mode synchronizing clock meaning means performing read, write, or read and write. an accessible memory space of up to 16 mbytes. means whether accessible or not. means a transfer rate of serial i/o means moving the programs execution point (= address) to another location. _ ____ __ ____ _____ _____ a generic name for ale, e, bhe, r/w, rdy, hold, hlda and byte signals. a signal that is counted by timers a and b, the uarti baud rate register (brgi) and watchdog timer. that is f 2 , f 16 , f 64 , f 512 selected by the count source select bits and others. means a value read when reading the timer ai and bi registers. means decreasing by 1 and counting. means the mode of timers which can count the number of external pulses exactly without a divider. an accessible area for external devices connected in the memory expansion or microprocessor mode. it is up to 16-mbyte external area. a generic name for the external address bus and the data bus. devices connected externally to the microcomputer. a generic name for a memory, an i/o device and a peripheral ic. means the function that the user can control input of the timer count source. an accessible internal area. a generic name for areas of the internal ram, internal rom and the sfr. a routine that is automatically executed when an interrupt request is accepted. set the start address of this routine into the interrupt vector table. means a transfer data format of serial i/o;lsb is transferred first. a state where the up-count resultant is greater than the counter resolution. means reducing a power dissipation by stop mode, wait mode or others an instruction that reads the memory contents, modifies them and writes back to the same address. relevant instructions are the asl , clb , dec , inc , lsr , rol , ror , seb instructions. a generic name for bus control, address bus, and data bus signals. a state where the oscillation circuit halts and the program execution is stopped. by executing the stp instruction, the microcomputer enters stop mode. means a transfer clock of the clock synchronous serial i/o. relevant term access access up-count internal area external area under flow up-count stop mode wait mode bus control signal wait mode
glossary 7702/7703 group users manual 3 meaning clock asynchronous serial i/o. when used to designate the name of a functional block, this term also means the serial i/o which can be switched to the cock synchronous serial i/o. a state where the down-count resultant is greater than the counter resolution. means increasing by 1 and counting. a state where the oscillation circuit is operating, however, the program execution is stopped. by executing the wit instruction, the microcomputer enters wait mode. relevant term clock synchronous serial i/o. overflow down-count down-count stop mode term uart under flow up-count wait mode
glossary 7702/7703 group users manual 4 memorandum
mitsubishi semiconductors users manual 7702/7703 group mar. first edition 1997 editioned by committee of editing of mitsubishi semiconductor users manual published by mitsubishi electric corp., semiconductor marketing division this book, or parts thereof, may not be reproduced in any form without permission of mitsubishi electric corporation. ?1997 mitsubishi electric corporation
mitsubishi electric corporation head office: mitsubishi denki bldg., marunouchi, tokyo 100. telex: j24532 cable: melco tokyo users manual 7702/7703 group h-ef493-a ki-9703 printed in japan (rod) ? 1997 mitsubishi electric corporation. new publication, effective mar. 1997. specifications subject to change without notice.


▲Up To Search▲   

 
Price & Availability of M37702E2AFS

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X