Part Number Hot Search : 
RB010 ACS20D 100AT DF40SC3L MM3Z20 BD806 4503AGM G2581
Product Description
Full Text Search
 

To Download M37547G2-XXXFP Datasheet File

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


  Datasheet File OCR Text:
  description the 7547 group is the qzrom version of 7542 group. the 7547 group has the pin-compatibility with the 7542 group. as new functions, the power-on reset, the low voltage detection cir- cuit, and the function set rom are added. features ? basic machine-language instructions ...................................... 71 ? the minimum instruction execution time ............................. 0.25 s (at 8 mhz oscillation frequency, double-speed mode for the shortest instruction) ? memory size rom ................................ 8k, 16k bytes ram ............................... 384, 512 bytes ? programmable i/o ports ........................................................... 29 ? interrupts ................................................. 18 sources, 16 vectors ? t imers ............................................................................. 8-bit ? 2 ...................................................................................... 16-bit ? 2 ? output compare ............................................................ 4-channel ? input capture ................................................................ 2-channel ? serial interface ............ 8-bit ? 2 (uart or clock-synchronized) ? a/d converter ............................................... 10-bit ? 8 channels ? clock generating circuit ............................................. built-in type (low-power dissipation by an on-chip oscillator) (connected to external ceramic resonator or quartz-crystal oscillator permitting rc oscillation) ? w atchdog timer ............................................................ 16-bit ? 1 ? power-on reset circuit ............................................... built-in type ? low voltage detection circuit ..................................... built-in type ? power source voltage x in oscillation frequency at ceramic oscillation, in double-speed mode at 8 mhz .................................................................... 4.5 to 5.5 v at 6.5 mhz ................................................................. 4.0 to 5.5 v at 2 mhz .................................................................... 2.4 to 5.5 v at 1 mhz .................................................................... 2.2 to 5.5 v x in oscillation frequency at ceramic oscillation, in high-speed mode or middle-speed mode at 8 mhz .................................................................... 4.0 to 5.5 v at 4 mhz .................................................................... 2.4 to 5.5 v at 2 mhz .................................................................... 2.2 to 5.5 v x in oscillation frequency at rc oscillation in high-speed mode or middle-speed mode at 4 mhz .................................................................... 4.0 to 5.5 v at 2 mhz .................................................................... 2.4 to 5.5 v at 1 mhz .................................................................... 2.2 to 5.5 v x in oscillation frequency at on-chip oscillation ......... 1.8 to 5.5 v ? power dissipation ................................................ 29.5 mw (typ.) ? operating temperature range ................................... ?20 to 85 c rej03b0156-0122 rev.1.22 mar 31, 2009 page 1 of 94 7547 group single-chip 8-bit cmos microcomputer rej03b0156-0122 rev.1.22 mar 31, 2009
rej03b0156-0122 rev.1.22 mar 31, 2009 page 2 of 94 7547 group pin configuration (top view) fig. 1 pin configuration (package type: prsp0036ga-b) 10 1 2 3 4 6 7 8 9 11 12 14 15 16 5 13 17 18 36 35 34 33 31 30 26 25 24 23 22 21 20 19 32 27 29 28 cnv ss x out x in v ss p0 4 (led 04 )/rxd 2 p3 0 (led 10 )/cap 1 vcc v ref p0 5 (led 05 )/txd 2 p1 0 /r x d 1 /cap 0 p2 6 /an 6 p2 7 /an 7 p1 1 /t x d 1 p1 2 /s clk1 p1 3 /s rdy1 p2 3 /an 3 p2 2 /an 2 p2 1 /an 1 p2 0 /an 0 p3 1 (led 11 )/cmp 2 p3 6 (led 16 )/int 1 p2 4 /an 4 p2 5 /an 5 p0 6 (led 06 )/s clk2 p0 7 (led 07 )/s rdy2 reset m37547gx-xxxfp m37547gxfp p1 4 /cntr 0 p3 5 (led 15 ) p3 4 (led 14 ) p3 3 (led 13 )/int 1 p3 2 (led 12 )/cmp 3 p3 7 (led 17 )/int 0 p0 0 (led 00 )/cap 0 p0 1 (led 01 )/cmp 0 p0 2 (led 02 )/cmp 1 p0 3 (led 03 )/tx out package type: prsp0036ga-b (36p2r-d)
rej03b0156-0122 rev.1.22 mar 31, 2009 page 3 of 94 7547 group t able 1 performance overview parameter 71 0.25 s (minimum instruction, oscillation frequency 8 mhz: double-speed mode) 8 mhz (max.) 8 k to 16 k bytes 384 to 512 bytes ?8-bit ? 3, 5-bit ? 1 18 sources, 16 vectors ?8-bit ? 2, 16-bit ? 2 4 channel 2 channel 8-bit ? 2 (uart or clock synchronous) 10-bit ? 8 channel 16-bit ? 1 built-in (external ceramic resonator or quartz-crystal oscillator, rc oscillation available) (low consumption current by on-chip oscillator available) 4.5 to 5.5 v 4.0 to 5.5 v 2.4 to 5.5 v 2.2 to 5.5 v 4.0 to 5.5 v 2.4 to 5.5 v 2.2 to 5.5 v 4.0 to 5.5 v 2.4 to 5.5 v 2.2 to 5.5 v 1.8 to 5.5 v 29.5 mw (typ.) -20 to 85 c cmos silicon gate 36-pin plastic molded ssop number of basic instructions instruction execution time oscillation frequency memory sizes rom ram i/o port p0, p1, p2, p3 interrupts t imer output compare input capture serial interface a/d converter w atchdog timer clock generating circuit power source double-speed mode at 8mhz oscillation voltage at 6.5mhz oscillation (at ceramic at 2mhz oscillation resonance) at 1mhz oscillation high-speed mode at 8mhz oscillation middle-speed mode at 4mhz oscillation at 2mhz oscillation power source high-speed mode at 4mhz oscillation voltage middle-speed mode at 2mhz oscillation (at rc oscillation) at 1mhz oscillation power source voltage (at on-chip oscillation) power dissipation operating temperature range device structure package function
rej03b0156-0122 rev.1.22 mar 31, 2009 page 4 of 94 7547 group fig. 2 functional block diagram (package type: prsp0036ga-b) x in out x si/o2(8) ram rom cpu a x y s pc h pc l ps v ss 18 reset 13 v cc 15 14 cnv ss p1(5) 31 35 2 36 76 p2(8) p3(8) 21 24 22 12 reset input i/o port p2 i/o port p1 i/o port p3 clock generating circuit clock input clock output 16 17 11 9 10 8 a/d converter (10) v ref 0 23 int 0 25 26 si/o1(8) cntr 0 i/o port p0 timer x (8) k e y- o n w ak eup prescaler x (8) ti mer b (16) p0(8) 34 32 30 28 33 31 29 27 timer 1 (8) prescaler 1 (8) t imer a (16) int 1 19 20 5 4 input capture output compare w atchdog timer reset low voltage detection circuit reset power-on reset circuit reset functional block diagram (package type: prsp0036ga-b) [7547 group]
rej03b0156-0122 rev.1.22 mar 31, 2009 page 5 of 94 7547 group pin description t able 2 pin description function apply voltage of 1.8 to 5.5 v to vcc, and 0 v to vss. ?reference voltage input pin for a/d converter. ?chip operating mode control pin, which is always connected to vss. ?reset input pin for active ?l? ?input and output pins for main clock generating circuit. ?connect a ceramic resonator or quartz crystal oscillator between the x in and x out pins. ? for using rc oscillator, short between the x in and x out pins, and connect the capacitor and resistor. ?if an external clock is used, connect the clock source to the x in pin and leave the x out pin open. ?when the on-chip oscillator is selected as the main clock, connect x in pin to v cc and leave x out open. function expect a port function name power source analog refer- ence voltage cnvss reset input clock input i/o port p0 i/o port p1 i/o port p2 i/o port p3 pin vcc, vss v ref cnvss reset x in p0 0 (led 00 )/cap 0 p0 1 (led 01 )/cmp 0 p0 2 (led 02 )/cmp 1 p0 3 (led 03 )/tx out p0 4 (led 04 )/rxd 2 p0 5 (led 05 )/txd 2 p0 6 (led 06 )/s clk2 p0 7 (led 07 )/s rdy2 p1 0 /rxd 1 /cap 0 p1 1 /txd 1 p1 2 /s clk1 p1 3 /s rdy1 p1 4 /cntr 0 p2 0 /an 0 ?p2 7 /an 7 p3 0 (led 10 )/cap 1 p3 1 (led 11 )/cmp 2 p3 2 (led 12 )/cmp 3 p3 3 (led 13 )/int 1 p3 4 (led 14 ) p3 5 (led 15 ) p3 6 (led 16 )/int 1 p3 7 (led 17 )/int 0 ? capture function pin ? compare function pin ? timer x function pin ? serial i/o2 function pin ? serial i/o1 function pin ? capture function pin ? serial i/o1 function pin ? timer x function pin ? input pins for a/d converter ? capture function pin ? compare function pin ? interrupt input pin ? interrupt input pin ?8-bit i/o port. ?i/o direction register allows each pin to be individually pro- grammed as either input or output. ?cmos compatible input level ?cmos 3-state output structure ?whether a built-in pull-up resistor is to be used or not can be determined by program. ? high drive capacity for led drive port can be selected by program. ?5-bit i/o port ?i/o direction register allows each pin to be individually pro- grammed as either input or output. ?cmos compatible input level ?cmos 3-state output structure ?cmos/ttl level can be switched for p1 0 , p1 2 and p1 3 ?8-bit i/o port having almost the same function as p0 ?cmos compatible input level ?cmos 3-state output structure ?8-bit i/o port ?i/o direction register allows each pin to be individually pro- grammed as either input or output. ?cmos compatible input level (cmos/ttl level can be switched for p3 6 and p3 7 ). ?cmos 3-state output structure ?whether a built-in pull-up resistor is to be used or not can be determined by program. ? high drive capacity for led drive port can be selected by program. x out clock output ? key-input (key-on wake up interrupt input) pin
rej03b0156-0122 rev.1.22 mar 31, 2009 page 6 of 94 7547 group group expansion renesas plans to expand the 7547 group as follow: memory type support for qzrom memory size rom size ............................................................. 8 k to 16 k bytes ram size .............................................................. 384 to 512 bytes package prsp0036ga-b .......... 0.8 mm-pitch 36-pin plastic molded ssop fig. 3 memory expansion plan 384 512 16k 0 m37547g4 8k m37547g2 rom size (bytes) ram size (bytes) currently supported products are listed below. t able 3 list of supported products ram size (bytes) shipped after writing shipped in blank shipped after writing shipped in blank M37547G2-XXXFP m37547g2fp m37547g4-xxxfp m37547g4fp product rom size (bytes) rom size for user ( ) 384 512 remarks package prsp0036ga-b prsp0036ga-b prsp0036ga-b prsp0036ga-b 8192 (note) (8062) 16384 (note) (16254) note : rom size includes the function set rom.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 7 of 94 7547 group b7 b0 x b7 b0 s b7 b0 y b7 b0 pc l processor status register (ps) carry flag b7 b0 b7 b0 a b15 pc h zero flag interrupt disable flag decimal mode flag break flag index x mode flag overflow flag negative flag program counter stack pointer index register y index register x accumulator c z i d b t v n functional description central processing unit (cpu) the mcu uses the standard 740 family instruction set. refer to the table of 740 family addressing modes and machine-language instructions or the series 740 user?s manual for details on each instruction set. machine-resident 740 family instructions are as follows: 1. the fst and slw instructions cannot be used. 2. the mul and div instructions can be used. 3. the wit instruction can be used. 4. the stp instruction can be used. accumulator (a) the accumulator is an 8-bit register. data operations such as data transfer, etc., are executed mainly through the accumulator. index register x (x), index register y (y) both index register x and index register y are 8-bit registers. in the index addressing modes, the value of the operand is added to the contents of register x or register y and specifies the real address. when the t flag in the processor status register is set to ?1?, the value contained in index register x becomes the address for the second operand. stack pointer (s) the stack pointer is an 8-bit register used during subroutine calls and interrupts. the stack is used to store the current address data and processor status when branching to subroutines or interrupt routines. the lower eight bits of the stack address are determined by the contents of the stack pointer. the upper eight bits of the stack ad- dress are determined by the stack page selection bit. if the stack page selection bit is ?0?, then the ram in the zero page is used as the stack area. if the stack page selection bit is ?1?, then ram in page 1 is used as the stack area. the stack page selection bit is located in the sfr area in the zero page. note that the initial value of the stack page selection bit varies with each microcomputer type. also some microcom- puter types have no stack page selection bit and the upper eight bits of the stack address are fixed. the operations of pushing reg- ister contents onto the stack and popping them from the stack are shown in fig. 5. program counter (pc) the program counter is a 16-bit counter consisting of two 8-bit registers pc h and pc l . it is used to indicate the address of the next instruction to be executed. fig. 4 740 family cpu register structure
rej03b0156-0122 rev.1.22 mar 31, 2009 page 8 of 94 7547 group execute jsr on-going routine m (s)  (pc h ) (s) (s ? 1) m (s)  (pc l ) execute rts (pc l )  m (s) (s) (s ? 1) (s) (s + 1) (s) (s + 1) (pc h )  m (s) subroutine restore return address store return address on stack m (s)  (ps) execute rti (ps)  m (s) (s) (s ? 1) (s) (s + 1) interrupt service routine restore contents of processor status register m (s)  (pc h ) (s) (s ? 1) m (s)  (pc l ) (s) (s ? 1) (pc l )  m (s) (s) (s + 1) (s) (s + 1) (pc h )  m (s) restore return address i flag ?0? to ?1? fetch the jump vector store return address on stack store contents of processor status register on stack interrupt request (note) note : the condition to enable the interrupt interrupt enable bit is ?1? interrupt disable flag is ?0? t able 4 push and pop instructions of accumulator or processor status register accumulator processor status register push instruction to stack pha php pop instruction from stack pla plp fig. 5 register push and pop at interrupt generation and subroutine call
rej03b0156-0122 rev.1.22 mar 31, 2009 page 9 of 94 7547 group processor status register (ps) the processor status register is an 8-bit register consisting of flags which indicate the status of the processor after an arithmetic operation. branch operations can be performed by testing the carry (c) flag, zero (z) flag, overflow (v) flag, or the negative (n) flag. in decimal mode, the z, v, n flags are not valid. after reset, the interrupt disable (i) flag is set to ?1?, but all other flags are undefined. since the index x mode (t) and decimal mode (d) flags directly affect arithmetic operations, they should be initialized in the beginning of a program. (1) carry flag (c) the c flag contains a carry or borrow generated by the arithmetic logic unit (alu) immediately after an arithmetic operation. it can also be changed by a shift or rotate instruction. (2) zero flag (z) the z flag is set if the result of an immediate arithmetic operation or a data transfer is ?0?, and cleared if the result is anything other than ?0?. (3) interrupt disable flag (i) the i flag disables all interrupts except for the interrupt generated by the brk instruction. interrupts are disabled when the i flag is ?1?. when an interrupt occurs, this flag is automatically set to ?1? to prevent other interrupts from interfering until the current interrupt is serviced. (4) decimal mode flag (d) the d flag determines whether additions and subtractions are ex- ecuted in binary or decimal. binary arithmetic is executed when this flag is ?0?; decimal arithmetic is executed when it is ?1?. decimal correction is automatic in decimal mode. only the adc and sbc instructions can be used for decimal arithmetic. (5) break flag (b) the b flag is used to indicate that the current interrupt was gener- ated by the brk instruction. the brk flag in the processor status register is always ?0?. when the brk instruction is used to gener- ate an interrupt, the processor status register is pushed onto the stack with the break flag set to ?1?. the saved processor status is the only place where the break flag is ever set. (6) index x mode flag (t) when the t flag is ?0?, arithmetic operations are performed be- tween accumulator and memory, e.g. the results of an operation between two memory locations is stored in the accumulator. when the t flag is ?1?, direct arithmetic operations and direct data trans- fers are enabled between memory locations, i.e. between memory and memory, memory and i/o, and i/o and i/o. in this case, the result of an arithmetic operation performed on data in memory lo- cation 1 and memory location 2 is stored in memory location 1. the address of memory location 1 is specified by index register x, and the address of memory location 2 is specified by normal ad- dressing modes. (7) overflow flag (v) the v flag is used during the addition or subtraction of one byte of signed data. it is set if the result exceeds +127 to -128. when the bit instruction is executed, bit 6 of the memory location oper- ated on by the bit instruction is stored in the overflow flag. (8) negative flag (n) the n flag is set if the result of an arithmetic operation or data transfer is negative. when the bit instruction is executed, bit 7 of the memory location operated on by the bit instruction is stored in the negative flag. t able 5 set and clear instructions of each bit of processor status register set instruction clear instruction c flag sec clc z flag ? ? i flag sei cli d flag sed cld b flag ? ? t flag set clt v flag ? clv n flag ? ?
rej03b0156-0122 rev.1.22 mar 31, 2009 page 10 of 94 7547 group memory special function register (sfr) area the sfr area in the zero page contains control registers such as i/o ports and timers. ram ram is used for data storage and for a stack area of subroutine calls and interrupts. rom the first 128 bytes and the last 2 bytes of rom are reserved for device testing and the rest is a user area for storing programs. interrupt vector area the interrupt vector area contains reset and interrupt vectors. zero page the 256 bytes from addresses 0000 16 to 00ff 16 are called the zero page area. the internal ram and the special function regis- ters (sfr) are allocated to this area. the zero page addressing mode can be used to specify memory and register addresses in the zero page area. access to this area with only 2 bytes is possible in the zero page addressing mode. special page the 256 bytes from addresses ff00 16 to ffff 16 are called the special page area. the special page addressing mode can be used to specify memory addresses in the special page area. ac- cess to this area with only 2 bytes is possible in the special page addressing mode. fig. 6 memory map diagram rom capacity (bytes) address yyyy 16 address zzzz 16 8192 e000 16 e080 16 16384 c000 16 c080 16 ff00 16 ffdc 16 ffd4 16 fffe 16 ffff 16 yyyy 16 zzzz 16 rom function set rom function area 0100 16 0000 16 0040 16 0440 16 xxxx 16 ram reserved area sfr area not used ram area ram capacity (bytes) address xxxx 16 512 023f 16 384 01bf 16 function set rom consists of the followings: - function set rom data to set peripheral functions to be active immediately after system is released from reset, - rom code protect to disable the reading of the built-in prom area by serial programmer, - renesas shipment test area where random data are written in when shipment test is performed by renesas. rom area reserved rom area (128 bytes) interrupt vector area reserved rom area zero page special page address ffd4 16 ffd5 16 ffd6 16 renesas shipment test are renesas shipment test area renesas shipment test area renesas shipment test area a ffd7 16 ffd8 16 ffd9 16 ffda 16 ffdb 16 function set rom data 2 function set rom data 1 function set rom data 0 rom code protec t rom code protect address (address ffdb 16 ) address ffdb 16 , which is the reserved rom area of qzrom, is the rom code protect address. ?00 16 ? is written into this address when selecting the protect bit write by using a serial programmer or selecting protect enabled for writing shipment by renesas t echnology corp.. when ?00 16 ? is set to the rom code protect ad- dress, the protect function is enabled, so that reading or writing from/to qzrom is disabled by a serial programmer. as for the qzrom product in blank, the rom code is protected by selecting the protect bit write at rom writing with a serial pro- grammer. as for the qzrom product shipped after writing, ?00 16 ? (protect enabled) or ?ff 16 ? (protect disabled) is written into the rom code protect address when renesas technology corp. performs writing. the writing of ?00 16 ? or ?ff 16 ? can be selected as the rom option setup (referred to as ?mask option setup? in mm) when ordering. notes because the contents of ram are indefinite at reset, set initial val- ues before using.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 11 of 94 7547 group fig. 8 switching method of cpu mode register fig. 7 structure of cpu mode register oscillation mode selection bit ( note 1 , note 4 ) 0 : ceramic oscillation 1 : rc oscillation cpu mode register (note 1) (cpum: address 003b 16 , initial value: 80 16 ) stack page selection bit 0 : 0 page 1 : 1 page clock division ratio selection bits b7 b6 0 0 : f( ) = f(x in )/2 (high-speed mode) 0 1 : f( ) = f(x in )/8 (middle-speed mode) 1 0 : applied from on-chip oscillator 1 1 : f( ) = f(x in )/1 (double-speed mode)( note 5 ) on-chip oscillator oscillation control bit ( note 3 ) 0 : on-chip oscillator oscillation enabled 1 : on-chip oscillator oscillation stop x in oscillation control bit 0 : ceramic or rc oscillation enabled 1 : ceramic or rc oscillation stop processor mode bits b1 b0 0 0 single-chip mode 0 1 not available 1 0 not available 1 1 not available note1: w hen the setting by the function set rom data 2 (fsrom2) is performed, the initial value of cpum is changed  after releasing reset since bit 5 of cpum is fixed.  2: the setting values of fsrom2 become valid by setting ?0? to bit 0 of function set rom data 0 (fsrom0).  the setting values of fsrom2 are invalid by setting ?1? to this bit.  (in order that fsrom2 is invalid, write to cpum after releasing reset.)  3 :when bit 4 of fsrom2 is set to ?0?, the operation of on-chip oscillator cannot be stopped.  since the on-chip oscillator is not stopped also in the stop mode, the dissipation current in the stop mode is increased.  4 :the setting value of bit 5 of cpum can be fixed after releasing reset by setting value of bit 5 of fsrom2.  also, when the setting of fsrom2 is invalid, this bit can be rewritten only once after releasing reset.  after rewriting it is disable to write any data to this bit.  this bit is initialized by reset, and then, rewriting it is enabled.  5 :this setting can be used only at ceramic oscillation. do not use this at rc oscillation. b7 b0 control by function set rom data 2 (fsrom2: address ffda 16 ) ( note 2 ) this bit function can be set by setting bit 5 of fsrom2. ( note 4 ) bit 5 of fsrom2 = 0: bit 5 of cpum is fixed to ?0?. bit 5 of fsrom2 = 1: bit 5 of cpum is ?0? or ?1?. this cannot be controlled by fsrom2. this cannot be controlled by fsrom2. this bit function can be set by setting bit 4 of fsrom2. ( note 3 ) bit 4 of fsrom2 = 0: bit 3 of cpum is fixed to ?0?. bit 4 of fsrom2 = 1: bit 3 of cpum is ?0? or ?1?. this cannot be controlled by fsrom2. this cannot be controlled by fsrom2. after releasing reset switch the oscillation mode selection bit (bit 5 of cpum) switch the clock division ratio selection bits (bits 6 and 7 of cpum) main routine start with an on-chip oscillator an initial value is set as a ceramic oscillation mode. when it is switched to an rc oscillation, its oscillation starts. select 1/1, 1/2, 1/8 or on-chip oscillator. wait by on-chip oscillator operation until establishment of oscillator clock when using a ceramic oscillation, wait until establishment of oscillation from oscillation starts. when using an rc oscillation, wait time is not required basically (time to execute the instruction to switch from an on-chip oscillator meets the requirement). note: after system is released from reset, an on-chip oscillator turns active automatically and system operation is started. switching method of cpu mode register switch the cpu mode register (cpum) at the head of program af- ter releasing reset in the following method. [cpu mode register] cpum the cpu mode register contains the stack page selection bit, etc.. this register is allocated at address 003b 16 . some function of the cpu mode register can be controlled by the function set rom data 2.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 12 of 94 7547 group fig. 9 memory map of special function register (sfr) notes 1: do not access to the sfr area including nothing. 0000 16 0001 16 0002 16 0003 16 0004 16 0005 16 0006 16 0007 16 0008 16 0009 16 000a 16 000b 16 000c 16 000d 16 000e 16 000f 16 0010 16 0011 16 0012 16 0013 16 0014 16 0015 16 0016 16 0017 16 0018 16 0019 16 001a 16 001b 16 001c 16 001d 16 001e 16 001f 16 po rt p0 (p0) po rt p0 direction register (p0d) po rt p1 (p1) po rt p1 direction register (p1d) po rt p2 (p2) po rt p2 direction register (p2d) po rt p3 (p3) po rt p3 direction register (p3d) pull-up control register (pull) tr ansmit 1 /receive 1 buffer register (tb1/rb1) serial i/o1 status register (sio1sts) serial i/o1 control register (sio1con) ua r t1 control register (uart1con) baud rate generator 1 (brg1) po rt p1p3 control register (p1p3c) 0020 16 0021 16 0022 16 0023 16 0024 16 0025 16 0026 16 0027 16 0028 16 0029 16 002a 16 002b 16 002c 16 002d 16 002e 16 002f 16 0030 16 0031 16 0032 16 0033 16 0034 16 0035 16 0036 16 0037 16 0038 16 0039 16 003a 16 003b 16 003c 16 003d 16 003e 16 003f 16 timer count source set register (tcss) a/d conversion register (low-order) (adl) prescaler 1 (pre1) timer 1 (t1) timer x mode register  (txm) prescaler x   (prex) timer x   (tx) serial i/o2 control register (sio2con) ua r t2 control register (uart2con) a/d control register (adcon) a/d conversion register (high-order) (adh) misrg w atchdog timer control register (wdtcon) interrupt edge selection register  (intedge) cpu mode register (cpum) interrupt request register 1 (ireq1) interrupt control register 1 (icon1) timer a, b mode register (tabm) capture/compare port register (ccpr) timer source selection register (tmsr) capture mode register (capm) compare output mode register (cmom) capture/compare status register (ccsr) compare interrupt source set register (cisr) interrupt request register 2 (ireq2) interrupt control register 2 (icon2) on-chip oscillation division ratio selection register (rodr)  baud rate generator 2 (brg2) timer a (low-order) (tal) timer a (high-order) (tah) timer b (low-order) (tbl) timer b (high-order) (tbh) tr ansmit 2 / receive 2 buffer register (tb2/rb2) serial i/o2 status register (sio2sts) po rt p0p3 drive capacity control register (dccr) compare register re-load register (cmpr) capture software trigger register (cstr) capture/compare register r/w pointer (ccrp) compare register (high-order) (cmph) compare register (low-order) (cmpl) capture register 1 (high-order) (cap1h) capture register 1 (low-order) (cap1l) capture register 0 (high-order) (cap0h) capture register 0 (low-order) (cap0l) interrupt source set register (intset) interrupt source discrimination register (intdis) reserved reserved reserved
rej03b0156-0122 rev.1.22 mar 31, 2009 page 13 of 94 7547 group i/o ports [direction registers] pid the i/o ports have direction registers which determine the input/ output direction of each pin. each bit in a direction register corre- sponds to one pin, and each pin can be set to be input or output. when ?1? is set to the bit corresponding to a pin, this pin becomes an output port. when ?0? is set to the bit, the pin becomes an in- put port. when data is read from a pin set to output, not the value of the pin itself but the value of port latch is read. pins set to input are float- ing, and permit reading pin values. if a pin set to input is written to, only the port latch is written to and the pin remains floating. [port p0p3 drive capacity control register] dccr by setting the port p0p3 drive capacity control register (address 0015 16 ), the drive capacity of the n-channel output transistor for the port p0 and port p3 can be selected. [pull-up control register] pull by setting the pull-up control register (address 0016 16 ), ports p0 and p3 can exert pull-up control by program. however, pins set to output are disconnected from this control and cannot exert pull-up control. [port p1p3 control register] p1p3c by setting the port p1p3 control register (address 0017 16 ), a cmos input level or a ttl input level can be selected for ports p1 0 , p1 2 , p1 3 , p3 6 , and p3 7 by program. fig. 12 structure of port p1p3 control register fig. 11 structure of pull-up control register port p1p3 control register (p1p3c: address 0017 16 , initial value: 00 16 ) b7 b0 not used 1 : ttl level 0 : cmos level p1 0 ,p1 2 ,p1 3 input level selection bit 1 : ttl level 0 : cmos level p3 6 /int 1 input level selection bit 1 : ttl level 0 : cmos level p3 7 /int 0 input level selection bit pu ll-up control register (pull: address 0016 16 , in itial value: 00 16 ) p 0 0 p u l l - u p c o n t r o l b i t p 0 1 , p 0 2 p u l l - u p c o n t r o l b i t p 0 3 ?p 0 7 p u l l - u p c o n t r o l b i t p 3 0 p u l l - u p c o n t r o l b i t p 3 1 , p 3 2 p u l l - u p c o n t r o l b i t p 3 3 p u l l - u p c o n t r o l b i t p 3 4 , p 3 5 p u l l - u p c o n t r o l b i t p 3 6 , p 3 7 p u l l - u p c o n t r o l b i t b 7 b 0 0 : p u l l - u p o f f 1 : p u l l - u p o n n o t e : p i n s s e t t o o u t p u t p o r t s a r e d i s c o n n e c t e d f r o m p u l l - u p c o n t r o l . p o r t p 0 p 3 d r i v e c a p a c i t y c o n t r o l r e g i s t e r ( d c c r : a d d r e s s 0 0 1 5 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) p o r t p 0 0 d r i v e c a p a c i t y b i t p o r t s p 0 1 , p 0 2 d r i v e c a p a c i t y b i t p o r t s p 0 3 ?p 0 7 d r i v e c a p a c i t y b i t p o r t p 3 0 d r i v e c a p a c i t y b i t p o r t s p 3 1, p 3 2 d r i v e c a p a c i t y b i t p o r t p 3 3 d r i v e c a p a c i t y b i t p o r t s p 3 4 , p 3 5 d r i v e c a p a c i t y b i t p o r t s p 3 6 , p 3 7 d r i v e c a p a c i t y b i t b 7 b 0 0 : l o w 1 : h i g h n o t e : n u m b e r o f l e d d r i v e p o r t ( d r i v e c a p a c i t y i s h i g h ) i s 8 - p o r t . fig. 10 structure of port p0p3 drive capacity control register
rej03b0156-0122 rev.1.22 mar 31, 2009 page 14 of 94 7547 group t able 6 i/o port function table pin p0 0 (led 00 )/cap 0 p0 1 (led 01 )/cmp 0 p0 2 (led 02 )/cmp 1 p0 3 (led 03 )/tx out p0 4 (led 04 )/rxd 2 p0 5 (led 05 )/txd 2 p0 6 (led 06 )/s clk2 p0 7 (led 07 )/s rdy2 p1 0 /rxd 1 /cap 0 p1 1 /txd 1 p1 2 /s clk1 p1 3 /s rdy1 p1 4 /cntr 0 p2 0 /an 0 ?p2 7 /an 7 p3 0 (led 10 )/cap 1 p3 1 (led 11 )/cmp 2 p3 2 (led 12 )/cmp 3 p3 3 (led 13 )/int 1 p3 4 (led 14 ) p3 5 (led 15 ) p3 6 (led 16 )/int 1 p3 7 (led 17 )/int 0 i/o format ?cmos compatible input level ( note 1 ) ?cmos 3-state output non-port function ? capture function input ? key input interrupt ? compare function output ? key input interrupt ? timer x function output ? key input interrupt ? serial i/o2 function input/output ? key input interrupt ? serial i/o1 function input ? capture function input ? serial i/o1 function input/output ? timer x function input/output ? external interrupt input ? a/d conversion input ? capture function input ? compare function output ? external interrupt input ? external interrupt input sfrs related each pin capture/compare port register interrupt edge selection register pull-up control register port p0p3 drive capacity control register capture/compare port register pull-up control register port p0p3 drive capacity control register ti mer x mode register pull-up control register port p0p3 drive capacity control register serial i/o2 control register interrupt edge selection register pull-up control register port p0p3 drive capacity control register serial i/o2 control register pull-up control register port p0p3 drive capacity control register serial i/o2 control register interrupt edge selection register pull-up control register port p0p3 drive capacity control register serial i/o2 control register pull-up control register port p0p3 drive capacity control register serial i/o1 control register capture/compare port register port p1p3 control register serial i/o1 control register serial i/o1 control register port p1p3 control register serial i/o1 control register port p1p3 control register ti mer x mode register a/d control register capture/compare port register pull-up control register port p0p3 drive capacity control register capture/compare port register pull-up control register port p0p3 drive capacity control register interrupt edge selection register pull-up control register port p0p3 drive capacity control register pull-up control register port p0p3 drive capacity control register interrupt edge selection register pull-up control register port p0p3 drive capacity control register port p1p3 control register diagram no. (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) notes 1: ports p1 0 , p1 2 , p1 3 , p3 6 , and p3 7 are cmos/ttl level. name i/o port p0 i/o port p1 i/o port p2 i/o port p3
rej03b0156-0122 rev.1.22 mar 31, 2009 page 15 of 94 7547 group fig. 13 block diagram of ports (1) (1) port p0 0 direction register data bus port latch pull-up control to key input interrupt generating circuit capture 0 input p0 0 key-on wakeup selection bit drive capacity control capture 0 input control (2) ports p0 1, p0 2 compare output direction register data bus port latch pull-up control to key input interrupt generating circuit compare output control drive capacity control (3) port p0 3 timer output direction register data bus port latch pull-up control to key input interrupt generating circuit p0 3 /tx out output valid drive capacity control (4) port p0 4 serial i/o2 input direction register data bus port latch pull-up control to key input interrupt generating circuit serial i/o2 enable bit drive capacity control p0 4 key-on wakeup selection bit receive enable bit (5) port p0 5 serial i/o2 output direction register data bus port latch pull-up control to key input interrupt generating circuit serial i/o2 enable bit drive capacity control transmit enable bit (6) port p0 6 serial i/o2 clock output direction register data bus port latch pull-up control to key input interrupt generating circuit serial i/o2 mode selection bit drive capacity control serial i/o2 enable bit serial i/o2 synchronous clock selection bit serial i/o2 clock input p0 6 key-on wakeup selection bit serial i/o2 enable bit (7) port p0 7 serial i/o2 ready output direction register data bus port latch pull-up control to key input interrupt generating circuit serial i/o2 mode selection bit serial i/o2 enable bit s rdy2 output enable bit drive capacity control
rej03b0156-0122 rev.1.22 mar 31, 2009 page 16 of 94 7547 group fig. 14 block diagram of ports (2) (8) port p1 0 direction register data bus port latch serial i/o1 enable bit receive enable bit serial i/o1 input capture 0 input control p1 0 , p1 2 , p1 3 input level selection bit capture 0 input p1 0 , p1 2 , p1 3 , p3 6 , and p3 7 input level are switched to the cmos/ttl level by the port p1p3 control register. when the ttl level is selected , there is no h y steresis characteristics. (9) port p1 1 data bus port latch serial i/o1 output p1 1 /t x d 1 p-channel output disable bit direction register serial i/o1 enable bit transmit enable bit (10) port p1 2 serial i/o1 clock output serial i/o1 mode selection bit serial i/o1 enable bit serial i/o1 enable bit serial i/o1 synchronous clock selection bit direction register data bus port latch serial i/o1 clock input p1 0 , p1 2 , p1 3 input level selection bit * data bus serial i/o1 ready output port latch direction register p1 0 , p1 2 , p1 3 input level selection bit serial i/o1 mode selection bit serial i/o1 enable bit s rdy1 output enable bit * (11) port p1 3 data bus port latch direction register a/d converter input analog input pin selection bit (13) ports p2 0 ?p2 7 * * (12) port p1 4 cntr 0 interrupt input timer output data bus port latch direction register pulse output mode
rej03b0156-0122 rev.1.22 mar 31, 2009 page 17 of 94 7547 group fig. 15 block diagram of ports (3) (14) port p3 0 direction register data bus port latch pull-up control capture 1 input drive capacity control capture 1 input control (15) ports p3 1, p3 2 compare output direction register data bus port latch pull-up control compare output control drive capacity control (16) port p3 3 direction register data bus port latch pull-up control int 1 input control drive capacity control int 1 input (17) ports p3 4, p3 5 direction register data bus port latch pull-up control drive capacity control (19) port p3 7 direction register data bus port latch pull-up control drive capacity control int 0 input p3 input level selection bit * p1 0 , p1 2 , p1 3 , p3 6 , and p3 7 input level are switched to the cmos/ttl level by the port p1p3 control register. * when the ttl level is selected , there is no h y steresis characteristics. (18) port p3 6 direction register data bus port latch pull-up control drive capacity control int 1 input p3 input level selection bit * int 1 input control
rej03b0156-0122 rev.1.22 mar 31, 2009 page 18 of 94 7547 group t ermination of unused pins ? termination of common pins i/o ports: select an input port or an output port and follow each processing method. output ports : open. input ports : if the input level become unstable, through current flow to an input circuit, and the power supply current may increase. especially, when expecting low consumption current (at stp or wit instruction execution etc.), pull-up or pull-down input ports to prevent through current (built- in resistor can be used). we recommend processing unused pins through a re- sistor which can secure i oh(avg) or i ol(avg) . because, when an i/o port or a pin which have an out- put function is selected as an input port, it may operate as an output port by incorrect operation etc. pin p0 0 /cap 0 p0 1 /cmp 0 p0 2 /cmp 1 p0 3 /tx out p0 4 /rxd 2 p0 5 /txd 2 p0 6 /s clk2 p0 7 /s rdy2 p1 0 /rxd 1 /cap 0 p1 1 /txd 1 p1 2 /s clk1 p1 3 /s rdy1 p1 4 /cntr 0 p2 0 /an 0 ?p2 7 /an 7 p3 0 /cap 1 p3 1 /cmp 2 p3 2 /cmp 3 p3 3 /int 1 p3 4 p3 5 p3 6 /int 1 p3 7 /int 0 v ref x in x out t ermination 1 (recommend) i/o port connect to vss. when only on-chip oscillator is used, connect to v cc through a registor. when external clock is input or when only on-chip oscillator is used, open. t ermination 2 when selecting cap function, per- form termination of input port. when selecting cmp 0 function, perform termination of output port. when selecting cmp 1 function, perform termination of output port. when selecting tx out function, perform termination of output port. when selecting rxd 2 function, perform termination of input port. when selecting txd 2 function, perform termination of output port. when selecting external clock input, perform termination of output port. when selecting s rdy2 function, perform termination of output port. when selecting rxd 1 function, perform termination of input port. when selecting txd 1 function, perform termination of output port. when selecting external clock input, perform termination of input port. when selecting s rdy1 function, perform termination of output port. when selecting cntr input function, perform termination of input port. when selecting an function, per- form termination of input port. when selecting cap function, per- form termination of input port. when selecting cmp 2 function, perform termination of output port. when selecting cmp 3 function, perform termination of output port. when selecting int function, per- form termination of input port. - - when selecting int function, per- form termination of input port. when selecting int function, per- form termination of input port. - - - t ermination 3 - - - - - - when selecting internal clock output, perform termination of output port. - when selecting cap function, per- form termination of input port. - when selecting internal clock output, perform termination of output port. - when selecting cntr output function, perform termination of output port. - - - - - - - - - - - - t ermination 4 when selecting key- on wakeup function, perform termination of input port. - - - - - - - - - - - - - - - - - t able 7 termination of unused pins
rej03b0156-0122 rev.1.22 mar 31, 2009 page 19 of 94 7547 group interrupts the 7547 group interrupts are vector interrupts with a fixed prior- ity scheme, and generated by 16 sources among 18 sources: 6 external, 11 internal, and 1 software. the interrupt sources, vector addresses (1) , and interrupt priority are shown in table 8. each interrupt except the brk instruction interrupt has the inter- rupt request bit and the interrupt enable bit. these bits and the interrupt disable flag (i flag) control the acceptance of interrupt re- quests. fig. 16 shows an interrupt control diagram. an interrupt request is accepted when all of the following condi- tions are satisfied: ? interrupt disable flag.................................?0? ? interrupt request bit...................................?1? ? interrupt enable bit....................................?1? though the interrupt priority is determined by hardware, priority processing can be performed by software using the above bits and flag. t able 8 interrupt vector address and priority v ector addresses (note 1) high-order priority low-order interrupt request generating conditions remarks interrupt source 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 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 note 1: vector addressed contain internal jump destination addresses. 2: reset function in the same way as an interrupt with the highest priority. 3: key-on wakeup interrupt and uart1 bus collision detection interrupt can be enabled by setting of interrupt source set register. the occurrence of these interrupts are discriminated by interrupt source discrimination register. 4: a/d conversion interrupt and timer 1 interrupt can be enabled by setting of interrupt source set register. the occurrence of t hese interrupts are dis- criminated by interrupt source discrimination register. non-maskable v alid only when serial i/o1 is selected v alid only when serial i/o1 is selected v alid only when serial i/o2 is selected v alid only when serial i/o2 is selected external interrupt (active edge selectable) external interrupt (active edge selectable) external interrupt (valid at falling) when uart1 bus collision detection interrupt is enabled. external interrupt (active edge selectable) external interrupt (active edge selectable) external interrupt (active edge selectable) compare interrupt source is selected. stp release timer underflow non-maskable software interrupt at reset input at completion of serial i/o1 data receive at completion of serial i/o1 transmit shift or when transmit buffer is empty at completion of serial i/o2 data receive at completion of serial i/o2 transmit shift or when transmit buffer is empty at detection of either rising or falling edge of int 0 input at detection of either rising or falling edge of int 1 input at falling of conjunction of input logical level for port p0 (at input) at detection of uart1 bus collision detection at detection of either rising or falling edge of cntr 0 input at detection of either rising or falling edge of capture 0 input at detection of either rising or falling edge of capture 1 input at compare matched at timer x underflow at timer a underflow at timer b underflow at completion of a/d conversion at timer 1 underflow at brk instruction execution 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 reset (note 2) serial i/o1 receive serial i/o1 transmit serial i/o2 receive serial i/o2 transmit int 0 int 1 key-on wake-up/ uart1 bus collision detection (note 3) cntr 0 capture 0 capture 1 compare t imer x t imer a t imer b a/d conversion/ t imer 1 (note 4) brk instruction
rej03b0156-0122 rev.1.22 mar 31, 2009 page 20 of 94 7547 group fig. 16 interrupt control ? interrupt disable flag the interrupt disable flag is assigned to bit 2 of the processor sta- tus register. this flag controls the acceptance of all interrupt requests except for the brk instruction. when this flag is set to ?1?, the acceptance of interrupt requests is disabled. when it is set to ?0?, the acceptance of interrupt requests is enabled. this flag is set to ?1? with the sei instruction and set to ?0? with the cli in- struction. when an interrupt request is accepted, the contents of the proces- sor status register are pushed onto the stack while the interrupt disable flag remains set to ?0?. subsequently, this flag is automati- cally set to ?1? and multiple interrupts are disabled. to use multiple interrupts, set this flag to ?0? with the cli instruc- tion within the interrupt processing routine. the contents of the processor status register are popped off the stack with the rti instruction. ? interrupt request bits once an interrupt request is generated, the corresponding inter- rupt request bit is set to ?1? and remains ?1? until the request is accepted. when the request is accepted, this bit is automatically set to ?0?. each interrupt request bit can be set to ?0?, but cannot be set to ?1?, by software. ? interrupt enable bits the interrupt enable bits control the acceptance of the corre- sponding interrupt requests. when an interrupt enable bit is set to ?0?, the acceptance of the corresponding interrupt request is dis- abled. if an interrupt request occurs in this condition, the corresponding interrupt request bit is set to ?1?, but the interrupt request is not accepted. when an interrupt enable bit is set to ?1?, the acceptance of the corresponding interrupt request is enabled. each interrupt enable bit can be set to ?0? or ?1? by software. the interrupt enable bit for an unused interrupt should be set to ?0?. ? interrupt enable setting the following interrupt sources can be set to valid or invalid by the interrupt source set register (000a 16 ). ? key-on wakeup ? uart1 bus collision detection interrupt ? a/d conversion ? timer 1 interrupt ? interrupt edge selection the valid edge of external interrupt int 0 and int 1 can be selected by the interrupt edge selection bit of the interrupt edge selection register (003a 16 ), respectively. set bit 2 of interrupt edge selection register to ?1?. ? external interrupt int 1 for the external interrupt int 1 , the external input pin p3 3 /int 1 or p3 6 /int 1 can be selected by the int 1 input port selection bit of the interrupt edge selection register (003a 16 ). ? key-on wakeup enable/disable of a key-on wakeup of pins p0 0 , p0 4 , and p0 6 can be selected by the key-on wakeup enable bit of the interrupt edge selection register (003a 16 ), respectively. note: for key-on wakeup, uart1 bus collision detection, a/d conversion and timer 1 interrupt, even if interrupt valid bit (000a 16 ) is set ?0: invalid?, interrupt discrimination bit (000b 16 ) is set to ?1: interrupt occurs? when corresponding interrupt request occurs. but corresponding interrupt request bit (003c 16 , 003d 16 ) is not set to ?1?. interrupt disable flag i interrupt acceptance interrupt request bit interrupt enable bit brk instruction reset timer 1 interrupt request timer 1 interrupt valid bit a/d conversion interrupt request a/d conversion interrupt valid bit a/d conversion interrupt discrimination bit timer 1 interrupt discrimination bit a/d conversion/ timer 1 interrupt request bit uart1 bus collision detection interrupt request uart1 bus collision detection interrupt valid bit key-on wakeup interrupt request key-on wakeup interrupt valid bit key-on wakeup interrupt discrimination bit uart1 bus collision detection interrupt discrimination bit key-on wakeup/ uart1 bus collision detection interrupt request bit
rej03b0156-0122 rev.1.22 mar 31, 2009 page 21 of 94 7547 group fig. 17 structure of interrupt-related registers interrupt source set register (intset: address 000a 16 , initial value: 00 16 ) key-on wakeup interrupt valid bit b7 b0 interrupt source discrimination register (intdis: address 000b 16 , initial value: 00 16 ) key-on wakeup interrupt discrimination bit b7 b0 interrupt edge selection register (intedge : address 003a 16 , initial value: 00 16 ) b7 b0 not used (returns ?0? when read) timer 1 interrupt valid bit a/d conversion interrupt valid bit uart1 bus collision detection interrupt valid bit 1: interrupt valid 0: interrupt invalid 1: interrupt occurs 0: interrupt does not occur not used (returns ?0? when read) timer 1 interrupt discrimination bit a/d conversion interrupt discrimination bit uart1 bus collision detection interrupt discrimination bit int 0 interrupt edge selection bit 0 : falling edge active 1 : rising edge active int 1 interrupt edge selection bit 0 : falling edge active 1 : rising edge active int 1 input port selection bit 0 : p3 6 1 : p3 3 not used (returns ?0? when read) p0 0 key-on wakeup enable bit 0 : key-on wakeup enabled 1 : key-on wakeup disabled p0 4 key-on wakeup enable bit 0 : key-on wakeup enabled 1 : key-on wakeup disabled p0 6 key-on wakeup enable bit 0 : key-on wakeup enabled 1 : ke y -on wakeu p disabled b7 b0 interrupt control register 1 serial i/o1 receive interrupt enable bit 0 : interrupts disabled 1 : interrupts enabled (icon1 : address 003e 16 , initial value : 00 16 ) b7 b0 interrupt control register 2 capture 0 interrupt enable bit 0 : interrupts disabled 1: interrupts enabled (icon2 : address 003f 16 , initial value : 00 16 ) interrupt request register 2 0 : no interrupt request issued 1 : interrupt request issued (ireq2 : address 003d 16 , initial value : 00 16 ) b7 b0 capture 0 interrupt request bit interrupt request register 1 serial i/o1 receive interrupt request bit 0 : no interrupt request issued 1 : interrupt request issued (ireq1 : address 003c 16 , initial value : 00 16 ) b7 b0 not used (returns ?0? when read) (do not write ?1? to this bit) a/d conversion/timer 1 interrupt enable bit timer b interrupt enable bit timer a interrupt enable bit timer x interrupt enable bit compare interrupt enable bit capture 1 interrupt enable bit cntr 0 interrupt enable bit key-on wake up/uart1 bus collision detection interrupt enable bit int 1 interrupt enable bit int 0 interrupt enable bit serial i/o2 transmit interrupt enable bit serial i/o2 receive interrupt enable bit serial i/o1 transmit interrupt enable bit not used (returns ?0? when read) (do not write ?1? to this bit) a/d conversion/timer 1 interrupt request bit timer b interrupt request bit timer a interrupt request bit timer x interrupt request bit compare interrupt request bit capture 1 interrupt request bit cntr 0 interrupt request bit key-on wake up/uart1 bus collision detection interrupt request bit int 1 interrupt request bit int 0 interrupt request bit serial i/o2 transmit interrupt request bit serial i/o2 receive interrupt request bit serial i/o1 transmit interrupt request bit
rej03b0156-0122 rev.1.22 mar 31, 2009 page 22 of 94 7547 group ? interrupt request generation, acceptance, and handling interrupts have the following three phases. (i) interrupt request generation an interrupt request is generated by an interrupt source (ex- ternal interrupt signal input, timer underflow, etc.) and the corresponding request bit is set to ?1?. (ii) interrupt request acceptance based on the interrupt acceptance timing in each instruction cycle, the interrupt control circuit determines acceptance con- ditions (interrupt request bit, interrupt enable bit, and interrupt disable flag) and interrupt priority levels for accepting interrupt requests. when two or more interrupt requests are generated simultaneously, the highest priority interrupt is accepted. the value of the interrupt request bit for an unaccepted interrupt remains the same and acceptance is determined at the next interrupt acceptance timing point. (iii) handling of accepted interrupt request the accepted interrupt request is processed. fig. 18 shows the time up to execution in the interrupt processing routine, and fig. 19 shows the interrupt sequence. fig. 20 shows the timing of interrupt request generation, interrupt request bit, and interrupt request acceptance. ? interrupt handling execution when interrupt handling is executed, the following operations are performed automatically. (1) once the currently executing instruction is completed, an in- terrupt request is accepted. (2) the contents of the program counters and the processor sta- tus register at this point are pushed onto the stack area in order from 1 to 3. 1.high-order bits of program counter (pch) 2.low-order bits of program counter (pcl) 3.processor status register (ps) (3) concurrently with the push operation, the jump address of the corresponding interrupt (the start address of the interrupt pro- cessing routine) is transferred from the interrupt vector to the program counter. (4) the interrupt request bit for the corresponding interrupt is set to ?0?. also, the interrupt disable flag is set to ?1? and multiple interrupts are disabled. (5) the interrupt routine is executed. (6) when the rti instruction is executed, the contents of the reg- isters pushed onto the stack area are popped off in the order from 3 to 1. then, the routine that was before running interrupt processing resumes. as described above, it is necessary to set the stack pointer and the jump address in the vector area corresponding to each inter- rupt to execute the interrupt processing routine. fig. 18 time up to execution in interrupt routine main routine interrupt handling routine interrupt request generated interrupt request acceptance interrupt routine starts interrupt sequence 7 cycles 0 to 16* cycles 7 to 23 cycles * when executing div instruction stack push vector fetch
rej03b0156-0122 rev.1.22 mar 31, 2009 page 23 of 94 7547 group fig. 20 timing of interrupt request generation, interrupt request bit, and interrupt acceptance fig. 19 interrupt sequence sync rd wr address bus data bus pc not used s,sps s-1,sps s-2,sps b l b h a l ,a h pc h pc l ps a l a h sync : cpu operation code fetch cycle (this is an internal signal that cannot be observed from the external unit.) b l , b h : vector address of each interrupt a l , a h : jump destination address of each interrupt sps : ?00 16 ? or ?01 16 ? ([sps] is a page selected by the stack page selection bit of cpu mode register.) push onto stack vector fetch execute interrupt routine instruction cycle push onto stack vector fetch instruction cycle internal clock sync t1 ir1 t2 ir2 t3 ? ? t1 t2 t3 : interrupt acceptance timing points ir1 ir2 : timings points at which the interrupt request bit is set to ?1?. note : period 2 indicates the last cycle during one instruction cycle. (1) the interrupt request bit for an interrupt request generated during period 1 is set to ?1? at timing point ir1. (2) the interrupt request bit for an interrupt request generated during period 2 is set to ?1? at timing point ir1 or ir2. the timing point at which the bit is set to ?1? varies depending on conditions. when two or more interrupt requests are generated during the period 2, each request bit may be set to ?1? at timing point ir1 or ir2 separately. notes on interrupts when setting the followings, the interrupt request bit may be set to ?1?. ? int 0 interrupt edge selection bit (bit 0 of interrupt edge selection register (address 3a 16 )) ? int 1 interrupt edge selection bit (bit 1 of interrupt edge selection register) ? cntr 0 active edge switch bit (bit 2 of timer x mode register (address 2b 16 )) ? capture 0 interrupt edge selection bit (bits 1 and 0 of capture mode register (address 20 16 )) ? capture 1 interrupt edge selection bit (bits 3 and 2 of capture mode register) if it is not necessary to generate an interrupt synchronized with these settings, take the following sequence. (1) set the corresponding enable bit to ?0? (disabled). (2) set the interrupt edge selection bit (the active edge switch bit) or the interrupt source bit. (3) set the corresponding interrupt request bit to ?0? after one or more instructions have been executed. (4) set the corresponding interrupt enable bit to ?1? (enabled).
rej03b0156-0122 rev.1.22 mar 31, 2009 page 24 of 94 7547 group key input interrupt (key-on wake-up) a key-on wake-up interrupt request is generated by applying ?l? level to any pin of port p0 that has been set to input mode. in other words, it is generated when the and of input level goes from ?1? to ?0?. an example of using a key input interrupt is shown in fig. 21, where an interrupt request is generated by pressing one of the keys provided as an active-low key matrix which uses ports p0 0 to p0 3 as input ports. fig. 21 connection example when using key input interrupt and port p0 block diagram port pxx ?l? level output pull register bit 3 = ?0? port p0 7 latch port p0 7 direction register = ?1? ** * p0 7 output key input interrupt request port p0 input read circuit * p-channel transistor for pull-up ** cmos out p ut buffer pull register bit 3 = ?0? port p0 6 latch port p0 6 direction register = ?1? ** * p0 6 output pull register bit 3 = ?0? port p0 5 latch port p0 5 direction register = ?1? ** * p0 5 output pull register bit 3 = ?0? port p0 4 latch port p0 4 direction register = ?1? ** * p0 4 output pull register bit 2 = ?1? port p0 3 latch port p0 3 direction register = ?0? ** * p0 3 input pull register bit 2 = ?1? port p0 2 latch port p0 2 direction register = ?0? ** * p0 2 input pull register bit 1 = ?1? port p0 1 latch port p0 1 direction register = ?0? ** * p0 1 input pull register bit 0 = ?1? port p0 0 latch port p0 0 direction register = ?0? ** * p0 0 input falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection falling edge detection port p0 0 key-on wakeup selection bit port p0 6 key-on wakeup selection bit port p0 4 key-on wakeup selection bit
rej03b0156-0122 rev.1.22 mar 31, 2009 page 25 of 94 7547 group t imers the 7547 group has 4 timers: timer 1, timer x, timer a and timer b. the division ratio of every timer and prescaler is 1/(n+1) provided that the value of the timer latch or prescaler is n. all the timers are down count timers. when a timer reaches ?0?, an underflow occurs at the next count pulse, and the corresponding timer latch is reloaded into the timer. when a timer underflows, the interrupt request bit corresponding to each timer is set to ?1?. ? frequency divider for timer according to the clock division selection bits (b7 and b6) of cpu mode register (003b 16 ), the count source of frequency divider is set as follows; b7b6 = ?00?(high-speed), ?01?(middle-speed), ?11?(double-speed): x in b7b6 = ?10?(on-chip oscillator): on-chip oscillator t imer 1 t imer 1 is an 8-bit timer and counts the prescaler output. when timer 1 underflows, the timer 1 interrupt request bit is set to ?1?. prescaler 1 is an 8-bit prescaler and counts the signal which is the oscillation frequency divided by 16. prescaler 1 and timer 1 have the prescaler 1 latch and the timer 1 latch to retain the reload value, respectively. the value of prescaler 1 latch is set to prescaler 1 when prescaler 1 underflows. the value of timer 1 latch is set to timer 1 when timer 1 underflows. when writing to prescaler 1 (pre1) is executed, the value is writ- ten to both the prescaler 1 latch and prescaler 1. when writing to timer 1 (t1) is executed, the value is written to both the timer 1 latch and timer 1. when reading from prescaler 1 (pre1) and timer 1 (t1) is ex- ecuted, each count value is read out. t imer 1 always operates in the timer mode. prescaler 1 counts the signal which is the oscillation frequency di- vided by 16. each time the count clock is input, the contents of prescaler 1 is decremented by 1. when the contents of prescaler 1 reach ?00 16 ?, an underflow occurs at the next count clock, and the prescaler 1 latch is reloaded into prescaler 1 and count contin- ues. the division ratio of prescaler 1 is 1/(n+1) provided that the value of prescaler 1 is n. the contents of timer 1 is decremented by 1 each time the under- flow signal of prescaler 1 is input. when the contents of timer 1 reach ?00 16 ?, an underflow occurs at the next count clock, and the timer 1 latch is reloaded into timer 1 and count continues. the di- vision ratio of timer 1 is 1/(m+1) provided that the value of timer 1 is m. accordingly, the division ratio of prescaler 1 and timer 1 is 1/((n+1) ? (m+1)) provided that the value of prescaler 1 is n and the value of timer 1 is m. t imer 1 cannot stop counting by software. t imer x t imer x is an 8-bit timer and counts the prescaler x output. when timer x underflows, the timer x interrupt request bit is set to ?1?. prescaler x is an 8-bit prescaler and counts the signal selected by the timer x count source selection bit. prescaler x and timer x have the prescaler x latch and the timer x latch to retain the reload value, respectively. the value of prescaler x latch is set to prescaler x when prescaler x underflows.the value of timer x latch is set to timer x when timer x underflows. when writing to prescaler x (prex) is executed, the value is writ- ten to both the prescaler x latch and prescaler x. when writing to timer x (tx) is executed, the value is written to both the timer x latch and timer x. when reading from prescaler x (prex) and timer x (tx) is ex- ecuted, each count value is read out. t imer x can be selected in one of 4 operating modes by setting the timer x operating mode bits of the timer x mode register. (1) timer mode prescaler x counts the count source selected by the timer x count source selection bits. each time the count clock is input, the con- tents of prescaler x is decremented by 1. when the contents of prescaler x reach ?00 16 ?, an underflow occurs at the next count clock, and the prescaler x latch is reloaded into prescaler x and count continues. the division ratio of prescaler x is 1/(n+1) pro- vided that the value of prescaler x is n. the contents of timer x is decremented by 1 each time the under- flow signal of prescaler x is input. when the contents of timer x reach ?00 16 ?, an underflow occurs at the next count clock, and the timer x latch is reloaded into timer x and count continues. the di- vision ratio of timer x is 1/(m+1) provided that the value of timer x is m. accordingly, the division ratio of prescaler x and timer x is 1/((n+1) ? (m+1)) provided that the value of prescaler x is n and the value of timer x is m. (2) pulse output mode in the pulse output mode, the waveform whose polarity is inverted each time timer x underflows is output from the cntr 0 pin. the output level of cntr 0 pin can be selected by the cntr 0 ac- tive edge switch bit. when the cntr 0 active edge switch bit is ?0?, the output of cntr 0 pin is started at ?h? level. when this bit is ?1?, the output is started at ?l? level. also, the inverted waveform of pulse output from cntr 0 pin can be output from tx out pin by setting ?1? to the p0 3 /tx out output valid bit. when using a timer in this mode, set the port p1 4 and p0 3 direc- tion registers to output mode. (3) event counter mode the timer a counts signals input from the p1 4 /cntr 0 pin. except for this, the operation in event counter mode is the same as in timer mode. the active edge of cntr 0 pin input signal can be selected from rising or falling by the cntr 0 active edge switch bit .
rej03b0156-0122 rev.1.22 mar 31, 2009 page 26 of 94 7547 group (4) pulse width measurement mode in the pulse width measurement mode, the pulse width of the sig- nal input to p1 4 /cntr 0 pin is measured. the operation of timer x can be controlled by the level of the sig- nal input from the cntr 0 pin. when the cntr 0 active edge switch bit is ?0?, the signal selected by the timer x count source selection bit is counted while the input signal level of cntr 0 pin is ?h?. the count is stopped while the pin is ?l?. also, when the cntr 0 active edge switch bit is ?1?, the signal selected by the timer x count source selection bit is counted while the input signal level of cntr 0 pin is ?l?. the count is stopped while the pin is ?h?. t imer x can stop counting by setting ?1? to the timer x count stop bit in any mode. also, when timer x underflows, the timer x interrupt request bit is set to ?1?. note on timer x is described below; note on timer x (1) cntr 0 interrupt active edge selection-1 cntr 0 interrupt active edge depends on the cntr 0 active edge switch bit. when this bit is ?0?, the cntr 0 interrupt request bit is set to ?1? at the falling edge of cntr 0 pin input signal. when this bit is ?1?, the cntr 0 interrupt request bit is set to ?1? at the rising edge of cntr 0 pin input signal. (2) cntr 0 interrupt active edge selection-2 according to the setting value of cntr 0 active edge switch bit, the interrupt request bit may be set to ?1?. when not requiring the interrupt occurrence synchronized with these setting, take the following sequence. ? set the corresponding interrupt enable bit to ?0? (disabled). ? set the active edge switch bit. ? set the corresponding interrupt request bit to ?0? after 1 or more instructions have been executed. ? set the corresponding interrupt enable bit to ?1? (enabled). fig. 22 structure of timer x mode register fig. 23 timer count source set register t i m e r x m o d e r e g i s t e r ( t x m : a d d r e s s 0 0 2 b 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) c n t r 0 a c t i v e e d g e s w i t c h b i t 0 : i n t e r r u p t a t f a l l i n g e d g e c o u n t a t r i s i n g e d g e ( i n e v e n t c o u n t e r m o d e ) 1 : i n t e r r u p t a t r i s i n g e d g e c o u n t a t f a l l i n g e d g e ( i n e v e n t c o u n t e r m o d e ) t i m e r x o p e r a t i n g m o d e b i t s b 1 b 0 0 0 : t i m e r m o d e 0 1 : p u l s e o u t p u t m o d e 1 0 : e v e n t c o u n t e r m o d e 1 1 : p u l s e w i d t h m e a s u r e m e n t m o d e n o t u s e d ( r e t u r n ? 0 ? w h e n r e a d ) t i m e r x c o u n t s t o p b i t 0 : c o u n t s t a r t 1 : c o u n t s t o p b7 b0 p 0 3 / t x o u t o u t p u t v a l i d b i t 0 : o u t p u t i n v a l i d ( i / o p o r t ) 1 : o u t p u t v a l i d ( i n v e r t e d c n t r 0 o u t p u t ) b7 b0 timer x count source selection bits b1 b0 0 0 : f(x in )/16 0 1 : f(x in )/2 1 0 : f(x in ) ( note 1 ) 1 1 : not available notes 1: f(x in ) can be used as timer x count source when using a ceramic resonator or on-chip oscillator. do not use it at rc oscillation. 2: on-chip oscillator can be used when the on-chip oscillator  is enabled by bit 3 of cpum. timer count source set register (tcss : address 002a 16 , initial value: 00 16 ) timer b count source selection bits b7 b6 b5 0 0 0 : f(x in )/16 0 0 1 : f(x in )/2 0 1 0 : f(x in )/32 0 1 1 : f(x in )/64 1 0 0 : f(x in )/128 1 0 1 : f(x in )/256 1 1 0 : timer a underflow 1 1 1 : not available timer a count source selection bits b4 b3 b2 0 0 0 : f(x in )/16 0 0 1 : f(x in )/2 0 1 0 : f(x in )/32 0 1 1 : f(x in )/64 1 0 0 : f(x in )/128 1 0 1 : f(x in )/256 1 1 0 : on-chip oscillator output ( note 2 ) 1 1 1 : not available
rej03b0156-0122 rev.1.22 mar 31, 2009 page 27 of 94 7547 group fig. 24 block diagram of timer 1 and timer x q q p1 4 /cntr 0 r t 1/16 1/2 timer x interrupt request bit toggle flip-flop timer x count stop bit pulse width measurement mode event counter mode cntr 0 interrupt request bit pulse output mode port p1 4 latch port p1 4 direction register cntr 0 active edge switch bit timer mode pulse output mode cntr 0 active edge switch bit timer x count source selection bits 1/1 p0 3 /tx out prescaler x latch (8) prescaler x (8) timer x latch (8) timer x (8) data bus ?0? ?1? ?0? ?1? writing to timer x latch pulse output mode p0 3 /tx out output valid port p0 3 latch port p0 3 direction register prescaler 1 latch (8) prescaler 1 (8) timer 1 latch (8) timer 1 (8) 1/16 data bus timer 1 interrupt request frequency divider x in on-chip oscillator ?00? ?01? ?11? ?0? ?10? clock division ratio selection bits cpu mode register
rej03b0156-0122 rev.1.22 mar 31, 2009 page 28 of 94 7547 group t imer a,b t imer a and timer b are 16-bit timers and counts the signal which is the oscillation frequency selected by setting of the timer count source set register (tcss). timer a and timer b have the same function except of the count source clock selection. the count source clock of timer a is selected from among 1/2,1/ 16, 1/32, 1/64, 1/128, 1/256 of f(x in ) clock and on-chip oscillator clock. the count source clock of timer b is selected from among 1/2, 1/ 16, 1/32, 1/64, 1/128, 1/256 of f(x in ) clock and timer a underflow. t imer a (b) consists of the low-order of timer a: tal (timer b: tbl) and the high-order of timer a: tah (timer b: tbh). timer a (b) is decremented by 1 when each time of the count clock is in- put. when the contents of timer a (b) reach ?0000 16 ?, an underflow occurs at the next count clock, and the timer latch is re- loaded into timer. when timer a (b) underflows, the timer a (b) interrupt request bit is set to ?1?. t imer a (b) has the timer a (b) latch to retain the load value. the value of timer a (b) latch is set to timer a (b) at the timing of timer a (b) underflow. the division ratio of timer a (b) is 1/(n+1) pro- vided that the value of timer a (b) is n. when writing to both the low-order of timer a (b) and the high or- der of timer a (b) is executed, writing to ?latch only? or ?latch and timer? can be selected by the setting value of the timer a (b) write control bit. when reading from timer a (b) register is executed, the count value of timer a (b) is read out. be sure to write to/read out the low-order of timer a (b) and the high-order of timer a (b) in the following order; ? read read the high-order of timer a (b) first, and the low-order of timer a (b) next and be sure to read both high-order and low-order. ? write w rite to the low-order of timer a (b) first, and the high-order of t imer a (b) next and be sure to write both low-order and high or- der. t imer a and timer b can be used for the timing timer of input cap- ture and output compare function. notes on timer a, b (1) setting of timer value when ?1: write to only latch? is set to the timer a (b) write control bit, written data to timer register is set to only latch even if timer is stopped. accordingly, in order to set the initial value for timer when it is stopped, set ?0: write to latch and timer simultaneously? to timer a (b) write control bit. (2) read/write of timer a stop timer a to read/write its data when the system is in the follow- ing state; ? cpu operation clock source: x in oscillation ? timer a count source: on-chip oscillator output (3) read/write of timer b stop timer b to read/write its data when the system is in the fol- lowing state; ? cpu operation clock source: x in oscillation ? timer b count source: timer a underflow ? timer a count source: on-chip oscillator output
rej03b0156-0122 rev.1.22 mar 31, 2009 page 29 of 94 7547 group fig. 27 block diagram of timer a and timer b timer a (low-order) latch (8) timer a (low-order) (8) timer a (high-order) latch (8) timer a (high-order) (8) data bus timer a interrupt request compare capture timer b (low-order) latch (8) timer b (low-order) (8) timer b (high-order) latch (8) timer b (high-order) (8) data bus timer b interrupt request compare capture 1/2 1/16 1/32 1/64 1/128 1/256 timer a count stop bit timer a count source selection bits on-chip oscillator timer a write control bit timer b write control bit 1/2 1/16 1/32 1/64 1/128 1/256 timer b count stop bit timer b count source selection bits frequency divider on-chip oscillator x in ?00? ?01? ?11? clock division ratio selection bits ?10? frequency divider cpu mode register fig. 25 structure of timer a, b mode register fig. 26 timer count source set register t i m e r a , b m o d e r e g i s t e r ( t a b m : a d d r e s s 0 0 1 d 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 t i m e r a w r i t e c o n t r o l b i t 0 : w r i t e t o l a t c h a n d t i m e r s i m u l t a n e o u s l y 1 : w r i t e t o o n l y l a t c h t i m e r a c o u n t s t o p b i t 0 : c o u n t s t a r t 1 : c o u n t s t o p t i m e r b w r i t e c o n t r o l b i t 0 : w r i t e t o l a t c h a n d t i m e r s i m u l t a n e o u s l y 1 : w r i t e t o o n l y l a t c h t i m e r b c o u n t s t o p b i t 0 : c o u n t s t a r t 1 : c o u n t s t o p n o t u s e d ( r e t u r n ? 0 ? w h e n r e a d ) c o m p a r e 0 , 1 m o d u l a t i o n m o d e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e 2 , 3 m o d u l a t i o n m o d e b i t 0 : d i s a b l e d 1 : e n a b l e d b7 b0 timer x count source selection bits b1 b0 0 0 : f(x in )/16 0 1 : f(x in )/2 1 0 : f(x in ) ( note 1 ) 1 1 : not available notes 1: f(x in ) can be used as timer x count source when using a ceramic resonator or on-chip oscillator. do not use it at rc oscillation. 2: on-chip oscillator can be used when the on-chip oscillator  is enabled by bit 3 of cpum. timer count source set register (tcss : address 002a 16 , initial value: 00 16 ) timer b count source selection bits b7 b6 b5 0 0 0 : f(x in )/16 0 0 1 : f(x in )/2 0 1 0 : f(x in )/32 0 1 1 : f(x in )/64 1 0 0 : f(x in )/128 1 0 1 : f(x in )/256 1 1 0 : timer a underflow 1 1 1 : not available timer a count source selection bits b4 b3 b2 0 0 0 : f(x in )/16 0 0 1 : f(x in )/2 0 1 0 : f(x in )/32 0 1 1 : f(x in )/64 1 0 0 : f(x in )/128 1 0 1 : f(x in )/256 1 1 0 : on-chip oscillator output ( note 2 ) 1 1 1 : not available
rej03b0156-0122 rev.1.22 mar 31, 2009 page 30 of 94 7547 group output compare 7547 group has 4-output compare channels. each channel (0 to 3) has the same function and can be used to output waveform by us- ing count value of either timer a or timer b. the source timer for each channel is selected by setting value of the compare x (x = 0, 1, 2, 3) timer source bit. timer a and timer b can be selected for the source timer to each channel, respectively. to use each compare channel, set ?1? to the compare x output port bit and set the port direction register corresponding to com- pare channel to output mode. the compare value for each channel is set to the compare regis- ter (low-order) and compare register (high-order). w riting to the register for each channel is controlled by setting value of compare register write pointer. writing to each register is in the following order; 1.set the value of corresponded output compare channel to the compare register write pointer. 2.write a value to the compare register (low-order) and compare register (high-order). 3.set ?1? to the compare latch y (y = 00, 01, 10, 11, 20, 21, 30, 31) re-load bit. when ?1? is set to the compare latch y re-load bit, the value set to the compare register is loaded to compare latch when the next timer underflow. when count value of timer and setting value of compare latch is matched, compare output trigger occurs. when ?1: enabled? is set to the compare trigger x enable bit, the output waveform from port is inverted by compare trigger. when ?0: disabled? is set to the compare trigger x enable bit, the out- put waveform is not inverted, so port output can be fixed to ?h? or ?l?. when ?0: positive? is set to the compare x output level latch, the compare output waveform is turned to ?h level? at compare latch x0?s match and turned to ?l level? at compare latch x1?s match. when ?1 :negative? is set to the compare x output level latch, the compare output waveform is turned to ?l level? at compare latch x0?s match and turned to ?h level? at compare latch x1?s match. the compare output level of each channel can be confirmed by reading the compare x output status bit. compare output interrupt is available when match of each com- pare channel and timer count value. the interrupt request from each channel can be disabled or enabled by setting value of com- pare latch y interrupt source bit. compare 0,1 (2,3) modulation mode in compare modulation mode, modulation waveform can be gener- ated by using compare channel 0 and 1, or compare channel 2 and 3. to use this mode, ? set ?1: enabled? to the compare 0,1 (2, 3) modulation mode bit. ? set timer a underflow for timer b count source. ? set timer a for the timer source of compare channel 0 (2). ? set timer b for the timer source of compare channel 1 (3). in this mode, and waveform of compare 0 (1) and compare 2 (3) is generated from port p0 1 and p3 1 , respectively. accordingly, in order to use this mode, set ?1? to the compare 0 output port bit or compare 2 output port bit. fig. 28 structure of capture/compare register r/w pointer fig. 29 structure of compare register re-load register b 7 b 0 c o m p a r e r e g i s t e r r / w p o i n t e r b 2 b 1 b 0 000 : c o m p a r e l a t c h 0 0 001 : c o m p a r e l a t c h 0 1 010 : c o m p a r e l a t c h 1 0 011 : c o m p a r e l a t c h 1 1 100 : c o m p a r e l a t c h 2 0 101 : c o m p a r e l a t c h 2 1 110 : c o m p a r e l a t c h 3 0 111 : c o m p a r e l a t c h 3 1 n o t u s e d ( r e t u r n s 0 w h e n r e a d ) c a p t u r e r e g i s t e r 0 r / w p o i n t e r 0 : c a p t u r e l a t c h 0 0 1 : c a p t u r e l a t c h 0 1 c a p t u r e r e g i s t e r 1 r / w p o i n t e r 0 : c a p t u r e l a t c h 1 0 1 : c a p t u r e l a t c h 1 1 n o t u s e d ( r e t u r n s 0 w h e n r e a d ) c a p t u r e / c o m p a r e r e g i s t e r r / w p o i n t e r ( c c r p : a d d r e s s 0 0 1 2 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 c o m p a r e l a t c h 0 0 , 0 1 r e - l o a d b i t 0 : r e - l o a d d i s a b l e d 1 : r e - l o a d a t n e x t u n d e r f l o w c o m p a r e l a t c h 1 0 , 1 1 r e - l o a d b i t 0 : r e - l o a d d i s a b l e d 1 : r e - l o a d a t n e x t u n d e r f l o w c o m p a r e l a t c h 2 0 , 2 1 r e - l o a d b i t 0 : r e - l o a d d i s a b l e d 1 : r e - l o a d a t n e x t u n d e r f l o w c o m p a r e l a t c h 3 0 , 3 1 r e - l o a d b i t 0 : r e - l o a d d i s a b l e d 1 : r e - l o a d a t n e x t u n d e r f l o w n o t u s e d ( r e t u r n s 0 w h e n r e a d ) c o m p a r e r e g i s t e r r e - l o a d r e g i s t e r ( c m p r : a d d r e s s 0 0 1 4 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) notes on output compare ? when the selected source timer of each compare channel is stopped, written data to compare register is loaded to the com- pare latch simultaneously. ? do not write the same data to both of compare latch x0 and x1. ? when setting value of the compare latch is larger than timer set- ting value, compare match signal is not generated. accordingly, the output waveform is fixed to ?l? or ?h? level. however, when setting value of another compare latch is smaller than timer setting value, this compare match signal is generated. accordingly, compare match interrupt occurs. ? when the compare x trigger enable bit is cleared to ?0? (dis- abled), the match trigger to the waveform output circuit is disabled, and the output waveform can be fixed to ?l? or ?h? level. however, in this case, the compare match signal is generated. accordingly, compare match interrupt occurs.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 31 of 94 7547 group fig. 31 structure of timer source selection register fig. 32 structure of compare output mode register fig. 33 structure of capture/compare status register fig. 34 structure of compare interrupt source register b 7 b 0 c o m p a r e 0 t i m e r s o u r c e b i t c o m p a r e 1 t i m e r s o u r c e b i t c o m p a r e 2 t i m e r s o u r c e b i t c o m p a r e 3 t i m e r s o u r c e b i t c a p t u r e 0 t i m e r s o u r c e b i t c a p t u r e 1 t i m e r s o u r c e b i t n o t u s e d ( r e t u r n s 0 w h e n r e a d ) 0 : t i m e r a 1 : t i m e r b t i m e r s o u r c e s e l e c t i o n r e g i s t e r ( t m s r : a d d r e s s 0 0 1 f 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 c o m p a r e 0 o u t p u t l e v e l l a t c h 0 : p o s i t i v e 1 : n e g a t i v e c o m p a r e 1 o u t p u t l e v e l l a t c h 0 : p o s i t i v e 1 : n e g a t i v e c o m p a r e 2 o u t p u t l e v e l l a t c h 0 : p o s i t i v e 1 : n e g a t i v e c o m p a r e 3 o u t p u t l e v e l l a t c h 0 : p o s i t i v e 1 : n e g a t i v e c o m p a r e 0 t r i g g e r e n a b l e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e 1 t r i g g e r e n a b l e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e 2 t r i g g e r e n a b l e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e 3 t r i g g e r e n a b l e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e o u t p u t m o d e r e g i s t e r ( c m o m : a d d r e s s 0 0 2 1 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 c o m p a r e 0 o u t p u t s t a t u s b i t 0 : l l e v e l o u t p u t 1 : h l e v e l o u t p u t c o m p a r e 1 o u t p u t s t a t u s b i t 0 : l l e v e l o u t p u t 1 : h l e v e l o u t p u t c o m p a r e 2 o u t p u t s t a t u s b i t 0 : l l e v e l o u t p u t 1 : h l e v e l o u t p u t c o m p a r e 3 o u t p u t s t a t u s b i t 0 : l l e v e l o u t p u t 1 : h l e v e l o u t p u t c a p t u r e 0 s t a t u s b i t 0 : l a t c h 0 0 c a p t u r e d 1 : l a t c h 0 1 c a p t u r e d c a p t u r e 1 s t a t u s b i t 0 : l a t c h 1 0 c a p t u r e d 1 : l a t c h 1 1 c a p t u r e d n o t u s e d ( r e t u r n s 0 w h e n r e a d ) c a p t u r e / c o m p a r e s t a t u s r e g i s t e r ( c c s r : a d d r e s s 0 0 2 2 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 c o m p a r e l a t c h 0 0 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 0 1 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 1 0 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 1 1 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 2 0 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 2 1 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 3 0 i n t e r r u p t s o u r c e b i t c o m p a r e l a t c h 3 1 i n t e r r u p t s o u r c e b i t 0 : d i s a b l e d 1 : e n a b l e d c o m p a r e i n t e r r u p t s o u r c e r e g i s t e r ( c i s r : a d d r e s s 0 0 2 3 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) fig. 30 structure of capture/compare port register b 7 b 0 c a p t u r e 0 i n p u t p o r t b i t s b 1 b 0 00 : c a p t u r e f r o m p 0 0 01 : c a p t u r e f r o m p 1 0 10 : r i n g / 5 1 2 11 : n o t a v a i l a b l e c o m p a r e 0 o u t p u t p o r t b i t 0 : p 0 1 i s i / o p o r t 1 : p 0 1 i s c o m p a r e 0 c o m p a r e 1 o u t p u t p o r t b i t 0 : p 0 2 i s i / o p o r t 1 : p 0 2 i s c o m p a r e 1 c a p t u r e 1 i n p u t p o r t b i t 0 : c a p t u r e f r o m p 3 0 1 : r i n g / 5 1 2 c o m p a r e 2 o u t p u t p o r t b i t 0 : p 3 1 i s i / o p o r t 1 : p 3 1 i s c o m p a r e 2 c o m p a r e 3 o u t p u t p o r t b i t 0 : p 3 2 i s i / o p o r t 1 : p 3 2 i s c o m p a r e 3 n o t u s e d ( r e t u r n s 0 w h e n r e a d ) captur e/compare port register (ccpr : ad dress 001e 16 , initial value: 00 16 )
rej03b0156-0122 rev.1.22 mar 31, 2009 page 32 of 94 7547 group fig. 35 block diagram of output compare fig. 36 block diagram of compare channel 0 timer a latch timer a counter timer b counter timer b latch compare latch 00 compare latch 01 wave latch channel 0 compare 0 timer source bit compare channel 0 compare channel 1 compare channel 2 compare channel 3 p0 1 /cmp 0 p0 2 /cmp 1 p3 1 /cmp 2 p3 2 /cmp 3 compare buffer 00 (16) compare latch 00 (16) compare buffer 01 (16) compare latch 01 (16) data bus compare interrupt compare register write pointer (0012 16 , bits 0 to 2) compare latch 00, 01 re-load bit (0014 16 , bit 0) timer a counter (16) compare 0 timer source bit (001f 16 , bit 0) compare 0 trigger enable bit (0021 16 , bit 4) output latch compare 0 output level latch (0021 16 , bit 0) compare 0 output status bit (0022 16 , bit 0) compare 0 output port bit (001e 16 , bit 2) p0 1 /cmp 0 timer b counter (16) i/o port compare latch 00 interrupt source bit (0023 16 , bit 0) compare latch 01 interrupt source bit (0023 16 , bit 1) compare register
rej03b0156-0122 rev.1.22 mar 31, 2009 page 33 of 94 7547 group fig. 37 block diagram at modulation mode compare buffer 00 (16) compare latch 00 (16) compare buffer 01 (16) compare latch 01 (16) data bus compare register compare register write pointer (0012 16 , bits 0 to 2) compare latch 00, 01 re-load bit (0014 16 , bit 0) timer a counter (16) compare 0 (1) timer source bits (001f 16 , bit 0 (bit 1) compare 0 trigger enable bit (0021 16 , bit 4) output latch compare 0 output level latch (0021 16 , bit 0) compare 0 output status bit (0022 16 , bit 0) compare 0 output port bit (001e 16 , bit 2) p0 1 /cmp 0 timer b counter (16) compare 1 trigger enable bit (0021 16 , bit 5) output latch compare 1 output level latch (0021 16 , bit 1) compare 1 output status bit (0022 16 , bit 1) underflow compare latch 10 (16) compare buffer 10 (16) compare latch 11 (16) compare buffer 11 (16) data bus compare register compare latch 10, 11 re-load bit (0014 16 , bit 1) compare register write pointer (0012 16 , bits 0 to 2) i/o port
rej03b0156-0122 rev.1.22 mar 31, 2009 page 34 of 94 7547 group fig. 38 output compare mode (general waveform) fig. 39 output compare mode (compare register write timing) 000c 000b 000a 0009 0008 0007 0006 0005 0004 0003 0002 0001 000f 000e 000d 000c 000b 0000 000b 0005 0 1 0 timer underflow timer count value compare latch 00 compare latch 01 compare 00 match compare 01 match compare output compare interrupt compare status bit timer count clock note: compare interrupt occurs only for the interrupt source selected by compare interrupt source register. re-load the count value 000c 000b 000a 0009 0008 0007 0006 0005 0004 0003 0002 0001 000f 000e 000d 000c 000b 0000 000b 0005 0 1 1 0 000e 000c 0 timer underflow timer count value compare latch 00 compare latch 01 compare latch 00 write compare latch 01 write compare latch 00, 01 re-load bit compare latch 00, 01 re-load signal compare 00 match compare 01 match compare output compare interrupt compare status bit timer count clock re-load the count value
rej03b0156-0122 rev.1.22 mar 31, 2009 page 35 of 94 7547 group fig. 40 output compare mode (compare 0, 1 modulation mode) 000 4000 3000 2000 1000 0000 7000 6000 5000 4000 3000 2000 1000 7000 6000 5000 4000 3 000 0 0006 000 2 0 1 1 0 1 000 4000 3000 2000 1000 0000 7000 6000 5000 4000 3000 2000 1000 7000 6000 5000 4000 3 000 0 0004 000 1 0 1 1 0 1 0 ti mer a underflow ti mer a count value compare latch 00 compare latch 01 compare 00 match compare 01 match compare 0 output compare 0 output status bit ti mer a count clock carrier wave generated by compare 0 compare 0 output ti mer b count value compare latch 10 compare latch 11 compare 10 match compare 11 match compare 1 output compare interrupt compare 1 output status bit ti mer a underflow modulation of output waveform generated by compare 1 modulation output note: compare interrupt occurs only for the interrupt source selected by compare interrupt source register. port output waveform
rej03b0156-0122 rev.1.22 mar 31, 2009 page 36 of 94 7547 group fig. 41 output compare mode (compare 0, 1 modulation mode: effect of output level latch) modulation output compare 1 output compare 0 output 1. when compare 0 output level latch is ?positive?, compare 1 output level latch is ?positive?. modulation output compare 1 output compare 0 output 2. when compare 0 output level latch is ?negative?, compare 1 output level latch is ?positive?. modulation output compare 1 output compare 0 output 3. when compare 0 output level latch is ?positive?, compare 1 output level latch is ?negative?. modulation output compare 1 output compare 0 output 4. when compare 0 output level latch is ?negative?, compare 1 output level latch is ?negative?.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 37 of 94 7547 group input capture 7547 group has 2-input capture channels. each channel (0 and 1) has the same function and can be used to capture count value of either timer a or timer b. the source timer for each channel is selected by setting value of the capture x (x = 0, 1) timer source bit. timer a and timer b can be selected for the source timer to each channel, respectively. to use each capture channel, set the capture x input port bits and set the port direction register corresponding to capture channel to input mode. the input capture circuit retains the count value of selected timer when external trigger is input. the timer count value is retained to the capture latch x0 when rising edge is input and is retained to the capture latch x1 when falling edge is input. the count value of timer can be retained by software by capture y (y = 00, 01, 10, 11) software trigger bit too. when ?1? is set to this bit, count value of timer is retained to the corresponded capture latch. when reading from the capture y software trigger bit is executed, ?0? is read out. the latest status of capture latch can be confirmed by reading of the capture x status bit. this bit indicates the capture latch which latest data is in. the valid trigger edge for capture interrupt is set by the capture x interrupt edge selection bits. (regardless of the setting value of capture x interrupt edge selection bits, timer count values for both edges are retained to the capture latch.) each capture input has the noise filter circuit that judges continu- ous 4-time same level with sampling clock to be valid. the sampling clock of noise filter is set by the capture x noise filter clock selection bits. reading from the register for each channel is controlled by setting value of the capture register read pointer. reading from each reg- ister is in the following order; 1.set the value of the corresponded input capture channel to the capture register read pointer. 2.read from the capture register (low-order) and capture register (high-order). notes on input capture ? if the capture trigger is input while the capture register (low-order and high-order) is in read, captured value is changed between high-order reading and low-order reading. accordingly, some countermeasure by program is recommended, for example comparing the values that twice of read. ? when cpu operation clock source is x in oscillation and the on- chip-oscillator is selected for timer a count source, timer a cannot be used for the capture source timer. t imer b cannot be used for the capture source timer when the system is in the following state; ? cpu operation clock source: x in oscillation ? timer b count source: timer a underflow ? timer a count source: on-chip oscillator output ? when writing ?1? to capture latch x0 (x1) software trigger bit of capture latch x0 and x1 at the same time, or external trigger and software trigger occur simultaneously, the set value of capture x status bit is undefined. ? when setting the interrupt active edge selection bit and noise fil- ter clock selection bit of external interrupt cap 0 , cap 1 , the interrupt request bit may be set to ?1?. when not requiring the interrupt occurrence synchronized with these setting, take the following sequence. ? set the corresponding interrupt enable bit to ?0? (disabled). ? set the interrupt edge selection bit or noise filter clock selection bit. ? set the corresponding interrupt request bit to ?0? after 1 or more instructions have been executed. ? set the corresponding interrupt enable bit to ?1? (enabled). ? when the capture interrupt is used as the interrupt for return from stop mode, set the capture x noise filter clock selection bits to ?00 (filter stop)?.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 38 of 94 7547 group fig. 42 structure of capture software trigger register b 7 b 0 c a p t u r e r e g i s t e r 0 ( l o w - o r d e r ) ( c a p 0 l : a d d r e s s 0 0 0 c 1 6 ) b 7 b 0 c a p t u r e r e g i s t e r 0 ( h i g h - o r d e r ) ( c a p 0 h : a d d r e s s 0 0 0 d 1 6 ) b7 b0 c a p t u r e r e g i s t e r 1 ( l o w - o r d e r ) ( c a p 1 l : a d d r e s s 0 0 0 e 1 6 ) b 7 b 0 c a p t u r e r e g i s t e r 1 ( h i g h - o r d e r ) ( c a p 1 h : a d d r e s s 0 0 0 f 1 6 ) b7 b0 c a p t u r e 0 i n t e r r u p t e d g e s e l e c t i o n b i t s b 1 b 0 00 : r i s i n g a n d f a l l i n g e d g e 01 : r i s i n g e d g e 10 : f a l l i n g e d g e 11 : n o t a v a i l a b l e c a p t u r e 1 i n t e r r u p t e d g e s e l e c t i o n b i t s b 3 b 2 00 : r i s i n g a n d f a l l i n g e d g e 01 : r i s i n g e d g e 10 : f a l l i n g e d g e 11 : n o t a v a i l a b l e c a p t u r e 0 n o i s e f i l t e r c l o c k s e l e c t i o n b i t s b 5 b 4 00 : f i l t e r s t o p 01 : f ( x i n ) 10 : f ( x i n ) / 8 11 : f ( x i n ) / 3 2 c a p t u r e 1 n o i s e f i l t e r c l o c k s e l e c t i o n b i t s b 7 b 6 00 : f i l t e r s t o p 01 : f ( x i n ) 10 : f ( x i n ) / 8 11 : f ( x i n ) / 3 2 c a p t u r e m o d e r e g i s t e r ( c a p m : a d d r e s s 0 0 2 0 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) b 7 b 0 c a p t u r e l a t c h 0 0 s o f t w a r e t r i g g e r b i t c a p t u r e l a t c h 0 1 s o f t w a r e t r i g g e r b i t c a p t u r e l a t c h 1 0 s o f t w a r e t r i g g e r b i t c a p t u r e l a t c h 1 1 s o f t w a r e t r i g g e r b i t e a c h so f t w a r e t r i g g e r o c c u r s b y s e t t i n g 1 t o c o r r e s p o n d i n g b i t . ( r e t u r n s 0 w h e n r e a d ) n o t u s e d ( r e t u r n s 0 w h e n r e a d ) captur e software trigger register (cstr : a ddress 0013 16 , initial value: 00 16 ) fig. 43 structure of capture software trigger register/capture mode register
rej03b0156-0122 rev.1.22 mar 31, 2009 page 39 of 94 7547 group fig. 44 block diagram of input capture fig. 45 block diagram of capture channel 0 p1 0 /cap 0 p0 0 /cap 0 timer a latch timer a counter timer b counter timer b latch capture latch 00 capture latch 01 trigger input channel 0 capture 0 timer source bit capture channel 0 capture channel 1 ring /512 ring /512 p3 0 /cap 1 c apture pointer (0012 16 , bits 4, 5) c a p t u r e l a t c h 0 0 ( 1 6 ) c a p t u re l a t c h 0 1 ( 1 6 ) data bus capture in terrupt capture register 0 read pointer (0012 16 , bit 4) t i m e r a c o u n t e r ( 1 6 ) capture 0 timer source bit (001f 16 , bit 4) c a p t u r e t r i g g e r c a p t u r e 0 s t a t u s b i t ( 0 0 2 2 1 6 , b i t 4 ) d i g i t a l f i l t e r ring/512 c a p t u r e l a t c h 0 0 s o f t w a r e t r i g g e r b i t ( 0 0 1 3 1 6 , b i t 0 ) capture 0 input port bits (001e 16 , bits 0, 1) t i m e r b c o u n t e r ( 1 6 ) c a p t u r e 0 i n t e r r u p t e d g e s e l e c t i o n b i t s ( 0 0 2 0 1 6 , b i t s 0 , 1 ) p 1 0 / c a p 0 capture register capture latch 0 (16) capture 0 noise f ilter clock selection bits (0020 16 , bits 4, 5) p 0 0 / c a p 0 r i s i n g f a l l i n g
rej03b0156-0122 rev.1.22 mar 31, 2009 page 40 of 94 7547 group fig. 46 capture interrupt edge selection = ?rising edge? fig. 47 capture interrupt edge selection = ?rising and falling edge? 000c 000b 000a 0009 0008 0007 0006 0005 0004 0003 0002 0001 000f 000e 000d 000c 000b 0000 xxxx 000a 000c xxxx 0005 0001 000f 1 0 1 010 timer underflow capture input wave timer count value capture latch 00 capture latch 01 capture interrupt capture x (x=0, 1) status bit re-load the timer count value overwrite 000c 000b 000a 0009 0008 0007 0006 0005 0004 0003 0002 0001 000f 000e 000d 000c 000b 0000 1 0 1 010 xxxx 000a 000c xxxx 0005 0001 000f timer underflow capture input wave timer count value capture latch 00 capture latch 01 capture interrupt capture x (x=0, 1) status bit re-load the timer count value overwrite
rej03b0156-0122 rev.1.22 mar 31, 2009 page 41 of 94 7547 group fig. 48 block diagram of clock synchronous serial i/o1 fig. 49 operation of clock synchronous serial i/o1 function serial interface the 7547 group has serial i/o1 and serial i/o2. except that serial i/o1 has the bus collision detection function and the t x d 2 output structure for serial i/o2 is cmos only, they have the same function. serial i/o1 serial i/o1 can be used as either clock synchronous or asynchro- nous (uart) serial i/o. a dedicated timer is also provided for baud rate generation. (1) clock synchronous serial i/o1 mode clock synchronous serial i/o1 mode can be selected by setting the serial i/o1 mode selection bit of the serial i/o1 control register (bit 6) to ?1?. for clock synchronous serial i/o1, the transmitter and the receiver must use the same clock. if an internal clock is used, transfer is started by a write signal to the tb/rb. 1 / 4 1 / 4 f / f p 1 2 / s c l k 1 s e r i a l i / o 1 s t a t u s r e g i s t e r serial i/o1 control register p 1 3 / s r d y 1 p 1 0 / r x d 1 / c a p 0 p 1 1 / t x d 1 x in receive buffer register 1 a d d r e s s 0 0 1 8 1 6 r e c e i v e s h i f t r e g i s t e r 1 r e c e i v e b u f f e r f u l l f l a g ( r b f ) re ceive interrupt request (ri) clo ck control circui t s h i f t c l o c k serial i/o1 synchronous clock selection bit frequency division ratio 1/(n+1) baud rate generator 1 address 001c 16 brg count source selection bit c l o c k c o n t r o l c i r c u i t falling-edge detector t r a n s m i t b u f f e r r e g i s t e r 1 data bus a d d r e s s 0 0 1 8 1 6 shift clock t r a n s m i t s h i f t c o m p l e t i o n f l a g ( t s c ) t r a n s m i t b u f f e r e m p t y f l a g ( t b e ) t r a n s m i t i n t e r r u p t r e q u e s t ( t i ) transmit interrupt source selection bit address 0019 16 data bus a d d r e s s 0 0 1 a 1 6 transmit shift register 1 d 7 d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 0 d 1 d 2 d 3 d 4 d 5 d 6 rbf = 1 tsc = 1 tbe = 0 tbe = 1 tsc = 0 transfer shift clock (1/2 to 1/2048 of the internal clock, or an external clock) serial output txd 1 serial input rxd 1 write pulse to receive/transmit buffer register 1 (address 0018 16 ) overrun error (oe) detection notes 1: as the transmit interrupt (ti), which can be selected, either when the transmit buffer has emptied (tbe=1) or after the transmit shift operation has ended (tsc=1), by setting the transmit interrupt source selection bit (tic) of the serial i/o1 control register. 2: if data is written to the transmit buffer register when tsc=0, the transmit clock is generated continuously and serial data is output continuously from the txd 1 pin. 3: the receive interrupt (ri) is set when the receive buffer full flag (rbf) becomes ?1? . receive enable signal s rdy1
rej03b0156-0122 rev.1.22 mar 31, 2009 page 42 of 94 7547 group fig. 50 block diagram of uart serial i/o1 (2) asynchronous serial i/o1 (uart) mode clock asynchronous serial i/o mode (uart) can be selected by clearing the serial i/o1 mode selection bit of the serial i/o1 control register to ?0?. eight serial data transfer formats can be selected, and the transfer formats used by a transmitter and receiver must be identical. the transmit and receive shift registers each have a buffer, but the two buffers have the same address in memory. since the shift reg- ister cannot be written to or read from directly, transmit data is written to the transmit buffer register, and receive data is read from the receive buffer register. the transmit buffer register can also hold the next data to be transmitted, and the receive buffer register can hold a character while the next character is being received. fig. 51 operation of uart serial i/o1 function x i n 1/4 oe pe fe 1/16 1 / 1 6 d a t a b u s r e c e i v e b u f f e r r e g i s t e r 1 a d d r e s s 0 0 1 8 1 6 r e c e i v e s h i f t r e g i s t e r 1 r e c e i v e b u f f e r f u l l f l a g ( r b f ) r e c e i v e i n t e r r u p t r e q u e s t ( r i ) baud rate generator 1 f r e q u e n c y d i v i s i o n r a t i o 1 / ( n + 1 ) a d d r e s s 0 0 1 c 1 6 s t / s p / p a g e n e r a t o r transmit buffer register 1 data bus t r a n s m i t s h i f t r e g i s t e r 1 addr ess 0018 16 transmit shift completion flag (tsc) t r a n s m i t b u f f e r e m p t y f l a g ( t b e ) t r a n s m i t i n t e r r u p t r e q u e s t ( t i ) addr ess 0019 16 st detector sp detector u a r t 1 c o n t r o l r e g i s t e r address 001b 16 ch aracter length selection bit a d d r e s s 0 0 1 a 1 6 b r g c o u n t s o u r c e s e l e c t i o n b i t transmit interrupt source selection bit s e r i a l i / o 1 s y n c h r o n o u s c l o c k s e l e c t i o n b i t c l o c k c o n t r o l c i r c u i t c h a r a c t e r l e n g t h s e l e c t i o n b i t 7 b i t s 8 b i t s s e r i a l i / o 1 c o n t r o l r e g i s t e r p 1 2 / s c l k 1 serial i/o1 status register p 1 0 / r x d 1 / c a p 0 p1 1 /t x d 1 tsc=0 tbe=1 rbf=0 tbe=0 tbe=0 rbf=1 rbf=1 st d 0 d 1 sp d 0 d 1 st sp tbe=1 tsc=1 st d 0 d 1 sp d 0 d 1 st sp transmit or receive clock transmit buffer 1 write signal generated at 2nd bit in 2-stop-bit mode 1 start bit 7 or 8 data bit 1 or 0 parity bit 1 or 2 stop bit (s) 1: error flag detection occurs at the same time that the rbf flag becomes ?1? (at 1st stop bit, during reception). 2: as the transmit interrupt (ti), when either the tbe or tsc flag becomes ?1,? can be selected to occur depending on the settin g of the transmit interrupt source selection bit (tic) of the serial i/o1 control register. 3: the receive interrupt (ri) is set when the rbf flag becomes ?1.? 4: after data is written to the transmit buffer when tsc=1, 0.5 to 1.5 cycles of the data shift cycle is necessary until changing to tsc=0. notes ? ? serial output t x d 1 serial input r x d 1 receive buffer 1 read signal
rej03b0156-0122 rev.1.22 mar 31, 2009 page 43 of 94 7547 group [transmit buffer register 1/receive buffer register 1 (tb1/ rb1)] 0018 16 the transmit buffer register and the receive buffer register are lo- cated at the same address. the transmit buffer is write-only and the receive buffer is read-only. if a character bit length is 7 bits, the msb of data stored in the receive buffer is ?0?. [serial i/o1 status register (sio1sts)] 0019 16 the read-only serial i/o1 status register consists of seven flags (bits 0 to 6) which indicate the operating status of the serial i/o1 function and various errors. three of the flags (bits 4 to 6) are valid only in uart mode. the receive buffer full flag (bit 1) is cleared to ?0? when the receive buffer register is read. if there is an error, it is detected at the same time that data is transferred from the receive shift register to the receive buffer reg- ister, and the receive buffer full flag is set. a write to the serial i/o1 status register clears all the error flags oe, pe, fe, and se (bit 3 to bit 6, respectively). writing ?0? to the serial i/o1 enable bit sioe (bit 7 of the serial i/o1 control register) also clears all the status flags, including the error flags. b its 0 to 6 of the serial i/o1 status register are initialized to ?0? at reset, but if the transmit enable bit of the serial i/o1 control regis- ter has been set to ?1?, the transmit shift completion flag (bit 2) and the transmit buffer empty flag (bit 0) become ?1?. [serial i/o1 control register (sio1con)] 001a 16 the serial i/o1 control register consists of eight control bits for the serial i/o1 function. [uart1 control register (uart1con)] 001b 16 the uart1 control register consists of four control bits (bits 0 to 3) which are valid when asynchronous serial i/o is selected and set the data format of an data transfer and one bit (bit 4) which is always valid and sets the output structure of the p1 1 /txd 1 pin. [baud rate generator 1 (brg1)] 001c 16 the baud rate generator determines the baud rate for serial transfer. the baud rate generator divides the frequency of the count source by 1/(n + 1), where n is the value written to the baud rate generator. notes on serial i/o1 ? serial i/o interrupt when setting the transmit enable bit to ?1?, the serial i/o transmit interrupt request bit is automatically set to ?1?. when not requiring the interrupt occurrence synchronized with the transmission en- abled, take the following sequence. ? set the serial i/o transmit interrupt enable bit to ?0? (disabled). ? set the transmit enable bit to ?1?. ? set the serial i/o transmit interrupt request bit to ?0? after 1 or more instructions have been executed. ? set the serial i/o transmit interrupt enable bit to ?1? (enabled). ? i/o pin function when serial i/o1 is enabled. the functions of p1 2 and p1 3 are switched with the setting values of a serial i/o1 mode selection bit and a serial i/o1 synchronous clock selection bit as follows. (1) serial i/o1 mode selection bit ?1? : clock synchronous type serial i/o is selected. setup of a serial i/o1 synchronous clock selection bit ?0? : p1 2 pin turns into an output pin of a synchronous clock. ?1? : p1 2 pin turns into an input pin of a synchronous clock. setup of a s rdy1 output enable bit (srdy) ?0? : p1 3 pin can be used as a normal i/o pin. ?1? : p1 3 pin turns into a s rdy1 output pin. (2) serial i/o1 mode selection bit ?0? : clock asynchronous (uart) type serial i/o is selected. setup of a serial i/o1 synchronous clock selection bit ?0?: p1 2 pin can be used as a normal i/o pin. ?1?: p1 2 pin turns into an input pin of an external clock. when clock asynchronous (uart) type serial i/o is selected, it is p1 3 pin. it can be used as a normal i/o pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 44 of 94 7547 group fig. 52 structure of serial i/o1-related registers t r a n s m i t b u f f e r e m p t y f l a g ( t b e ) 0 : b u f f e r f u l l 1 : b u f f e r e m p t y r e c e i v e b u f f e r f u l l f l a g ( r b f ) 0 : b u f f e r e m p t y 1 : b u f f e r f u l l t r a n s m i t s h i f t c o m p l e t i o n f l a g ( t s c ) 0 : t r a n s m i t s h i f t i n p r o g r e s s 1 : t r a n s m i t s h i f t c o m p l e t e d o v e r r u n e r r o r f l a g ( o e ) 0 : n o e r r o r 1 : o v e r r u n e r r o r p a r i t y e r r o r f l a g ( p e ) 0 : n o e r r o r 1 : p a r i t y e r r o r f r a m i n g e r r o r f l a g ( f e ) 0 : n o e r r o r 1 : f r a m i n g e r r o r s u m m i n g e r r o r f l a g ( s e ) 0 : ( o e ) u ( p e ) u ( f e ) = 0 1 : ( o e ) u ( p e ) u ( f e ) = 1 n o t u s e d ( r e t u r n s ? 1 ? w h e n r e a d ) b 7 b 7 s e r i a l i / o 1 s t a t u s r e g i s t e r s e r i a l i / o 1 c o n t r o l r e g i s t e r b 0 b 0 b r g c o u n t s o u r c e s e l e c t i o n b i t ( c s s ) 0 : f ( x i n ) 1 : f ( x i n ) / 4 s e r i a l i / o 1 s y n c h r o n o u s c l o c k s e l e c t i o n b i t ( s c s ) 0 : b r g o u t p u t d i v i d e d b y 4 w h e n c l o c k s y n c h r o n o u s s e r i a l i / o i s s e l e c t e d , b r g o u t p u t d i v i d e d b y 1 6 w h e n u a r t i s s e l e c t e d . 1 : e x t e r n a l c l o c k i n p u t w h e n c l o c k s y n c h r o n o u s s e r i a l i / o i s s e l e c t e d , e x t e r n a l c l o c k i n p u t d i v i d e d b y 1 6 w h e n u a r t i s s e l e c t e d . s r d y 1 o u t p u t e n a b l e b i t ( s r d y ) 0 : p 1 3 p i n o p e r a t e s a s o r d i n a r y i / o p i n 1 : p 1 3 p i n o p e r a t e s a s s r d y 1 o u t p u t p i n t r a n s m i t i n t e r r u p t s o u r c e s e l e c t i o n b i t ( t i c ) 0 : i n t e r r u p t w h e n t r a n s m i t b u f f e r h a s e m p t i e d 1 : i n t e r r u p t w h e n t r a n s m i t s h i f t o p e r a t i o n i s c o m p l e t e d t r a n s m i t e n a b l e b i t ( t e ) 0 : t r a n s m i t d i s a b l e d 1 : t r a n s m i t e n a b l e d r e c e i v e e n a b l e b i t ( r e ) 0 : r e c e i v e d i s a b l e d 1 : r e c e i v e e n a b l e d s e r i a l i / o 1 m o d e s e l e c t i o n b i t ( s i o m ) 0 : c l o c k a s y n c h r o n o u s ( u a r t ) s e r i a l i / o 1 : c l o c k s y n c h r o n o u s s e r i a l i / o s e r i a l i / o 1 e n a b l e b i t ( s i o e ) 0 : s e r i a l i / o 1 d i s a b l e d ( p i n s p 1 0 t o p 1 3 o p e r a t e a s o r d i n a r y i / o p i n s ) 1 : s e r i a l i / o 1 e n a b l e d ( p i n s p 1 0 t o p 1 3 o p e r a t e a s s e r i a l i / o p i n s ) b7 u a r t 1 c o n t r o l r e g i s t e r c haracter length selection bit (chas) 0: 8 bits 1: 7 bits pa rity enable bit (pare) 0: parity checking disabled 1: parity checking enabled parity selection bit (pars) 0: even parity 1: odd parity st op bit length selection bit (stps) 0: 1 stop bit 1: 2 stop bits p1 1 /t x d 1 p- ch annel output disable bit (poff) 0: cmos output (in output mode) 1: n-channel open drain output (in output mode) not us ed (return ?1? when read) b0 ( s i o 1 s t s : a d d r e s s 0 0 1 9 1 6 , i n i t i a l v a l u e : 8 0 1 6 ) ( s i o 1 c o n : a d d r e s s 0 0 1 a 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) ( u a r t 1 c o n : a d d r e s s 0 0 1 b 1 6 , i n i t i a l v a l u e : e 0 1 6 )
rej03b0156-0122 rev.1.22 mar 31, 2009 page 45 of 94 7547 group bus collision detection (sio1) sio1 can detect a bus collision by setting uart1 bus collision de- tection interrupt enable bit. when transmission is started in the clock synchronous or asyn- chronous (uart) serial i/o mode, the transmit pin txd 1 is compared with the receive pin rxd 1 in synchronization with rising edge of transmit shift clock. if they do not coincide with each other, a bus collision detection interrupt request occurs. when a transmit data collision is detected between lsb and msb of transmit data in the clock synchronous serial i/o mode or be- tween the start bit and stop bit of transmit data in uart mode, a bus collision detection can be performed by both the internal clock and the external clock. a block diagram is shown in fig. 54. a timing diagram is shown in fig. 55. note: bus collision detection can be used when sio1 is operating at full-duplex communication. when sio1 is operating at half-duplex communication, set bus collision detection inter- rupt to be disabled. fig. 54 block diagram of bus collision detection interrupt circuit fig. 55 timing diagram of bus collision detection interrupt d txd 1  rxd 1 shift clock ua r t1 bus collision detection  interrupt valid bit (address 000a 16 , bit 1) ua r t1 bus collision detection  interrupt discrimination bit (address 000b 16 , bit 1) ke y-on wakeup/ ua r t1 bus collision detection  interrupt request bit (address 003c 16 , bit 6) ke y-on wakeup interrupt request q 0 : no interrupt request issued interrupt source set register (intset: address 000a 16 , initial value: 00 16 ) key-on wakeup interrupt valid bit b7 b0 0: interrupt invalid interrupt source discrimination register (intdis: address 000b 16 , initial value: 00 16 ) key-on wakeup interrupt discrimination bit b7 b0 interrupt request register 1 (ireq1 : address 003c 16 , initial value : 00 16 ) serial i/o1 receive interrupt request bit b7 b0 serial i/o1 receive interrupt enable bit 0 : interrupts disabled interrupt control register 1 (icon1 : address 003e 16 , initial value : 00 16 ) b7 b0 1 : interrupts enabled cntr 0 interrupt enable bit key-on wake up/uart1 bus collision int 1 interrupt enable bit int 0 interrupt enable bit serial i/o2 transmit interrupt enable bit serial i/o2 receive interrupt enable bit serial i/o1 transmit interrupt enable bit detection interrupt enable bit 1 : interrupt request issued cntr 0 interrupt request bit detection interrupt request bit key-on wake up/uart1 bus collision int 1 interrupt request bit int 0 interrupt request bit serial i/o2 transmit interrupt request bit serial i/o2 receive interrupt request bit serial i/o1 transmit interrupt request bit 1: interrupt occurs 0: interrupt does not occur not used (returns ?0? when read) timer 1 interrupt discrimination bit a/d conversion interrupt discrimination bit discrimination bit uart1 bus collision detection interrupt 1: interrupt valid not used (returns ?0? when read) timer 1 interrupt valid bit a/d conversion interrupt valid bit uart1 bus collision detection interrupt valid bit fig. 53 bus collision detection circuit related registers bus collision detection interrupt generation data collision tr ansmit shift clock tr ansmit pin txd 1  receive pin rxd 1
rej03b0156-0122 rev.1.22 mar 31, 2009 page 46 of 94 7547 group fig. 56 block diagram of clock synchronous serial i/o2 fig. 57 operation of clock synchronous serial i/o2 function serial i/o2 serial i/o2 can be used as either clock synchronous or asynchro- nous (uart) serial i/o. a dedicated timer is also provided for baud rate generation. (1) clock synchronous serial i/o2 mode clock synchronous serial i/o2 mode can be selected by setting the serial i/o2 mode selection bit of the serial i/o2 control register (bit 6) to ?1?. for clock synchronous serial i/o2, the transmitter and the receiver must use the same clock. if an internal clock is used, transfer is started by a write signal to the tb/rb. d 7 d 7 d 0 d 1 d 2 d 3 d 4 d 5 d 6 d 0 d 1 d 2 d 3 d 4 d 5 d 6 rbf = 1 tsc = 1 tbe = 0 tbe = 1 tsc = 0 transfer shift clock (1/2 to 1/2048 of the internal clock, or an external clock) serial output txd 2 serial input rxd 2 write pulse to receive/transmit buffer register 2 (address 002e 16 ) overrun error (oe) detection notes 1: as the transmit interrupt (ti), which can be selected, either when the transmit buffer has emptied (tbe=1) or after the transmit shift operation has ended (tsc=1), by setting the transmit interrupt source selection bit (tic) of the serial i/o2 control register. 2: if data is written to the transmit buffer register when tsc=0, the transmit clock is generated continuously and serial data is output continuously from the txd 2 pin. 3: the receive interrupt (ri) is set when the receive buffer full flag (rbf) becomes ?1? . receive enable signal s rdy2 1 / 4 1 / 4 f / f p 0 6 / s c l k 2 s e r i a l i / o 2 s t a t u s r e g i s t e r s e r i a l i / o 2 c o n t r o l r e g i s t e r p 0 7 / s r d y 2 p 0 4 / r x d 2 p 0 5 / t x d 2 x i n r e c e i v e b u f f e r r e g i s t e r 2 a d d r e s s 0 0 2 e 1 6 r e c e i v e s h i f t r e g i s t e r 2 r e c e i v e b u f f e r f u l l f l a g ( r b f ) r e c e i v e i n t e r r u p t r e q u e s t ( r i ) c l o c k c o n t r o l c i r c u i t s h i f t c l o c k s e r i a l i / o 2 s y n c h r o n o u s c l o c k s e l e c t i o n b i t f r e q u e n c y d i v i s i o n r a t i o 1 / ( n + 1 ) b a u d r a t e g e n e r a t o r 2 a d d r e s s 0 0 3 2 1 6 b r g c o u n t s o u r c e s e l e c t i o n b i t c l o c k c o n t r o l c i r c u i t f a l l i n g - e d g e d e t e c t o r t r a n s m i t b u f f e r r e g i s t e r 2 d a t a b u s a d d r e s s 0 0 2 e 1 6 s h i f t c l o c k t r a n s m i t s h i f t c o m p l e t i o n f l a g ( t s c ) t r a n s m i t b u f f e r e m p t y f l a g ( t b e ) t r a n s m i t i n t e r r u p t r e q u e s t ( t i ) t r a n s m i t i n t e r r u p t s o u r c e s e l e c t i o n b i t a d d r e s s 0 0 2 f 1 6 d a t a b u s a d d r e s s 0 0 3 0 1 6 t r a n s m i t s h i f t r e g i s t e r 2
rej03b0156-0122 rev.1.22 mar 31, 2009 page 47 of 94 7547 group fig. 58 block diagram of uart serial i/o2 (2) asynchronous serial i/o2 (uart) mode clock asynchronous serial i/o mode (uart) can be selected by clearing the serial i/o2 mode selection bit of the serial i/o2 control register to ?0?. eight serial data transfer formats can be selected, and the transfer formats used by a transmitter and receiver must be identical. the transmit and receive shift registers each have a buffer, but the two buffers have the same address in memory. since the shift reg- ister cannot be written to or read from directly, transmit data is written to the transmit buffer register, and receive data is read from the receive buffer register. the transmit buffer register can also hold the next data to be transmitted, and the receive buffer register can hold a character while the next character is being received. fig. 59 operation of uart serial i/o2 function x in 1/4 oe pe fe 1/16 1/16 data bus receive buffer register 2 address 002e 16 receive shift register 2 receive buffer full flag (rbf) receive interrupt request (ri) baud rate generator 2 frequency division ratio 1/(n+1) address 0032 16 st/sp/pa generator transmit buffer register 2 data bus transmit shift register 2 address 002e 16 transmit shift completion flag (tsc) transmit buffer empty flag (tbe) transmit interrupt request (ti) address 002f 16 st detector sp detector uart2 control register address 0031 16 character length selection bit address 0030 16 brg count source selection bit transmit interrupt source selection bit serial i/o2 synchronous clock selection bit clock control circuit character length selection bit 7 bits 8 bits serial i/o2 control register p0 6 /s clk2 serial i/o2 status register p0 4 /r x d 2 p0 5 /t x d 2 tsc=0 tbe=1 rbf=0 tbe=0 tbe=0 rbf=1 rbf=1 st d 0 d 1 sp d 0 d 1 st sp tbe=1 tsc=1 st d 0 d 1 sp d 0 d 1 st sp transmit or receive clock transmit buffer 2 write signal generated at 2nd bit in 2-stop-bit mode 1 start bit 7 or 8 data bit 1 or 0 parity bit 1 or 2 stop bit (s) 1: error flag detection occurs at the same time that the rbf flag becomes ?1? (at 1st stop bit, during reception). 2: as the transmit interrupt (ti), when either the tbe or tsc flag becomes ?1,? can be selected to occur depending on the settin g of the transmit interrupt source selection bit (tic) of the serial i/o2 control register. 3: the receive interrupt (ri) is set when the rbf flag becomes ?1.? 4: after data is written to the transmit buffer when tsc=1, 0.5 to 1.5 cycles of the data shift cycle is necessary until changing to tsc=0. notes ? ? serial output t x d 2 serial input r x d 2 receive buffer 2 read signal
rej03b0156-0122 rev.1.22 mar 31, 2009 page 48 of 94 7547 group [transmit buffer register 2/receive buffer register 2 (tb2/ rb2)] 002e 16 the transmit buffer register and the receive buffer register are lo- cated at the same address. the transmit buffer is write-only and the receive buffer is read-only. if a character bit length is 7 bits, the msb of data stored in the receive buffer is ?0?. [serial i/o2 status register (sio2sts)] 002f 16 the read-only serial i/o2 status register consists of seven flags (bits 0 to 6) which indicate the operating status of the serial i/o2 function and various errors. three of the flags (bits 4 to 6) are valid only in uart mode. the receive buffer full flag (bit 1) is cleared to ?0? when the receive buffer register is read. if there is an error, it is detected at the same time that data is transferred from the receive shift register to the receive buffer reg- ister, and the receive buffer full flag is set. a write to the serial i/o1 status register clears all the error flags oe, pe, fe, and se (bit 3 to bit 6, respectively). writing ?0? to the serial i/o2 enable bit sioe (bit 7 of the serial i/o2 control register) also clears all the status flags, including the error flags. bits 0 to 6 of the serial i/o2 status register are initialized to ?0? at reset, but if the transmit enable bit of the serial i/o2 control regis- ter has been set to ?1?, the transmit shift completion flag (bit 2) and the transmit buffer empty flag (bit 0) become ?1?. [serial i/o2 control register (sio2con)] 0030 16 the serial i/o2 control register consists of eight control bits for the serial i/o2 function. [uart2 control register (uart2con)] 0031 16 the uart control register consists of four control bits (bits 0 to 3) which are valid when asynchronous serial i/o is selected and set the data format of an data transfer. [baud rate generator 2 (brg2)] 0032 16 the baud rate generator determines the baud rate for serial transfer. the baud rate generator divides the frequency of the count source by 1/(n + 1), where n is the value written to the baud rate generator. notes on serial i/o2 ? serial i/o interrupt when setting the transmit enable bit to ?1?, the serial i/o transmit interrupt request bit is automatically set to ?1?. when not requiring the interrupt occurrence synchronized with the transmission en- abled, take the following sequence. ? set the serial i/o transmit interrupt enable bit to ?0? (disabled). ? set the transmit enable bit to ?1?. ? set the serial i/o transmit interrupt request bit to ?0? after 1 or more instructions have been executed. ? set the serial i/o transmit interrupt enable bit to ?1? (enabled). ? i/o pin function when serial i/o2 is enabled. the functions of p0 6 and p0 7 are switched with the setting values of a serial i/o2 mode selection bit and a serial i/o2 synchronous clock selection bit as follows. (1) serial i/o2 mode selection bit ?1? : clock synchronous type serial i/o is selected. setup of a serial i/o2 synchronous clock selection bit ?0? : p0 6 pin turns into an output pin of a synchronous clock. ?1? : p0 6 pin turns into an input pin of a synchronous clock. setup of a s rdy2 output enable bit (srdy) ?0? : p0 7 pin can be used as a normal i/o pin. ?1? : p0 7 pin turns into a s rdy2 output pin. (2) serial i/o2 mode selection bit ?0? : clock asynchronous (uart) type serial i/o is selected. setup of a serial i/o2 synchronous clock selection bit ?0?: p0 6 pin can be used as a normal i/o pin. ?1?: p0 6 pin turns into an input pin of an external clock. when clock asynchronous (uart) type serial i/o is selected, it is p0 7 pin. it can be used as a normal i/o pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 49 of 94 7547 group t r a n s m i t b u f f e r e m p t y f l a g ( t b e ) 0 : b u f f e r f u l l 1 : b u f f e r e m p t y r e c e i v e b u f f e r f u l l f l a g ( r b f ) 0 : b u f f e r e m p t y 1 : b u f f e r f u l l t r a n s m i t s h i f t c o m p l e t i o n f l a g ( t s c ) 0 : t r a n s m i t s h i f t i n p r o g r e s s 1 : t r a n s m i t s h i f t c o m p l e t e d o v e r r u n e r r o r f l a g ( o e ) 0 : n o e r r o r 1 : o v e r r u n e r r o r p a r i t y e r r o r f l a g ( p e ) 0 : n o e r r o r 1 : p a r i t y e r r o r f r a m i n g e r r o r f l a g ( f e ) 0 : n o e r r o r 1 : f r a m i n g e r r o r s u m m i n g e r r o r f l a g ( s e ) 0 : ( o e ) u ( p e ) u ( f e ) = 0 1 : ( o e ) u ( p e ) u ( f e ) = 1 n o t u s e d ( r e t u r n s ? 1 ? w h e n r e a d ) b 7 b 7 s e r i a l i / o 2 s t a t u s r e g i s t e r s e r i a l i / o 2 c o n t r o l r e g i s t e r b 0 b 0 brg coun t source selection bit (css) 0: f(x in ) 1: f(x in )/4 serial i/o2 synchronous clock selection bit (scs) 0: brg output divided by 4 when clock synchronous serial i/o is selected, brg output divided by 16 wh en ua rt is selected. 1: external clock input when clock synchronous serial i/o is selected, external clock input divided by 16 when uart is selected. s rdy2 output enable bit (srdy) 0: p0 7 pin operates as ordinary i/o pin 1: p0 7 pin operates as s rdy2 output pin transmit in terrupt source selection bit (tic) 0: interrupt when transmit buffer has emptied 1: interrupt when transmit shift operation is completed transmit enable bit (te) 0: transmit disabled 1: transmit enabled receive enab le bi t (re) 0: rece ive di sabled 1: receive enabled serial i/o2 mode selection bit (siom) 0: clock asynchronous (uart) serial i/o 1: clock synchronous serial i/o serial i/o2 enable bit (sioe) 0: serial i/o2 disabled (pins p0 4 to p0 7 operate as ordinary i/o pins) 1: serial i/o2 enabled (pins p0 4 to p0 7 operate as serial i/o pins) b 7 u a r t 2 c o n t r o l r e g i s t e r ch aracter length selection bit (chas) 0: 8 bits 1: 7 bits pa rity enable bit (pare) 0: parity checking disabled 1: parity checking enabled parity selection bit (pars) 0: even parity 1: odd parity st op bit length selection bit (stps) 0: 1 stop bit 1: 2 stop bits not us ed (return ?0? when read) (do not write ?1 ? to this bit.) not us ed (return ?1? when read) b0 ( s i o 2 s t s : a d d r e s s 0 0 2 f 1 6 , i n i t i a l v a l u e : 8 0 1 6 ) ( s i o 2 c o n : a d d r e s s 0 0 3 0 1 6 , i n i t i a l v a l u e : 0 0 1 6 ) (uart2con : address 0031 16 , in itial value: e0 16 ) fig. 60 structure of serial i/o2-related registers
rej03b0156-0122 rev.1.22 mar 31, 2009 page 50 of 94 7547 group a/d converter the functional blocks of the a/d converter are described below. [a/d conversion register] ad the a/d conversion register is a read-only register that stores the result of a/d conversion. do not read out this register during an a/ d conversion. [a/d control register] adcon the a/d control register controls the a/d converter. bit 2 to 0 are analog input pin selection bits. bit 3 is the a/d conversion clock selection bit. when ?0? is set to this bit, the a/d conversion clock is f(x in )/2 and the a/d conversion time is 122 cycles of f(x in ). when ?1? is set to this bit, the a/d conversion clock is f(x in ) and the a/d conversion time is 61 cycles of f(x in ). bit 4 is the a/d conversion completion bit. the value of this bit re- mains at ?0? during a/d conversion, and changes to ?1? at completion of a/d conversion. a/d conversion is started by setting this bit to ?0?. [comparison voltage generator] the comparison voltage generator divides the voltage between av ss and v ref by 1024, and outputs the divided voltages. [channel selector] the channel selector selects one of ports p2 7 /an 7 to p2 0 /an 0 , and inputs the voltage to the comparator. [comparator and control circuit] the comparator and control circuit compares an analog input volt- age with the comparison voltage and stores its result into the a/d conversion register. when a/d conversion is completed, the con- trol circuit sets the a/d conversion completion bit and the a/d interrupt request bit to ?1?. because the comparator is constructed linked to a capacitor, set f(x in ) in order that the a/d conversion clock is 250 khz or over during a/d conversion. notes on a/d converter as for ad translation accuracy, on the following operating condi- tions, accuracy may become low. (1) since the analog circuit inside a microcomputer becomes sen- sitive to noise when v ref voltage is set up lower than vcc voltage, accuracy may become low rather than the case where v ref voltage and vcc voltage are set up to the same value.. (2) when v ref voltage is lower than [ 3.0 v ], the accuracy at the low temperature may become extremely low compared with that at room temperature. when the system would be used at low temperature, the use at v ref =3.0 v or more is recom- mended. fig. 61 structure of a/d control register fig. 62 structure of a/d conversion register read 8-bit (read only address 0035 16 ) b7 b0 b9 b8 b7 b6 b5 b4 b3 b2 (address 0035 16 ) read 10-bit (read in order address 0036 16 , 0035 16 ) b7 b0 b9 b8 (address 0036 16 ) b7 b0 b7 b6 b5 b4 b3 b2 b1 b0 (address 0035 16 ) note: high-order 6-bit of address 0036 16 returns ?0? when read. n o t u s e d ( r e t u r n s ? 0 ? w h e n r e a d ) a / d c o n v e r s i o n c o m p l e t i o n b i t 0 : c o n v e r s i o n i n p r o g r e s s 1 : c o n v e r s i o n c o m p l e t e d b 7 b 0 a n a l o g i n p u t p i n s e l e c t i o n b i t s 0 0 0 : p 2 0 / a n 0 0 0 1 : p 2 1 / a n 1 0 1 0 : p 2 2 / a n 2 0 1 1 : p 2 3 / a n 3 1 0 0 : p 2 4 / a n 4 1 0 1 : p 2 5 / a n 5 1 1 0 : p 2 6 / a n 6 1 1 1 : p 2 7 / a n 7 n o t e s 1 : a / d c o n v e r s i o n c l o c k = f ( x i n ) c a n b e u s e d o n l y w h e n c e r a m i c o s c i l l a t i o n o r o n - c h i p o s c i l l a t o r i s u s e d . s e l e c t f ( x i n ) / 2 w h e n r c o s c i l l a t i o n i s u s e d . a / d c o n t r o l r e g i s t e r ( a d c o n : a d d r e s s 0 0 3 4 1 6 , i n i t i a l v a l u e : 1 0 1 6 ) a / d c o n v e r s i o n c l o c k s e l e c t i o n b i t ( n o t e 1 ) 0 : f ( x i n ) / 2 1 : f ( x i n )
rej03b0156-0122 rev.1.22 mar 31, 2009 page 51 of 94 7547 group fig. 63 block diagram of a/d converter a/d control register (address 0034 16 ) channel selector a/d control circuit resistor ladder v ref comparator a/d interrupt request b7 b0 data bus 3 10 p2 0 /an 0 p2 1 /an 1 p2 2 /an 2 p2 3 /an 3 p2 4 /an 4 p2 5 /an 5 p2 6 /an 6 p2 7 /an 7 a/d conversion register (low-order) (address 0036 16 ) (address 0035 16 ) a/d conversion register (high-order) v ss f(x in ) f(x in )/2
rej03b0156-0122 rev.1.22 mar 31, 2009 page 52 of 94 7547 group w atchdog timer the watchdog timer gives a means for returning to a reset status when the program fails to run on its normal loop due to a runaway. the watchdog timer consists of an 8-bit watchdog timer h and an 8-bit watchdog timer l, being a 16-bit counter. standard operation of watchdog timer (1) start of watchdog timer the watchdog timer starts operating by setting value of the func- tion set rom data 2 (fsrom2: address 0ffa 16 ) or writing to the watchdog timer control register (wdtcon: address 0039 16 ). set ?0? to the watchdog timer start selection bit (bit 1 of fsrom2) when operation starts by setting value of fsrom2. in this case, the watchdog timer starts operating after releasing reset. w rite an arbitrary value to wdtcon when fsrom2 is set to be invalid and operation starts by program. operation by program can start even when ?1? (stop state after releasing reset) is set to the watchdog timer start selection bit. (2) operation of watchdog timer w atchdog timer l is set to ?ff 16 ?and watchdog timer h is set to ?ff 16 ? by reset or writing an arbitrary value to wdtcon. when the watchdog timer starts operating, the selected clock is counted and internal reset occurs by the watchdog timer h under- flow. accordingly, write to wdtcon before underflow by program. when wdtcon is read, the values of the stp instruction function selection bit, watchdog timer h count source selection bit and the high-order 6 bits of the watchdog timer h are read. (3) count source clock of watchdog timer the count source clock of the watchdog timer can be selected by the watchdog timer source clock selection bit (bit 0 of fsrom2). if ?0? is set to the watchdog timer source clock selection bit, the count source clock of the watchdog timer always is the on-chip os- cillator output/16. it changes by setting the clock division ratio selection bits (bit 7 and bit 6 of the cpu mode register) when ?1? is set to the watch- dog timer source clock selection bit or fsrom2 is set to be invalid. when a double-speed mode, a high-speed mode, and a middle- speed mode are selected by the clock division ratio selection bits, the count source clock of the watchdog timer becomes f(x in )/16. when the supply from on-chip oscillator is selected, it becomes the on-chip oscillator output/16. (4) watchdog timer h count source selection bit the count source of watchdog timer h can be selected by fsrom2 or program. when ?0? is set to watchdog timer h count source selection bit (bit 2 of fsrom2), the watchdog timer l underflow signal is selected as the count source of watchdog timer h and the detection time is 131.072 ms at f(x in ) = 8 mhz. when ?1? is set to this bit, the clock selected as the count source of watchdog timer l is input to watchdog timer h. in this case, the detection time is 512 s at f(x in ) =8 mhz. when fsrom2 is set to be invalid, the count source of watchdog timer can be set by watchdog timer h count source selection bit (bit 7 of wdtcon). when ?0? is set to this bit, the watchdog timer l underflow signal is selected as the count source of watchdog timer h. when ?1? is set to this bit, the clock selected as the count source of watchdog timer l is input to watchdog timer h. this bit is cleared to ?0? after reset. (5) stp instruction function selection bit the function of the stp instruction can be selected by fsrom2 or program. when ?0? is set to the stp instruction function selection bit (bit 3 of fsrom2), system enters into the stop mode at the stp instruc- tion execution. when ?1? is set to this bit, internal reset occurs at the stp instruc- tion execution. when the function of the stp instruction is set by fsrom2, it cannot be changed by program. when setting value of fsrom2 is invalid, the function of the stp instruction can be set by the stp instruction function selection bit (bit 6 of wdtcon). when ?0? is set to this bit, system enters into the stop mode at the stp instruction execution. when ?1? is set to this bit, internal reset occurs at the stp instruc- tion execution. once this bit is set to ?1?, it cannot be changed to ?0? by program. this bit is cleared to ?0? after reset. notes on watchdog timer 1. the watchdog timer is operating during the wait mode. write data to the watchdog timer control register to prevent timer un- derflow. 2. the watchdog timer stops during the stop mode. however, the watchdog timer is running during the oscillation stabilizing time after the stp instruction is released. in order to avoid the un- derflow of the watchdog timer, the watchdog timer count source selection bit (bit 7 of watchdog timer control register (address 39 16 )) before executing the stp instruction. 3. the stp instruction function selection bit (bit 6 of watchdog timer control register (address 39 16 )) can be rewritten only once after releasing reset. after rewriting it is disable to write any data to this bit.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 53 of 94 7547 group fig. 64 block diagram of watchdog timer fig. 65 structure of watchdog timer control register watchdog timer h (read only for high-order 6-bit) watchdog timer h count source selection bit ( note 1, note 4 ) 0 : watchdog timer l underflow 1 : on-chip oscillator/16 or f(x in )/16 b7 b0 watchdog timer control register ( note 1 ) (wdtcon: address 0039 16 , initial value: 3f 16 ) stp instruction function selection bit ( note 1, note 3 ) 0 : system enters into the stop mode  at the stp instruction execution 1 : internal reset occurs at the stp instruction execution notes 1: when the setting by the function set rom data 2 (fsrom2) is performed, the initial value of cpum is changed  after releasing reset since bits 6 and 7 of wdtcon are fixed.  2: the setting values of fsrom2 become valid by setting ?0? to bit 0 of function set rom data 0 (fsrom0).  the setting values of fsrom2 are invalid by setting ?1? to this bit. this cannot be controlled by fsrom2. this bit function can be set by setting bit 3 of fsrom2. bit 3 of fsrom2 = 0: bit 6 of wdtcon is fixed to ?0?. bit 3 of fsrom2 = 1: bit 6 of wdtcon is fixed to ?1?. control by function set rom data 2 (fsrom2: address ffda 16 ) ( note 2 ) the initial value of this bit is changed by setting bit 2 of fsrom2. bit 2 of fsrom2 = 0: initial value of bit 7 of wdtcon is changed to ?0?. bit 2 of fsrom2 = 1: initial value of bit 7 of wdtcon is changed to ?1?. the following setting can be available by setting bit 0 of fsrom2. (this setting cannot be set by wdtcon) bit 0 of fsrom2 = 0: the source clock of watchdog timer is always  bit 0 of fsrom2 = 1: the source clock of watchdog timer is the  on-chip oscillator output/16 of f(x in )/16.  3 :the setting value of this bit can be fixed after releasing reset by fsrom2, and then, the setting value cannot be changed by p rogram.  also, when the setting by program is performed, this bit can be rewritten only once after releasing reset.  after rewriting it is disable to write any data to this bit.  4 : when fsrom2 is used to select the watchdo g timer h count source , the initial value of this bit is chan g ed after releasin g reset.  the on-chip oscillator output/16. ?0? ?1? 1/16 reset pin input wdtcon: watchdog timer control register fsrom2: function set rom data 2 xin clock on-chip oscillator cpum: cpu mode register data bus reset circuit watchdog timer h (8) write "ff16" to wdtcon internal reset watchdog timer l (8) stp instruction write ?ff16? to wdtcon watchdog timer h count source selection bit (bit 2 of fsrom2) or bit 7 of wdtcon source clock selection (auto-switch depending on setting of cpum) stp instruction function selection bit (bit 3 of fsrom2) bit 6 of wdtcon on-chip oscillator output can be fixed by bit 0 of fsrom2 count start (watchdotm timer start selection bit (bit 1 of fsrom2)) or writing arbitrary value to wdtcon
rej03b0156-0122 rev.1.22 mar 31, 2009 page 54 of 94 7547 group fig. 66 operation waveform diagram of power-on reset circuit fig. 67 operation waveform diagram of low voltage detection circuit v cc (note ) 1ms or les s power-on reset released internal reset signal reset state note: keep the value of supply voltage to the minimum value or more of the recommended operating conditions. po circuit output wer-on reset v cc reset voltage (typ:1.90v) internal reset signal microcomputer starts operation by the built-in on-chip oscillator. internal reset signal sync ?? fffc fffd ad h ,ad l ??? ?? ad l ad h ?? ? address data reset address from the vector table on-chip oscillator clock ring internal cpu clock reset 9 to 16 cycles of internal cpu clock fig. 68 timing diagram at reset power-on reset circuit reset can be automatically performed at power on (power-on re- set) by the built-in power-on reset circuit. in order to use the power-on reset circuit effectively, the time for the supply voltage to rise from 0 v to 1.8 v must be set to 1 ms or less. ____________ when the built-in power-on reset circuit is used, pull-up the reset pin to v cc . low voltage detection circuit the built-in low voltage detection circuit is designed to detect a drop in voltage and to reset the microcomputer if the power source voltage drops below a set value (typ.1.90 v). the low voltage detection circuit is valid by setting ?1? to bit 1 of the function set rom data 0. also, when ?1? is set to bit 3 of the function set rom data 0, the low voltage detection circuit can be valid even in the stop mode. the low voltage detection circuit is stopped in the stop mode by setting ?0? to this bit, so that the power dissipation is reduced.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 55 of 94 7547 group fig. 69 internal status of microcomputer at reset prescaler 1 (pre1) timer 1 (t1) timer x mode register (txm) prescaler x (prex) timer x (tx) timer count source set register (tcss) serial i/o2 control register (sio2sts) a/d control register (adcon) misrg watchdog timer control register (wdtcon) (note 3) interrupt edge selection register (intedge) cpu mode register (cpum) (note 3) interrupt request register 1 (ireq1) interrupt control register 1 (icon1) (18) (19) (20) (21) (22) (23) (29) (30) (31) (32) (33) (34) ff 16 01 16 00 16 00 16 ff 16 ff 16 00 16 0028 16 0029 16 002a 16 002b 16 002c 16 002d 16 002f 16 0030 16 0034 16 0037 16 0039 16 003a 16 003b 16 003c 16 003e 16 0011 1111 00 16 00 16 00 16 1000 0000 contents of address fffc 16 notes 1: x : undefined 2: the content of other registers is undefined when the microcomputer is reset.  the initial values must be surely set before you use it. 3: when the setting by the function set rom data 2 (fsrom2) is performed,  the initial values of these registers at reset are changed. contents of address fffd 16 xxxx x1xx port p0 direction register (p0d) port p1 direction register (p1d) port p2 direction register (p2d) port p3 direction register (p3d) pull-up control register (pull) (1) (2) (3) (4) (13) register contents 00 16 00 16 00 16 00 16 0001 16 0003 16 0005 16 0007 16 0016 16 serial i/o1 control register (sio1con) uart1 control register (uart1con) (16) (17) serial i/o1 status register (sio1sts) (15) 001a 16 001b 16 00 16 1110 0000 0019 16 1000 0000 xxx 0 0000 address port p1p3 control register (p1p3c) (14) 0017 16 00 16 timer a, b mode register (tabm) capture/compare port register (ccpr) timer source selection register (tmsr) 00 16 00 16 00 16 001d 16 001e 16 001f 16 00 16 00 16 00 16 0020 16 0021 16 0022 16 00 16 0023 16 (35) (36) (37) (38) (39) (41) (42) (43) (44) (45) serial i/o2 register (sio2con) 0031 16 interrupt request register 2 (ireq2) 003d 16 00 16 interrupt control register 2 (icon2) 003f 16 00 16 (46) (47) (48) (49) uart2 control register (uart2con) on-chip oscillation division ratio selection register (rodr) 00 16 0038 16 (40) 0000 0010 0001 0000 1110 0000 1000 0000 capture mode register (capm) compare output mode register (cmom) (25) (26) (27) (28) ff 16 0024 16 ff 16 ff 16 0025 16 0026 16 0027 16 ff 16 timer a (low-order) (tal) timer a (high-order) (tah) timer b (low-order) (tbl) timer b (high-order) (tbh) (24) capture/compare status register (ccsr) compare interrupt source register (cisr) (8) (9) (10) (11) (12) interrupt source discrimination register (intdis) compare register (low-order) (cmpl) (6) (7) interrupt source set register (intset) (5) 000b 16 0010 16 00 16 000a 16 compare register (high-order) (cmph) capture/compare register r/w pointer (ccrp) capture software trigger register (cstr) 00 16 00 16 00 16 0011 16 0012 16 0013 16 00 16 00 16 0014 16 0015 16 compare register re-load register (cmpr) port p0p3 drive capacity control register (dccr) 00 16 00 16 processor status register program counter (ps) (pc h ) (pc l ) ff 16 ff 16 (50) watchdog timer h (51) watchdog timer l
rej03b0156-0122 rev.1.22 mar 31, 2009 page 56 of 94 7547 group fig. 71 external circuit of ceramic resonator fig. 72 external circuit of rc oscillation fig. 73 external clock input circuit fig. 70 processing of x in and x out pins at on-chip oscillator operation clock generating circuit an oscillation circuit can be formed by connecting a resonator be- tween x in and x out , and an rc oscillation circuit can be formed by connecting a resistor and a capacitor. use the circuit constants in accordance with the resonator manufacturer's recommended values. no external resistor is needed between x in and x out since a feed-back resistor exists on-chip. (an external feed-back resistor may be needed depending on conditions.) (1) on-chip oscillator operation when the mcu operates by the on-chip oscillator for the main clock, connect x in pin to v cc through a resistor and leave x out pin open. the clock frequency of the on-chip oscillator depends on the sup- ply voltage and the operation temperature range. be careful that variable frequencies when designing application products. (2) ceramic resonator when the ceramic resonator is used for the main clock, connect the ceramic resonator and the external circuit to pins x in and x out at the shortest distance. a feedback resistor is built in be- tween pins x in and x out . (3) rc oscillation when the rc oscillation is used for the main clock, connect the x in pin and x out pin to the external circuit of resistor r and the capacitor c at the shortest distance. the frequency is affected by a capacitor, a resistor and a micro- computer. so, set the constants within the range of the frequency limits. (4) external clock when the external signal clock is used for the main clock, connect the x in pin to the clock source and leave x out pin open. select ?0? (ceramic oscillation) to oscillation mode selection bit of cpu mode register (003b 16 ). insert a damping resistor if required. the resistance will vary depending on the oscillator and the oscillation drive capacity setting. use the value recommended by the maker of the oscillator. also, if the oscillator manufacturer?s data sheet specifies that a feedback resistor be added external to the chip though a feedback resistor exists on-chip, insert a feed- back resistor between x in and x out following the instruction. note: connect the external circuit of resistor r and the capacitor c at the shortest distance. the frequency is af- fected by a capacitor, a resistor and a micro- computer. so, set the constants within the range of the frequency limits. note: the clock frequency of the on-chip oscillator depends on the supply voltage and the operation temperature range. be careful that variable frequencies and obtain the sufficient margin. note: x in x out external oscillation circuit v c c v ss o p e n m37547 x i n x o u t c r m37547 x in c out c i n x out m37547 rd x i n x o u t m37547 o p e n r
rej03b0156-0122 rev.1.22 mar 31, 2009 page 57 of 94 7547 group (1) oscillation control ? stop mode when the stp instruction is executed, the internal clock stops at an ?h? level and the x in oscillator stops. at this time, timer 1 is set to ?01 16 ? and prescaler 1 is set to ?ff 16 ? when the oscillation sta- bilization time set bit after release of the stp instruction is ?0?. on the other hand, timer 1 and prescaler 1 are not set when the above bit is ?1?. accordingly, set the wait time fit for the oscillation stabilization time of the oscillator to be used. f(x in )/16 is forcibly connected to the input of prescaler 1. when an external interrupt is accepted, oscillation is restarted but the internal clock remains at ?h? until timer 1 underflows. as soon as timer 1 underflows, the internal clock is supplied. this is because when a ceramic oscil- lator is used, some time is required until a start of oscillation. in case oscillation is restarted by reset, no wait time is generated. so apply an ?l? level to the reset pin while oscillation becomes stable, or set the wait time by on-chip oscillator operation after system is released from reset until the oscillation is stabled. ? wait mode if the wit instruction is executed, the internal clock stops at an ?h? level, but the oscillator does not stop. the internal clock re- starts if a reset occurs or when an interrupt is received. since the oscillator does not stop, normal operation can be started immedi- ately after the clock is restarted. to ensure that interrupts will be received to release the stp or wit state, interrupt enable bits must be set to ?1? before the stp or wit instruction is executed. fig. 74 structure of cpu mode register oscillation mode selection bit ( note 1 , note 4 ) 0 : ceramic oscillation 1 : rc oscillation cpu mode register (note 1) (cpum: address 003b 16 , initial value: 80 16 ) stack page selection bit 0 : 0 page 1 : 1 page clock division ratio selection bits b7 b6 0 0 : f( ) = f(x in )/2 (high-speed mode) 0 1 : f( ) = f(x in )/8 (middle-speed mode) 1 0 : applied from on-chip oscillator 1 1 : f( ) = f(x in )/1 (double-speed mode)( note 5 ) on-chip oscillator oscillation control bit ( note 3 ) 0 : on-chip oscillator oscillation enabled 1 : on-chip oscillator oscillation stop x in oscillation control bit 0 : ceramic or rc oscillation enabled 1 : ceramic or rc oscillation stop processor mode bits b1 b0 0 0 single-chip mode 0 1 not available 1 0 not available 1 1 not available note1:  when the setting by the function set rom data 2 (fsrom2) is performed, the initial value of cpum is changed  after releasing reset since bit 5 of cpum is fixed.  2: the setting values of fsrom2 become valid by setting ?0? to bit 0 of function set rom data 0 (fsrom0).  the setting values of fsrom2 are invalid by setting ?1? to this bit.  (in order that fsrom2 is invalid, write to cpum after releasing reset.)  3 :when bit 4 of fsrom2 is set to ?0?, the operation of on-chip oscillator cannot be stopped.  since the on-chip oscillator is not stopped also in the stop mode, the dissipation current in the stop mode is increased.  4 :the setting value of bit 5 of cpum can be fixed after releasing reset by setting value of bit 5 of fsrom2.  also, when the setting of fsrom2 is invalid, this bit can be rewritten only once after releasing reset.  after rewriting it is disable to write any data to this bit.  this bit is initialized by reset, and then, rewriting it is enabled.  5 :this setting can be used only at ceramic oscillation. do not use this at rc oscillation. b7 b0 control by function set rom data 2 (fsrom2: address ffda 16 ) ( note 2 ) this bit function can be set by setting bit 5 of fsrom2. ( note 4 ) bit 5 of fsrom2 = 0: bit 5 of cpum is fixed to ?0?. bit 5 of fsrom2 = 1: bit 5 of cpum is ?0? or ?1?. this cannot be controlled by fsrom2. this cannot be controlled by fsrom2. this bit function can be set by setting bit 4 of fsrom2. ( note 3 ) bit 4 of fsrom2 = 0: bit 3 of cpum is fixed to ?0?. bit 4 of fsrom2 = 1: bit 3 of cpum is ?0? or ?1?. this cannot be controlled by fsrom2. this cannot be controlled by fsrom2. notes on clock generating circuit for use with the oscillation stabilization set bit after release of the stp instruction set to ?1?, set values in timer 1 and prescaler 1 af- ter fully appreciating the oscillation stabilization time of the oscillator to be used. ? switch of ceramic and rc oscillations after releasing reset the operation starts by starting an on-chip os- cillator. then, a ceramic oscillation or an rc oscillation is selected by setting bit 5 of the cpu mode register. ? double-speed mode when a ceramic oscillation is selected, a double-speed mode can be used. do not use it when an rc oscillation is selected. ? cpu mode register bits 5, 1 and 0 of cpu mode register are used to select oscillation mode and to control operation modes of the microcomputer. in or- der to prevent the dead-lock by error-writing (ex. program run-away), these bits can be rewritten only once after releasing re- set. after rewriting it is disable to write any data to the bit. (the emulator mcu ?m37542rss? is excluded.) also, when the read-modify-write instructions (seb, clb) are ex- ecuted to bits 2 to 4, 6 and 7, bits 5, 1 and 0 are locked.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 58 of 94 7547 group on-chip oscillation division ratio at on-chip oscillator mode, division ratio of on-chip oscillator for cpu clock is selected by setting value of on-chip oscillation divi- sion ratio selection register. the division ratio of on-chip oscillation for cpu clock is selected from among 1/1, 1/2, 1/8, 1/128. the op- eration clock for the peripheral function block is not changed by setting value of this register. notes on on-chip oscillation division ratio ? when system is released from reset, r osc /8 (on-chip oscillator middle-speed mode) is selected for cpu clock. ? when state transition from the ceramic or rc oscillation to on- chip oscillator, r osc /8 (on-chip oscillator middle-speed mode) is selected for cpu clock. ? when the mcu operates by on-chip oscillator for the main clock without external oscillation circuit, connect x in pin to v cc through a resistor and leave x out pin open. set ?10010x00 2 ? (x = 0 or 1) to cpum. fig. 75 structure of on-chip oscillation division ratio selection register on-chip oscillation division ratio selection register (rodr: address 0037 16 , initial value: 02 16 ) on-chip oscillator division ratio b1 b0 0  0: on-chip oscillator double-speed mode (r osc /1) 0  1: on-chip oscillator high-speed mode (r osc /2) 1  0: on-chip oscillator middle-speed mode (r osc /8) 1  1: on-chip oscillator low-speed mode (r osc /128) not used (returns ?0? when read) b7 b0 ? clock division ratio, x in oscillation control, on-chip oscillator control the state transition shown in fig. 78 can be performed by setting the clock division ratio selection bits (bits 7 and 6), x in oscillation control bit (bit 4), on-chip oscillator oscillation control bit (bit 3) of cpu mode register. be careful of notes on use in fig. 78. ? count source (timer 1, timer a, timer b, timer x, serial i/o, serial i/o2, a/d converter, watchdog timer) the count sources of these functions are af fected by the clock divi- sion selection bit of the cpu mode register. the f(x in ) clock is supplied to the watchdog timer when selecting f(x in ) as the cpu clock. the on-chip oscillator output is supplied to these functions when se- lecting the on-chip oscillator output as the cpu clock. however, the watchdog timer is also affected by the function set rom.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 59 of 94 7547 group fig. 76 block diagram of internal clock generating circuit (for ceramic resonator) fig. 77 block diagram of internal clock generating circuit (for rc oscillation) s r q s r q 1/2 r s q (note) 1/4 1/2 wit instruction stp instruction timing (internal clock) stp instruction interrupt request reset interrupt disable flag l high-speed mode middle-speed mode prescaler 1 timer 1 clock division ratio selection bits double-speed mode on-chip oscillator mode on-chip oscillator x out x in 1/16 clock division ratio selection bits middle-, high-, double-speed mode on-chip oscillator mode 1/4 1/2 on-chip oscillator division ratio selection bits r osc /128 r osc /8 r osc /2 r osc /1 reset although a feed-back resistor exists on-chip, an external feed-back resistor may be needed depending on conditions. note: s r q s r q 1/2 r s q 1/4 1/2 wit instruction stp instruction timing (internal clock) stp instruction interru p t re q uest reset interrupt disable flag l high-speed mode middle-speed mode prescaler 1 timer 1 clock division ratio selection bits double-speed mode ring x out x in delay clock division ratio selection bits middle-, high-, double-speed mode on-chip oscillator mode reset on-chip oscillator mode on-chip oscillator division ratio selection bits on-chip oscillator 1/16 1/4 1/2 r osc /128 r osc /8 r osc /2 r osc /1
rej03b0156-0122 rev.1.22 mar 31, 2009 page 60 of 94 7547 group fig. 78 state transition stp mode f(x in ) oscillation: stop on-chip oscillator: stop w ait mode 1 w ait mode 2 w ait mode 3 w ait mode 3? operation clock source: on-chip oscillator (note 2) operation clock source: f(x in ) (note 1) notes on switch of clock (1) in operation clock = f(x in ), the following can be selected for the cpu clock division ratio. f(x in )/2 (high-speed mode) f(x in )/8 (middle-speed mode) f(x in ) (double-speed mode, only at a ceramic oscillation) (2) in operation clock = on-chip oscillator, the following can be selected for the cpu clock division ratio. r osc /1 (on-chip oscillator double-speed mode) r osc /2 (on-chip oscillator high-speed mode) r osc /8 (on-chip oscillator middle-speed mode) r osc /128 (on-chip oscillator low-speed mode) (3) after system is released from reset, and state transition of state 2 state 3 and state transition of state 2? state 3?, r osc /8 (on-chip oscillator middle-speed mode) is selected for cpu clock. (4) executing the state transition state 3 to 2 or state 3? to 2? after stabilizing x in oscillation. (5) when the state 2 state 3 state 4 is performed, execute the nop instruction as shown below according to the division ratio of cpu clock. 1. cpum 76 = 10 2 (state 2 state 3) 2. nop instruction t ransition from double-speed mode: nop ? 3 t ransition from high-speed mode: nop ? 1 t ransition from middle-speed mode: nop ? 0 3. cpu 4 = 1 2 (state 3 state 4) (6) when the state 3 state 2 state 1 is performed, execute the nop instruction as shown below according to the division ratio of cpu clock. 1. cpum 76 = 00 2 or 01 2 or 11 2 (state 3 state 2) 2. nop instruction t ransition from on-chip oscillator double-speed mode: nop ? 4 t ransition from on-chip oscillator high-speed mode: nop ? 2 t ransition from on-chip oscillator middle-speed mode: nop ? 0 t ransition from on-chip oscillator low-speed mode: nop ? 0 3. cpum 3 = 1 2 (state 2 state 1) w ait mode 4 state 4 reset state f(x in ) oscillation: enabled on-chip oscillator: enabled state 3 state 3? w ait mode 2? state 2? state 2 state 1 interrupt stp instruction interrupt wit instruction interrupt cpum 3 =0 2 cpum 3 =1 2 cpum 76 =10 2 ( note 3 ) cpum 76 =00 2 01 2 11 2 ( note 4 ) cpum 76 =10 2 ( note 3 ) cpum 76 =00 2 01 2 11 2 misrg 1 =1 2 misrg 1 =0 2 misrg 1 =1 2 ( note 4 ) misrg 1 =0 2 reset released ( note 3 ) cpum 4 =0 2 cpum 4 =1 2 interrupt wit instruction wit instruction interrupt wit instruction interrupt wit instruction interrupt wit instruction stp instruction stp instruction stp instruction interrupt interrupt interrupt f(x in ) oscillation: enabled on-chip oscillator: stop f(x in ) oscillation: enabled on-chip oscillator: enabled f(x in ) oscillation: enabled on-chip oscillator: enabled f(x in ) oscillation: enabled on-chip oscillator: enabled f(x in ) oscillation: enabled on-chip oscillator: enabled oscillation stop detection circuit valid f(x in ) oscillation: stop on-chip oscillator: enabled
rej03b0156-0122 rev.1.22 mar 31, 2009 page 61 of 94 7547 group fig. 79 structure of misrg oscillation stop detection circuit the oscillation stop detection circuit is used for reset occurrence when a ceramic resonator or rc oscillation circuit stops by dis- connection. to use this circuit, set an on-chip oscillator to be in active. the oscillation stop detection circuit is in active to set ?1? to the ceramic or rc oscillation stop detection function active bit. when the oscillation stop detection circuit is in active, ceramic or rc os- cillation is watched by the on-chip oscillator. when stop of ceramic or rc oscillation is detected, the oscillation stop detection status bit is set to ?1?. while ?1? is set to the oscillation stop reset bit, in- ternal reset occurs when oscillation stop is detected. the external reset and the oscillation stop reset can be discrimi- nated by reading the oscillation stop detection status bit. the oscillation stop detection status bit retains ?1?, not initialized, when the oscillation stop reset occurs. the oscillation stop detec- tion status bit is initialized to ?0? when the external reset occurs. accordingly, reset by oscillation stop can be confirmed by using this flag. notes on oscillation stop detection circuit ? do not execute the transition to ?state 2?a? shown in fig. 80 because in this ?state 2?a?, mcu is stopped without reset even when x in oscillation is stopped. ? ceramic or rc oscillation stop detection function active bit is not cleared by the oscillation stop internal reset. accordingly, the oscillation stop detection circuit is in active when system is re- leased from internal reset cause of oscillation stop detection. ? oscillation stop detection status bit is initialized by the following operation. (1) external reset (2) write ?0? data to the ceramic or rc oscillation stop detection function active bit. ? the oscillation stop detection circuit is not included in the emu- lator mcu ?m37542rss?. misrg(address 0038 16 , initial value: 00 16 ) b7 b0 oscillation stabilization time set bit after release of the stp instruction 0: set ?01 16 ? in timer1, and ?ff 16 ? in prescaler 1 automatically 1: not set automatically reserved bits ( d o n ot wri te ?1? to t h ese b i ts) not used (return ?0? when read) oscillation stop detection status bit 0: oscillation stop not detected 1: oscillation stop detected oscillation stop reset bit 0: oscillation stop reset disabled 1: oscillation stop reset enabled ceramic or rc oscillation stop detection function active bit 0: detection function inactive 1: detection function active
rej03b0156-0122 rev.1.22 mar 31, 2009 page 62 of 94 7547 group fig. 80 state transition 2 operation clock source: on-chip oscillator (note 2) operation clock source: f(x in ) (note 1) notes on switch of clock (1) in operation clock = f(x in ), the following can be selected for the cpu clock division ratio. f(x in )/2 (high-speed mode) f(x in )/8 (middle-speed mode) f(x in ) (double-speed mode, only at a ceramic oscillation) (2) in operation clock = on-chip oscillator, the following can be selected for the cpu clock division ratio. r osc /1 (on-chip oscillator double-speed mode) r osc /2 (on-chip oscillator high-speed mode) r osc /8 (on-chip oscillator middle-speed mode) r osc /128 (on-chip oscillator low-speed mode) (3) executing the state transition state 3 to 2 or state 3 to 3? after stabilizing x in oscillation. (4) after system is released from reset, and state transition of state 2 state 3 and state transition of state 2? state 3?, r osc /8 (on-chip oscillator middle-speed mode) is selected for cpu clock. (5) mcu cannot be returned by on-chip oscillator and its operation is stopped since internal reset does not occur at oscillati on stop detected. accordingly, do not execute the transition to state 2'a. (6) stp instruction cannot be used when oscillation stop detection circuit is in active. reset state 2 f(x in ) oscillation: enabled on-chip oscillator: enabled reset state 1 f(x in ) oscillation: enabled on-chip oscillator: enabled oscillation stop detection circuit is in active. (note 6) applied ?l? to reset pin (external reset) misrg 3 is cleared to ?0?. misrg 2 =1 2 misrg 2 =0 2 misrg 2 =1 2 misrg 2 =0 2 misrg 1 =1 2 misrg 1 =0 2 (misrg 3 is cleared to ?0?.) misrg 1 =1 2 ( note 3 ) misrg 1 =0 2 (misrg 3 is cleared to ?0?.) state 3 state 2 f(x in ) oscillation: enabled on-chip oscillator: enabled f(x in ) oscillation: enabled on-chip oscillator: enabled state 3? state 2? f(x in ) oscillation: enabled on-chip oscillator: enabled state 2?a (note 5) oscillation stop reset disabled when oscillation stop is detected; misrg 3 is set to ?1?. internal reset does not occur. prohibitive state m uc will be locked when c era m ic or r c oscillation is stopped. state 3?a oscillation stop reset disabled when oscillation stop is detected; misrg 3 is set to ?1?. internal reset does not occur. oscillation stop reset enabled when oscillation stop is detected; misrg 3 is set to ?1?. internal reset occurs. oscillation stop reset enabled when oscillation stop is detected; misrg 3 is set to ?1?. internal reset occurs. state 3?c release fro m internal reset misrg 3 is set to ?1?. oscillation status can be confir m ed b y readin g misrg 3 . f(x in ) oscillation: enabled on-chip oscillator: enabled state 3?b state 2?b cpum 76 =10 2 ( note 4 ) cpum 76 =00 2 01 2 11 2 ( note 3 ) cpum 76 =10 2 cpum 76 =00 2 01 2 11 2 cpum 76 =10 2 ( note 4 ) cpum 76 =00 2 01 2 11 2 reset released ( note 4 ) reset released ( note 4 ) oscillation stop is detected (internal reset)
rej03b0156-0122 rev.1.22 mar 31, 2009 page 63 of 94 7547 group fig. 81 assignment of function set rom area fig. 82 structure of function set rom data 0 function set rom invalid bit ( note 1 ) 0:  setting of bit 5 to bit 0 of function set  rom data 2 valid 1:  setting of bit 5 to bit 0 of function set  rom data 2 invalid b7 set ?0? to these bits. set ?0? to this bit certainly. low voltage detection circuit valid bit 0: low voltage detection circuit invalid 1: low voltage detection circuit valid low voltage detection circuit valid bit in the stop mode ( note 2 ) 0:low voltage detection circuit invalid  in the stop mode 1:low voltage detection circuit valid  in the stop mode set ?1? to this bit. function set rom data 0 (fsrom0: address ffd8 16 ) b0 1000 0 note 1 : when ?1? is set to this bit, the setting values of bit 5 to bit 0 of function  set rom data 2 become invalid, and these functions can be set by  program. (this bit does not affect on other bits than bit 5 to bit 0 of  function set rom data 2.)  2 : when the low voltage detection circuit is set to be valid in the stop  mode, the dissipation current in the stop mode is increased. renesas shipment test area renesas shipment test area renesas shipment test area renesas shipment test area function set rom data 0 function set rom data 2 function set rom data 1 rom code protect interrupt vector area addres ffd4 16 ffd5 16 ffd6 16 ffd7 16 ffd8 16 ffd9 16 ffda 16 ffdb 16 note: the random data are written into the renesas shipment test areas (address ffd4 16 to address ffd7 16 ). do not rewrite the data of these areas. when checksum is included in user program, avoid assigning it to these areas. fig. 84 structure of function set rom data 2 function set rom data 1 fsrom1 (ffd9 16 ) b7 b0 set ?0? to these bits certainly. 0000 0 00 0 watchdog timer start selection bit ( note 1 ) 0 : watchdog timer starts automatically after reset 1 : watchdog timer is inactive after reset b7 on-chip oscillator control bit ( note 1 ) 0 : stop of on-chip oscillator disabled 1 : stop of on-chip oscillator enabled watchdog timer source clock selection bit ( note 1 ) 0 : on-chip oscillator/16 1 : on-chip oscillator/16 or f(x in )/16 watchdog timer h count source selection bit ( note 1 ) 0 :watchdog timer l underflow 1 : count source of watchdog timer l (the clock selected by the watchdog timer source clock selection bit (bit 0)) stp instruction function selection bit ( note 1 ) 0 : system enters into the stop mode  at the stp instruction execution 1 : internal reset occurs at the stp instruction execution oscillation mode selection bit ( note 1 ) 0 : ceramic oscillation 1 : rc oscillation function set rom data 2 (fsrom2: address ffda 16 ) b0 00 note 1 : these functions can be active when ?0? is set to function set  rom valid bit ( bit 0 of function set rom data 0 ) . set ?0? to these bits certainly. fig. 83 structure of function set rom data 1 function set rom fig. 81 shows the assignment of function set rom area. the random data are written to the renesas shipment test areas (addresses ffd4 16 to address ffd7 16 ). do not rewrite the data of these areas. when the checksum is included in the user program, avoid as- signing it to these areas. the function set rom data 0 to 2 (addresses ffd8 16 to ffda 16 ) are used to set the peripheral function. data set to these areas become valid after releasing reset. the rom code protect to disable the reading of the built-in qzrom area is assigned to address ffdb 16 . [function set rom data] fsrom0, fsrom1, fsrom2 function set rom data 0 to 2 (addresses ffd8 16 to ffda 16 ) are used to set modes of peripheral functions. by setting values to these areas, the operation mode of each pe- ripheral function are set after releasing reset. refer to the descriptions of peripheral functions for the details of operation of peripheral functions. - cpu mode register - watchdog timer - low voltage detection circuit when ?1? is set to bit 0 of function set rom data 0 (address ffd8 16 ), the written values to bit 5 to bit 0 of function set rom data 2 (address ffda 16 ) can become invalid. when the values of bit 5 to bit 0 of function set rom data 2 (ad- dress ffda 16 ) are invalid, the operation mode of the peripheral functions can be set by setting the related registers. [rom code protect] by setting ?00 16 ? to rom code protect (address ffdb 16 ), reading of the built-in qzrom by the serial programmer is disabled.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 64 of 94 7547 group qzrom writing mode in the qzrom writing mode, the user rom area can be rewritten while the microcomputer is mounted on-board by using a serial programmer which is applicable for this microcomputer. t able 9 lists the pin description (qzrom writing mode) and fig. 85 show the pin connections. refer to fig. 86 and fig. 87 for example of a connection with a serial programmer. contact the manufacturer of your serial programmer for serial pro- grammer . refer to the user's manual of your serial programmer for details on how to use it. t able 9 pin description (qzrom writing mode) pin v cc , v ss ____________ reset x in x out v ref p0 0 ?p0 7 p1 3 ?p1 4 p2 0 ?p2 7 p3 0 ?p3 7 cnv ss p1 1 p1 2 p1 0 name power source reset input clock input clock output analog reference voltage i/o port v pp input esda input/output esclk input espgmb input i/o input input input output input i/o input i/o input input function ?apply 1.8 to 5.5v to v cc , and 0v to v ss . ____________ ?reset input pin for active ?l?. reset occurs when reset pin is hold at an ?l? level for 16 cycles or more of x in . ?set the same termination as the single-chip mode. ?input the reference voltage of a/d converter to v ref . ?input ?h? or ?l? level signal or leave the pin open. ?qzrom programmable power source pin. ?serial data i/o pin. ?serial clock input pin. ?read/program pulse input pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 65 of 94 7547 group fig. 85 pin connection diagram (m37547gxfp) 10 1 2 3 4 6 7 8 9 11 12 14 15 16 5 13 17 18 36 35 34 33 31 30 26 25 24 23 22 21 20 19 32 27 29 28 cnv ss x out x in v ss p0 4 (led 04 )/rxd 2 p3 0 (led 10 )/cap 1 vcc v ref p0 5 (led 05 )/txd 2 p1 0 /r x d 1 /cap 0 p2 6 /an 6 p2 7 /an 7 p1 1 /t x d 1 p1 2 /s clk1 p1 3 /s rdy1 p2 3 /an 3 p2 2 /an 2 p2 1 /an 1 p2 0 /an 0 p3 1 (led 11 )/cmp 2 p3 6 (led 16 )/int 1 p2 4 /an 4 p2 5 /an 5 p0 6 (led 06 )/s clk2 p0 7 (led 07 )/s rdy2 reset m37547gxfp p1 4 /cntr 0 p3 5 (led 15 ) p3 4 (led 14 ) p3 3 (led 13 )/int 1 p3 2 (led 12 )/cmp 3 p3 7 (led 17 )/int 0 p0 0 (led 00 )/cap 0 p0 1 (led 01 )/cmp 0 p0 2 (led 02 )/cmp 1 p0 3 (led 03 )/tx out package type: prsp0036ga-b (36p2r-d) esclk * v ss v cc v pp reset esda espgmb * : connect to oscillation circuit : qzrom pin
rej03b0156-0122 rev.1.22 mar 31, 2009 page 66 of 94 7547 group fig. 86 when using e8 programmer, connection example v cc cnv ss p1 1 (esda) p1 2 (esclk) p1 0 (espgmb) reset v ss 7547 group 4.7 k ? 4.7 k ? reset circuit * 1 1 2 3 4 5 6 8 10 12 14 7 9 11 13 v cc x in x out * 1: open-collector buffer note: for the programming circuit, the wiring capacity of each signal pin must not exceed 47 pf. set the same termination as the single-chip mode.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 67 of 94 7547 group fig. 87 when using programmer of suisei electronics system co., ltd, connection example v cc cnv ss p1 1 (esda) p1 2 (esclk) p1 0 (espgmb) reset v ss 4.7 k ? 4.7 k ? x in x out t_vdd t_vpp t_txd t_rxd t_sclk t_busy t_pgm/oe/md reset circuit t_reset gnd 7547 group n.c. note: for the programming circuit, the wiring capacity of each signal pin must not exceed 47 pf. set the same termination as the single-chip mode.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 68 of 94 7547 group notes on programming processor status register the contents of the processor status register (ps) after reset are undefined except for the interrupt disable flag i which is ?1?. after reset, initialize flags which affect program execution. in particular, it is essential to initialize the t flag and the d flag because of their effect on calculations. initialize these flags at beginning of the program. interrupts the contents of the interrupt request bit do not change even if the bbc or bbs instruction is executed immediately after they are changed by program because this instruction is executed for the previous contents. for executing the instruction for the changed contents, execute one instruction before executing the bbc or bbs instruction. decimal calculations ? for calculations in decimal notation, set the decimal mode flag d to ?1?, then execute the adc instruction or sbc instruction. in this case, execute sec instruction, clc instruction or cld in- struction after executing one instruction before the adc instruction or sbc instruction. ? in the decimal mode, the values of the n (negative), v (overflow) and z (zero) flags are invalid. ports ? the values of the port direction registers cannot be read. that is, it is impossible to use the lda instruction, memory opera- tion instruction when the t flag is ?1?, addressing mode using direction register values as qualifiers, and bit test instructions such as bbc and bbs. it is also impossible to use bit operation instructions such as clb and seb and read/modify/write instructions of direction registers for calculations such as ror. for setting direction registers, use the ldm instruction, sta in- struction, etc. a/d conversion do not execute the stp instruction during a/d conversion. instruction execution timing the instruction execution time can be obtained by multiplying the frequency of the internal clock by the number of cycles men- tioned in the machine-language instruction table. the frequency of the internal clock is the same as that of the x in in double-speed mode, twice the x in cycle in high-speed mode and 8 times the x in cycle in middle-speed mode. cpu mode register the oscillation mode selection bit and processor mode bits can be rewritten only once after releasing reset. however, after rewriting it is disable to write any value to the bit. (emulator mcu is ex- cluded.) when a ceramic oscillation is selected, a double-speed mode of the clock division ratio selection bits can be used. do not use it when an rc oscillation is selected. state transition do not stop the clock selected as the operation clock because of setting of cm3, 4. notes on hardware handling of power source pin in order to avoid a latch-up occurrence, connect a capacitor suit- able for high frequencies as bypass capacitor between power source pin (vcc pin) and gnd pin (vss pin). besides, connect the capacitor to as close as possible. for bypass capacitor which should not be located too far from the pins to be connected, a ce- ramic capacitor of 0.01 f to 0.1 f is recommended.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 69 of 94 7547 group notes on use countermeasures against noise 1. shortest wiring length (1) package select the smallest possible package to make the total wiring length short. the wiring length depends on a microcomputer package. use of a small package, for example qfp and not dip, makes the total wir- ing length short to reduce influence of noise. (3) wiring for clock input/output pins ? make the length of wiring which is connected to clock i/o pins as short as possible. ? make the length of wiring (within 20 mm) across the grounding lead of a capacitor which is connected to an oscillator and the v ss pin of a microcomputer as short as possible. ? separate the v ss pattern only for oscillation from other v ss pat- terns. if noise enters clock i/o pins, clock waveforms may be deformed. this may cause a program failure or program runaway. also, if a potential difference is caused by the noise between the v ss level of a microcomputer and the v ss level of an oscillator, the correct clock will not be input in the microcomputer. (2) wiring for reset pin make the length of wiring which is connected to the reset pin as short as possible. especially, connect a capacitor across the reset pin and the v ss pin with the shortest possible wiring (within 20 mm). the width of a pulse input into the reset pin is determined by the timing necessary conditions. if noise having a shorter pulse width than the standard is input to the reset pin, the reset is released before the internal state of the microcomputer is completely initial- ized. this may cause a program runaway. fig. 90 wiring for clock i/o pins fig. 88 selection of packages dip sdip sop qfp fig. 89 wiring for the reset pin reset reset circuit noise v ss v ss reset circuit v ss reset v ss n.g. o.k. noise x in x out v ss x in x out v ss n.g. o.k. (4) wiring to cnv ss pin connect cnv ss pin to a gnd pattern at the shortest distance. the gnd pattern is required to be as close as possible to the gnd supplied to v ss . in order to improve the noise reduction, to connect a 5 k ? resistor serially to the cnv ss pin - gnd line may be valid. as well as the above-mentioned, in this case, connect to a gnd pattern at the shortest distance. the gnd pattern is required to be as close as possible to the gnd supplied to v ss . the cnv ss pin of the qzrom is the power source input pin for the built-in qzrom. when programming in the built-in qzrom, the impedance of the cnv ss pin is low to allow the electric current for writing flow into the qzrom. because of this, noise can enter easily. if noise enters the cnv ss pin, abnormal instruction codes or data are read from the built-in qzrom, which may cause a pro- gram runaway. fig. 91 wiring for the cnv ss pin of the qzprom about 5k ? v ss the shortest the shortes t cnv ss (note) (note) note: this indicates pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 70 of 94 7547 group fig. 92 bypass capacitor across the v ss line and the v cc line 2. connection of bypass capacitor across v ss line and v cc line connect an approximately 0.1 f bypass capacitor across the v ss line and the v cc line as follows: ? connect a bypass capacitor across the v ss pin and the v cc pin at equal length. ? connect a bypass capacitor across the v ss pin and the v cc pin with the shortest possible wiring. ? use lines with a larger diameter than other signal lines for v ss line and v cc line. ? connect the power source wiring via a bypass capacitor to the v ss pin and the v cc pin. v ss v cc       v ss v cc             n.g. o.k. 3. wiring to analog input pins ? connect an approximately 100 ? to 1 k ? resistor to an analog signal line which is connected to an analog input pin in series. besides, connect the resistor to the microcomputer as close as possible. ? connect an approximately 1000 pf capacitor across the vss pin and the analog input pin. besides, connect the capacitor to the vss pin as close as possible. also, connect the capacitor across the analog input pin and the vss pin at equal length. signals which is input in an analog input pin (such as an a/d con- verter/comparator input pin) are usually output signals from sensor. the sensor which detects a change of event is installed far from the printed circuit board with a microcomputer, the wiring to an analog input pin is longer necessarily. this long wiring func- tions as an antenna which feeds noise into the microcomputer, which causes noise to an analog input pin. fig. 93 analog signal line and a resistor and a capacitor analog input pin v ss noise thermistor microcomputer n.g. o.k. (note) note : the resistor is used for dividing resistance with a thermistor. ? the analog input pin is connected to the capacitor of a voltage comparator. accordingly, sufficient accuracy may not be ob- tained by the charge/discharge current at the time of a/d conversion when the analog signal source of high-impedance is connected to an analog input pin. in order to obtain the a/d con- version result stabilized more, please lower the impedance of an analog signal source, or add the smoothing capacitor to an ana- log input pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 71 of 94 7547 group 4. oscillator concerns t ake care to prevent an oscillator that generates clocks for a mi- crocomputer operation from being affected by other signals. (1) keeping oscillator away from large current signal lines install a microcomputer (and especially an oscillator) as far as possible from signal lines where a current larger than the toler- ance of current value flows. in the system using a microcomputer, there are signal lines for controlling motors, leds, and thermal heads or others. when a large current flows through those signal lines, strong noise occurs because of mutual inductance. (2) installing oscillator away from signal lines where potential lev- els change frequently install an oscillator and a connecting pattern of an oscillator away from signal lines where potential levels change frequently. also, do not cross such signal lines over the clock lines or the signal lines which are sensitive to noise. signal lines where potential levels change frequently (such as the cntr pin signal line) may affect other lines at signal rising edge or falling edge. if such lines cross over a clock line, clock wave- forms may be deformed, which causes a microcomputer failure or a program runaway. ? keeping oscillator away from large current signal lines ? installing oscillator away from signal lines where potential lev- els change frequently fig. 94 wiring for a large current signal line/writing of signal lines where potential levels change frequently x in x o u t v ss m microcomputer mutual inductance l a r g e c u r r e n t g n d x in x o u t v s s c n t r do no t cross n . g . (3) oscillator protection using vss pattern as for a two-sided printed circuit board, print a vss pattern on the underside (soldering side) of the position (on the component side) where an oscillator is mounted. connect the vss pattern to the microcomputer vss pin with the shortest possible wiring. besides, separate this vss pattern from other vss patterns. fig. 95 vss pattern on the underside of an oscillator                x in x out v ss an example of v ss patterns on the underside of a printed circuit board oscillator wiring pattern example separate the v ss line for oscillation from other v ss lines
rej03b0156-0122 rev.1.22 mar 31, 2009 page 72 of 94 7547 group 5. setup for i/o ports setup i/o ports using hardware and software as follows: ? connect a resistor of 100 ? or more to an i/o port in series. ? as for an input port, read data several times by a program for checking whether input levels are equal or not. ? as for an output port, since the output data may reverse because of noise, rewrite data to its port latch at fixed periods. ? rewrite data to direction registers and pull-up control registers at fixed periods. fig. 96 setup for i/o ports 6. providing of watchdog timer function by software if a microcomputer runs away because of noise or others, it can be detected by a software watchdog timer and the microcomputer can be reset to normal operation. this is equal to or more effective than program runaway detection by a hardware watchdog timer. the following shows an example of a watchdog timer provided by software. in the following example, to reset a microcomputer to normal op- eration, the main routine detects errors of the interrupt processing routine and the interrupt processing routine detects errors of the main routine. this example assumes that interrupt processing is repeated mul- tiple times in a single main routine processing. fig. 97 watchdog timer by software ? assigns a single byte of ram to a software watchdog timer (swdt) and writes the initial value n in the swdt once at each execution of the main routine. the initial value n should satisfy the following condition: n+1 (counts of interrupt processing executed in each main routine) as the main routine execution cycle may change because of an interrupt processing or others, the initial value n should have a margin. ? watches the operation of the interrupt processing routine by comparing the swdt contents with counts of interrupt process- ing after the initial value n has been set. ? detects that the interrupt processing routine has failed and de- termines to branch to the program initialization routine for recovery processing in the following case: if the swdt contents do not change after interrupt processing. ? decrements the swdt contents by 1 at each interrupt process- ing. ? determines that the main routine operates normally when the swdt contents are reset to the initial value n at almost fixed cycles (at the fixed interrupt processing count). ? detects that the main routine has failed and determines to branch to the program initialization routine for recovery process- ing in the following case: if the swdt contents are not initialized to the initial value n but continued to decrement and if they reach 0 or less. main routine (swdt) n cli main processing (swdt) interrupt processing routine errors n interrupt processing routine (swdt) (swdt)?1 interrupt processing (swdt) main routine errors > 0 0 rti return =n? 0? n direction register port latch data bus i/o port pins noise noise n.g. o.k.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 73 of 94 7547 group notes on qzrom product shipped in blank as for the product shipped in blank, renesas does not perform the writing test to user rom area after the assembly process though the qzrom writing test is performed enough before the assembly process. therefore, a writing error of approx.0.1 % may occur. moreover, please note the contact of cables and foreign bodies on a socket, etc. because a writing environment may cause some writing errors. precautions regarding overvoltage make sure that voltage exceeding the v cc pin voltage is not ap- plied to other pins. in particular, ensure that the state indicated by bold lines in figure below does not occur for cnv ss pin (v pp power source pin for qzrom) during power-on or power-off. oth- erwise the contents of qzrom could be rewritten. notes on qzrom writing orders when ordering the qzrom product shipped after writing, submit the mask file (extension: .msk) which is made by the mask file converter mm. ? be sure to set the rom option data* setup when making the mask file by using the mask file converter mm.. the rom code protect is specified according to the rom option data* in the mask file which is submitted at ordering. note that the mask file which has nothing at the rom option data* or has the data other than ?00 16 ? and ?ff 16 ? can not be accepted. ? set ?ff 16 ? to the rom code protect address in rom data re- gardless of the presence or absence of a protect. when data other than ?ff 16 ? is set, we may ask that the rom data be sub- mitted again. * rom option data: mask option noted in mm fig. 98 timing diagram (bold-lined periods are applicable) v cc pin voltage cnv ss pin voltage ?l? input 1.8v 1.8v (1) input voltage to other mcu pins rises before v cc pin voltage. (2) input voltage to other mcu pins falls after v cc pin voltage. note: the internal circuitry is unstable when v cc is below the minimum voltage specification of 1.8v (shaded portion), so particular care should be exercised regarding overvoltage. data required for qzrom writing orders the following are necessary when ordering a qzrom product shipped after writing: 1. qzrom writing confirmation form* 2. mark specification form* 3. rom data...........mask file * for the qzrom writing confirmation form and the mark specifi- cation form, refer to the ?renesas technology corp.? homepage (http://www.renesas.com/homepage.jsp). note that we cannot deal with special font marking (customer's trademark etc.) in qzrom microcomputer.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 74 of 94 7547 group electrical characteristics of 7547 group absolute maximum ratings absolute maximum ratings ?0.3 to 6.5 ?0.3 to v cc + 0.3 ?0.3 to v cc + 0.3 ?0.3 to v cc + 0.3 ?0.3 to v cc + 0.3 300 ?20 to 85 ?40 to 125 power source voltage input voltage p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 , v ref input voltage reset, x in input voltage cnv ss output voltage p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 , x out power dissipation operating temperature storage temperature v v v v v mw c c v cc v i v i v i v o p d t opr t stg conditions symbol ratings unit parameter all voltages are based on v ss . when an input voltage is mea- sured, output transistors are cut off. ta = 25c ? ?
rej03b0156-0122 rev.1.22 mar 31, 2009 page 75 of 94 7547 group recommended operating conditions recommended operating conditions (1) (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter unit limits note 1: vcc = 4.0 to 5.5v 2: the total output current is the sum of all the currents flowing through all the applicable ports. the total average current is an average value measured over 100 ms. the total peak current is the peak value of all the currents. 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 5.5 v cc v cc v cc v cc 0.2v cc 0.8 0.2v cc 0.16v cc ?80 80 80 ?40 40 40 4.5 4.0 2.4 2.2 4.0 2.4 2.2 4.0 2.4 2.2 1.8 1.8 0.8v cc 2.0 0.8v cc 0 0 0 0 power source voltage (double-speed mode) (ceramic) (high-, middle-speed mode) power source voltage (high-, middle-speed mode) (rc) power source voltage (at on-chip oscillator) power source voltage analog reference voltage ?h? input voltage p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?h? input voltage (ttl input level selected) p1 0 , p1 2 , p1 3 , p3 6 , p3 7 (note 1) ?h? input voltage reset, x in ?l? input voltage p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? input voltage (ttl input level selected) p1 0 , p1 2 , p1 3 , p3 6 , p3 7 (note 1) ?l? input voltage reset, cnv ss ?l? input voltage x in ?h? total peak output current (note 2) p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? total peak output current (note 2) p1 0 ?p1 4 , p2 0 ?p2 7 ?l? total peak output current (note 2) p0 0 ?p0 7 , p3 0 ?p3 7 ?h? total average output current (note 2) p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? total average output current (note 2) p1 0 ?p1 4 , p2 0 ?p2 7 ?l? total average output current (note 2) p0 0 ?p0 7 , p3 0 ?p3 7 f(x in ) = 8 mhz f(x in ) = 6.5 mhz f(x in ) = 2 mhz f(x in ) = 1 mhz f(x in ) = 8 mhz f(x in ) = 4 mhz f(x in ) = 2 mhz f(x in ) = 4 mhz f(x in ) = 2 mhz f(x in ) = 1 mhz 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 5.0 0 v cc v ss v ref v ih v ih v ih v il v il v il v il i oh(peak) i ol(peak) i ol(peak) i oh(avg) i ol(avg) i ol(avg) v v v v v v v v v v v v v v v v v v v v ma ma ma ma ma ma
rej03b0156-0122 rev.1.22 mar 31, 2009 page 76 of 94 7547 group recommended operating conditions (2) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) ?h? peak output current (note 1) p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? peak output current (note 1) p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?l?) p1 0 ?p1 4 , p2 0 ?p2 7 ?l? peak output current (note 1) p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?h?) ?h? average output current (note 2) p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? average output current (note 2) p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?l?) p1 0 ?p1 4 , p2 0 ?p2 7 ?l? average output current (note 2) p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?h?) oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 4.5 v to 5.5 v) double-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 4.0 v to 5.5 v) double-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 2.4 v to 5.5 v) double-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 2.2 v to 5.5 v) double-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 4.0 v to 5.5 v) high-, middle-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 2.4 v to 5.5 v) high-, middle-speed mode oscillation frequency (note 3) at ceramic oscillation or external clock input (v cc = 2.2 v to 5.5 v) high-, middle-speed mode oscillation frequency (note 3) at rc oscillation (v cc = 4.0 v to 5.5 v) high-, middle-speed mode oscillation frequency (note 3) at rc oscillation (v cc = 2.4 v to 5.5 v) high-, middle-speed mode oscillation frequency (note 3) at rc oscillation (v cc = 2.2 v to 5.5 v) high-, middle-speed mode symbol parameter limits max. t yp. min. ?10 10 30 ?5 5 15 8 6.5 2 1 8 4 2 4 2 1 notes 1: the peak output current is the peak current flowing in each port. 2: the average output current i ol (avg), i oh (avg) in an average value measured over 100 ms. 3: when the oscillation frequency has a duty cycle of 50 %. i oh(peak) i ol(peak) i ol(peak) i oh(avg) i ol(avg) i ol(avg) f(x in ) ma ma ma ma ma ma mhz mhz mhz mhz mhz mhz mhz mhz mhz mhz unit
rej03b0156-0122 rev.1.22 mar 31, 2009 page 77 of 94 7547 group electrical characteristics electrical characteristics (1) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter limits unit t est conditions v v v v v v v v v v v a a a a a a ma v khz khz notes 1: p1 1 is measured when the p1 1 /t x d 1 p-channel output disable bit of the uart1 control register (bit 4 of address 001b 16 ) is ?0?. p0 5 is measured when the p0 5 /t x d 2 p-channel output disable bit of the uart2 control register (bit 4 of address 0031 16 ) is ?0?. 2: r x d 1 , s clk1 , int 0 , and int 1 (p3 6 selected) have hysteresises only when bits 0 to 2 of the port p1p3 control register are set to ?0? (cmos level). 3: it is available only when operating key-on wake up. v cc ?1.5 v cc ?1.0 1.6 1000 62.5 ?h? output voltage p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 (note 1) ?l? output voltage p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?l?) p1 0 ?p1 4 , p2 0 ?p2 7 ?l? output voltage p0 0 ?p0 7 , p3 0 ?p3 7 (drive capacity = ?h?) hysteresis cntr 0 , int 0 , int 1 , cap 0 , cap 1 (note 2) p0 0 ?p0 7 (note 3) hysteresis r x d 0 , s clk0 , r x d 1 , s clk1 hysteresis reset ?h? input current p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?h? input current reset ?h? input current x in ?l? input current p0 0 ?p0 7 , p1 0 ?p1 4 , p2 0 ?p2 7 , p3 0 ?p3 7 ?l? input current reset ?l? input current x in ?l? input current p0 0 ?p0 7 , p3 0 ?p3 7 ram hold voltage on-chip oscillator oscillation frequency oscillation stop detection circuit detection frequency 1.5 0.3 1.0 2.0 0.3 1.0 5.0 5.0 ?5.0 ?5.0 ?0.5 5.5 3000 187.5 v oh v ol v ol v t+ ?v t? v t+ ?v t? v t+ ?v t? i ih i ih i ih i il i il i il i il v ram r osc d osc 0.4 0.5 0.5 4.0 ?4.0 ?0.2 2000 125 i oh = ?5 ma v cc = 4.0 to 5.5 v i oh = ?1.0 ma v cc = 1.8 to 5.5 v i ol = 5 ma v cc = 4.0 to 5.5 v i ol = 1.5 ma v cc = 4.0 to 5.5 v i ol = 1.0 ma v cc = 1.8 to 5.5 v i ol = 15 ma v cc = 4.0 to 5.5 v i ol = 1.5 ma v cc = 4.0 to 5.5 v i ol = 1.0 ma v cc = 1.8 to 5.5 v v i = v cc (pin floating. pull up transistors ?off?) v i = v cc v i = v cc v i = v ss (pin floating. pull up transistors ?off?) v i = v ss v i = v ss v i = v ss (pull up transistors ?on?) when clock stopped v cc = 5.0 v, ta = 25 c v cc = 5.0 v, ta = 25 c
rej03b0156-0122 rev.1.22 mar 31, 2009 page 78 of 94 7547 group electrical characteristics (2) (v cc = 1.8 to 5.5v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter limits unit t est conditions note: increment when a/d conversion is executed includes the reference power source input current (iv ref ). f(x in ) = 8 mhz output transistors ?off? f(x in ) = 2 mhz, v cc = 2.2 v output transistors ?off? on-chip oscillator operation mode, output transistors ?off? f(x in ) = 8 mhz (in wit state), functions except timer 1 disabled, output transistors ?off? f(x in ) = 2 mhz, v cc = 2.2 v (in wit state), functions except timer 1 disabled, output transistors ?off? on-chip oscillator operation mode, (in wit state), functions except timer 1 disabled, output transistors ?off? increment when a/d conversion is executed f(x in ) = 8 mhz, v cc = 5 v all oscillation stopped (in stp state) output transistors ?off? low voltage detection circuit self consumption current double-speed mode high-speed mode middle-speed mode high-speed mode frequency/1 frequency/2 frequency/8 frequency/128 ta = 25 c ta = 85 c ta = 25 c v cc = 5 v ma ma ma ma ma ma ma ma ma ma ma ma a a a power source current *lvd is valid (except at stp) 9.5 7.0 5.5 1.25 3.3 2.3 1.1 0.7 3.5 0.7 1.0 10 i cc 5.9 3.9 2.4 0.45 1.55 0.95 0.4 0.25 2.0 0.25 0.25 0.5 0.1 70
rej03b0156-0122 rev.1.22 mar 31, 2009 page 79 of 94 7547 group a/d converter characteristics a/d converter characteristics (v cc = 2.7 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) resolution absolute accuracy conversion time ladder resistor reference power source input current a/d port input current min. t yp. max. symbol parameter limits unit t est conditions bits lsb tc(x in ) k ? a a 10 3 122 61 200 120 5.0 ? ? t conv r ladder i vref i i(ad) 55 150 90 50 30 note: ad conversion accuracy may be low under the following conditions; (1) when the v ref voltage is set to be lower than the v cc voltage, an analog circuit in this microcomputer is affected by noise. the accuracy is lower than the case the v ref voltage is the same as v cc voltage. (2) when the v ref voltage is 3.0 v or less at the low temperature, the ad conversion accuracy may be very lower than at room temperature. when system is used at low temperature, that v ref is 3.0 v or more is recommended. ta = 25 c v cc = v ref = 2.7 to 5.5 v ad conversion clock = f(x in )/2 ad conversion clock = f(x in ) v ref = 5.0 v v ref = 3.0 v
rej03b0156-0122 rev.1.22 mar 31, 2009 page 80 of 94 7547 group power-on reset circuit characteristics power-on reset circuit characteristics (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) v alid start voltage of power-on reset circuit (note) v por hold time rising time of valid power source of power-on reset circuit min. t yp. max. symbol parameter limits unit t est conditions mv s ms 0 20 v por tw(v por ) tw(v por -v det ) note: v por is the start voltage level of vcc for the built-in power-on reset circuit to operate normally. keep v por to be lower than the vcc voltage before rising of the vcc power source to use the built-in power-on reset circuit. set the built-in low voltage detection circuit to be valid when the built-in power-on reset is used. tw(v por ) > 10 s low voltage detection circuit characteristics low voltage detection circuit characteristics (v cc = 1.8 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) v alid start voltage of low voltage detection circuit (note) detection voltage of low voltage detection circuit detection time of low 5voltage detection circuit min. 1.0 1.85 1.8 t yp. 1.95 1.95 20 max. symbol parameter limits unit t est conditions v v v s 2.05 2.1 v lvd v det t det note: v lvd is the start voltage level of vcc for the built-in low voltage detection circuit to operate normally. if the vcc power source becomes lower than v lvd , first set the vcc voltage to be lower than v por . next, according to the electrical characteristics of the power-on reset circuit, perform the rising of vcc. ta = 0 to 50 c ta = ?20 to 85 c fig. 99 electrical characteristics of power-on reset circuit and low voltage detection circuit vcc power source waveform v por 0v tw(v por ) tw(v por -v det ) t det v det internal reset signal power-on reset circuit characteristics low voltage detection circuit characteristics v lvd 10
rej03b0156-0122 rev.1.22 mar 31, 2009 page 81 of 94 7547 group t iming requirements timing requirements (1) (v cc = 4.0 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. typ. max. symbol parameter limits unit reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width cntr 0 input cycle time cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?h? pulse width (note 1) cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?l? pulse width (note 1) serial i/o1, serial i/o2 clock input cycle time (note 2) serial i/o1, serial i/o2 clock input ?h? pulse width (note 2) serial i/o1, serial i/o2 clock input ?l? pulse width (note 2) serial i/o1, serial i/o2 input set up time serial i/o1, serial i/o2 input hold time t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t c (cntr 0 ) t wh (cntr 0 ) t wl (cntr 0 ) t c (s clk1 ) t wh (s clk1 ) t wl (s clk1 ) t su (rxd 1 ?s clk1 ) t h (s clk1 ?rxd 1 ) 2 125 50 50 200 80 80 800 370 370 220 100 s ns ns ns ns ns ns ns ns ns ns ns t iming requirements (2) ( v cc = 2.4 to 5.5 v , v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter limits unit reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width cntr 0 input cycle time cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?h? pulse width (note 1) cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?l? pulse width (note 1) serial i/o1, serial i/o2 clock input cycle time (note 2) serial i/o1, serial i/o2 clock input ?h? pulse width (note 2) serial i/o1, serial i/o2 clock input ?l? pulse width (note 2) serial i/o1, serial i/o2 input set up time serial i/o1, serial i/o2 input hold time t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t c (cntr 0 ) t wh (cntr 0 ) t wl (cntr 0 ) t c (s clk1 ) t wh (s clk1 ) t wl (s clk1 ) t su (rxd 1 ?s clk1 ) t h (s clk1 ?rxd 1 ) 2 250 100 100 500 230 230 2000 950 950 400 200 s ns ns ns ns ns ns ns ns ns ns ns notes 1: as for cap 0 , cap 1 , it is the value when noise filter is not used. 2: in this time, bit 6 of the serial i/o1 control register (address 001a 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o1 control register is ?0? (clock asynchronous serial i/o is selected), the rating values are divide d by 4. in this time, bit 6 of the serial i/o2 control register (address 0030 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o2 control register is ?0? (clock asynchronous serial i/o is selected), the rating values are divide d by 4. notes 1: as for cap 0 , cap 1 , it is the value when noise filter is not used. 2: in this time, bit 6 of the serial i/o1 control register (address 001a 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o1 control register is ?0? (clock asynchronous serial i/o1 is selected), the rating values are divid ed by 4. in this time, bit 6 of the serial i/o2 control register (address 0030 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o2 control register is ?0? (clock asynchronous serial i/o is selected), the rating values are divide d by 4.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 82 of 94 7547 group t iming requirements (3) (v cc = 2.2 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter limits unit reset input ?l? pulse width external clock input cycle time external clock input ?h? pulse width external clock input ?l? pulse width cntr 0 input cycle time cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?h? pulse width (note 1) cntr 0 , int 0 , int 1 , cap 0 , cap 1 input ?l? pulse width (note 1) serial i/o1, serial i/o2 clock input cycle time (note 2) serial i/o1, serial i/o2 clock input ?h? pulse width (note 2) serial i/o1, serial i/o2 clock input ?l? pulse width (note 2) serial i/o1, serial i/o2 input set up time serial i/o1, serial i/o2 input hold time t w (reset) t c (x in ) t wh (x in ) t wl (x in ) t c (cntr 0 ) t wh (cntr 0 ) t wl (cntr 0 ) t c (s clk1 ) t wh (s clk1 ) t wl (s clk1 ) t su (rxd 1 ?s clk1 ) t h (s clk1 ?rxd 1 ) 2 500 200 200 1000 460 460 4000 1900 1900 800 400 s ns ns ns ns ns ns ns ns ns ns ns notes 1: as for cap 0 , cap 1 , it is the value when noise filter is not used. 2: in this time, bit 6 of the serial i/o1 control register (address 001a 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o1 control register is ?0? (clock asynchronous serial i/o1 is selected), the rating values are divid ed by 4. in this time, bit 6 of the serial i/o2 control register (address 0030 16 ) is set to ?1? (clock synchronous serial i/o is selected). when bit 6 of the serial i/o2 control register is ?0? (clock asynchronous serial i/o is selected), the rating values are divide d by 4.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 83 of 94 7547 group switching characteristics switching characteristics (1) ( v cc = 4.0 to 5.5 v , v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) t c (s clk1 )/2?30 t c (s clk1 )/2?30 ?30 min. t yp. max. symbol parameter limits unit t wh (s clk1 ) t wl (s clk1 ) t d (s clk1 ?txd 1 ) t v (s clk1 ?txd 1 ) t r (s clk1 ) t f (s clk1 ) t r (cmos) t f (cmos) serial i/o1, serial i/o2 clock output ?h? pulse width serial i/o1, serial i/o2 clock output ?l? pulse width serial i/o1, serial i/o2 output delay time serial i/o1, serial i/o2 output valid time serial i/o1, serial i/o2 clock output rising time serial i/o1, serial i/o2 clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) note 1: pin x out is excluded. switching characteristics (2) ( v cc = 2.4 to 5.5 v, v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. typ. max. symbol parameter limits unit 350 50 50 50 50 note 1: pin x out is excluded. t wh (s clk1 ) t wl (s clk1 ) t d (s clk1 ?t x d 1 ) t v (s clk1 ?t x d 1 ) t r (s clk1 ) t f (s clk1 ) t r (cmos) t f (cmos) serial i/o1, serial i/o2 clock output ?h? pulse width serial i/o1, serial i/o2 clock output ?l? pulse width serial i/o1, serial i/o2 output delay time serial i/o1, serial i/o2 output valid time serial i/o1, serial i/o2 clock output rising time serial i/o1, serial i/o2 clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) t c (s clk1 )/2?50 t c (s clk1 )/2?50 ?30 20 20 ns ns ns ns ns ns ns ns 10 10 140 30 30 30 30 ns ns ns ns ns ns ns ns switching characteristics (3) ( v cc = 2.2 to 5.5 v , v ss = 0 v, ta = ?20 to 85 c, unless otherwise noted) min. t yp. max. symbol parameter limits unit 450 70 70 70 70 note 1: pin x out is excluded. fig. 100 switching characteristics measurement circuit diagram / / / measured output pin cmos output 100 pf t wh (s clk1 ) t wl (s clk1 ) t d (s clk1 ?t x d 1 ) t v (s clk1 ?t x d 1 ) t r (s clk1 ) t f (s clk1 ) t r (cmos) t f (cmos) serial i/o1, serial i/o2 clock output ?h? pulse width serial i/o1, serial i/o2 clock output ?l? pulse width serial i/o1, serial i/o2 output delay time serial i/o1, serial i/o2 output valid time serial i/o1, serial i/o2 clock output rising time serial i/o1, serial i/o2 clock output falling time cmos output rising time (note 1) cmos output falling time (note 1) t c (s clk1 )/2?70 t c (s clk1 )/2?70 ?30 25 25 ns ns ns ns ns ns ns ns
rej03b0156-0122 rev.1.22 mar 31, 2009 page 84 of 94 7547 group fig. 101 timing chart 0.2v cc t d (s clk1 -txd 1 ) t f 0.2 v cc 0.8v cc 0.8v cc t r t su (rxd 1 -s clk1 )t h (s clk1 -rxd 1 ) t v (s clk1 -txd 1 ) t c (s clk1 ) t wl (s clk1 ) t wh (s clk1 ) r x d 1 (at receive) s clk1 0.2v cc t wl (x in ) 0.8v cc t wh (x in ) t c (x in ) x in 0.2v cc 0.8 v cc t w (reset) reset 0.2v cc t wl (cntr 0 ) 0.8v cc t wh (cntr 0 ) t c (cntr 0 ) t x d 1 (at transmit) cntr 0 0.2v cc t wl (int 0 ) 0.8v cc t wh (int 0 ) int 0 , int 1 cap 0 , cap 1
rej03b0156-0122 rev.1.22 mar 31, 2009 page 85 of 94 7547 group b p a 1 h e y 0.10 e 0.8 c 0 8 l 0.3 0.5 0.7 0 0.1 0.2 a 2.35 11.63 11.93 12.23 a 2 2.05 e 8.2 8.4 8.6 d 14.8 15.0 15.2 reference symbol dimension in millimeters min nom max 0.3 0.35 0.45 0.18 0.2 0.25 p-ssop36-8.4x15-0.80 0.5g mass[typ.] 36p2r-d prsp0036ga-b renesas code jeita package code previous code 0.65 0.95 2. 1. dimensions " * 1" and " * 2" do not include mold flash. note) dimension " * 3" does not include trim offset. y index mark 1 18 19 36 f * 1 * 2 * 3 e h e d e b p a c detail f a 2 l a 1 p ackage outline diagrams showing the latest package dimensions and mounting information are available in the ?packages? section of the renesas technology website.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 86 of 94 7547 group appendix notes on programming 1. processor status register (1) initializing of processor status register flags which affect program execution must be initialized after a re- set. in particular, it is essential to initialize the t and d flags because they have an important effect on calculations. initialize these flags at beginning of the program. after a reset, the contents of the processor status register (ps) are undefined except for the i flag which is ?1?. reset initializing of flags main program fig. 2 stack memory contents after php instruction execution 2. decimal calculations (1) execution of decimal calculations the adc and sbc are the only instructions which will yield proper decimal notation, set the decimal mode flag (d) to ?1? with the sed instruction. after executing the adc or sbc instruction, ex- ecute another instruction before executing the sec , clc , or cld instruction. fig. 1 initialization of processor status register (2) how to reference the processor status register to reference the contents of the processor status register (ps), ex- ecute the php instruction once then read the contents of (s+1). if necessary, execute the plp instruction to return the ps to its origi- nal status. (s) (s)+1 stored ps (2) notes on status flag in decimal mode when decimal mode is selected, the values of three of the flags in the status register (the n, v, and z flags) are invalid after a adc or sbc instruction is executed. the carry flag (c) is set to ?1? if a carry is generated as a result of the calculation, or is cleared to ?0? if a borrow is generated. to de- termine whether a calculation has generated a carry, the c flag must be initialized to ?0? before each calculation. to check for a borrow, the c flag must be initialized to ?1? before each calcula- tion. 3. jmp instruction when using the jmp instruction in indirect addressing mode, do not specify the last address on a page as an indirect address. 4. multiplication and division instructions (1) the index x mode (t) and the decimal mode (d) flags do not affect the mul and div instruction. (2) the execution of these instructions does not change the con- tents of the processor status register. 5. read-modify-write instruction do not execute a read-modify-write instruction to the read invalid address (sfr). the read-modify-write instruction operates in the following se- quence: read one-byte of data from memory, modify the data, write the data back to original memory. the following instructions are classified as the read-modify-write instructions in the 740 family. (1) bit management instructions: clb, seb (2) shift and rotate instructions: asl, lsr, rol, ror, rrf (3) add and subtract instructions: dec, inc (4) logical operation instructions (1?s complement): com add and subtract/logical operation instructions (adc, sbc, and, eor, and ora) when t flag = ?1? operate in the way as the read- modify-write instruction. do not execute the read invalid sfr. when the read-modify-write instruction is executed to read invalid sfr, the instruction may cause the following consequence: the in- struction reads unspecified data from the area due to the read invalid condition. then the instruction modifies this unspecified data and writes the data to the area. the result will be random data written to the area or some unexpected event. set d flag to ?1? adc or sbc instruction nop instruction sec , clc , or cld instruction fig. 3 instructions for decimal calculations
rej03b0156-0122 rev.1.22 mar 31, 2009 page 87 of 94 7547 group notes on peripheral functions notes on i/o ports 1. port p0p3 drive capacity control register the number of led drive port (drive capacity is high) is 8. 2. pull-up control register when using each port which built in pull-up resistor as an output port, the pull-up control bit of corresponding port becomes invalid, and pull-up resistor is not connected. pull-up control is effective only when each direction register is set to the input mode. 3. notes in stand-by state in stand-by state* 1 for low-power dissipation, do not make input levels of an input port and an i/o port ?undefined?. pull-up (connect the port to vcc) or pull-down (connect the port to vss) these ports through a resistor. when determining a resistance value, note the following points: ? external circuit ? variation of output levels during the ordinary operation when using a built-in pull-up resistor, note on varied current val- ues: ? when setting as an input port : fix its input level ?when setting as an output port : prevent current from flowing out to external. the output transistor becomes the off state, which causes the ports to be the high-impedance state. note that the level becomes ?undefined? depending on external circuits. accordingly, the potential which is input to the input buffer in a mi- crocomputer is unstable in the state that input levels of an input port and an i/o port are ?undefined?. this may cause power source current. * 1 stand-by state : the stop mode by executing the stp instruction the wait mode by executing the wit instruction 4. modifying output data with bit handling instruction when the port latch of an i/o port is modified with the bit handling instruction* 1 , the value of an unspecified bit may change. i/o ports can be set to input mode or output mode in byte units. when the port register is read or written, the following will be op- erated: ? port as input mode read: read the pin level w rite: write to the port latch ? port as output mode read: read the port latch or peripheral function output (specifications vary depending on the port) w rite: write to the port latch (output the content of the port latch from the pin) meanwhile, the bit handling instructions are the read-modifywrite instructions* 2 . executing the bit handling instruction to the port register allows reading and writing a bit unspecified with the in- struction at the same time. if an unspecified bit is set to input mode, the pin level is read and the value is written to the port latch. at this time, if the original con- tent of the port latch and the pin level do not match, the content of the port latch changes. if an unspecified bit is set to output mode, the port latch is nor- mally read, but the peripheral function output is read in some ports and the value is written to the port latch. at this time, if the original content of the port latch and the peripheral function output do not match, the content of the port latch changes. *1 bit handling instructions: clb, seb *2 read-modify-write instruction: reads 1-byte of data from memory, modifies the data, and writes 1-byte of the data to the original memory. 5. direction register the values of the port direction registers cannot be read. that is, it is impossible to use the lda instruction, memory opera- tion instruction when the t flag is ?1?, addressing mode using direction register values as qualifiers, and bit test instructions such as bbc and bbs . it is also impossible to use bit operation instructions such as clb and seb and read-modify-write instructions of direction registers for calculations such as ror . for setting direction registers, use the ldm instruction, sta in- struction, etc.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 88 of 94 7547 group t ermination of unused pins 1. terminate unused pins perform the following wiring at the shortest possible distance (20 mm or less) from microcomputer pins. (1) i/o ports set the i/o ports for the input mode and connect each pin to v cc or v ss through each resistor of 1 k ? to 10 k ? . the port which can select a built-in pull-up resistor can also use the built-in pull-up re- sistor. when using the i/o ports as the output mode, open them at ?l? or ?h?. ? when opening them in the output mode, the input mode of the initial status remains until the mode of the ports is switched over to the output mode by the program after reset. thus, the poten- tial at these pins is undefined and the power source current may increase in the input mode. with regard to an effects on the sys- tem, thoroughly perform system evaluation on the user side. ? since the direction register setup may be changed because of a program runaway or noise, set direction registers by program periodically to increase the reliability of program. 2. termination remarks (1) i/o ports setting as input mode [1] do not open in the input mode. ? the power source current may increase depending on the first- stage circuit. ? an effect due to noise may be easily produced as compared with proper termination (1) shown on the above ?1. terminate unused pins?. [2] do not connect to v cc or v ss directly. if the direction register setup changes for the output mode be- cause of a program runaway or noise, a short circuit may occur. [3] do not connect multiple ports in a lump to v cc or v ss through a resistor. if the direction register setup changes for the output mode be- cause of a program runaway or noise, a short circuit may occur between ports. notes on interrupts 1. change of relevant register settings when not requiring for the interrupt occurrence synchronous with the following case, take the sequence shown in figure 4. ? when switching external interrupt active edge ? when switching interrupt sources of an interrupt vector address where two or more interrupt sources are allocated fig. 4 sequence of changing relevant register when setting the followings, the interrupt request bit of the corre- sponding interrupt may be set to ?1?. ? when switching external interrupt active edge int 0 interrupt edge selection bit (bit 0 of interrupt edge selection register (address 003a 16 )) int 1 interrupt edge selection bit (bit 1 of interrupt edge selection register) cntr 0 active edge switch bit (bit 2 of timer x mode register (address 002b 16 )) capture 0 interrupt edge selection bit (bits 1 and 0 of capture mode register (address 0020 16 )) capture 1 interrupt edge selection bit (bits 3 and 2 of capture mode register) 2. check of interrupt request bit when executing the bbc or bbs instruction to determine an in- terrupt request bit immediately after this bit is set to ?0?, take the following sequence. if the bbc or bbs instruction is executed immediately after an in- terrupt request bit is cleared to ?0?, the value of the interrupt request bit before being cleared to ?0? is read. set the corresponding interrupt enable bit to ?0? (disabled) . set the interrupt edge selection bit, active edge switch bit, or the interrupt source selection bit. nop (one or more instructions) set the corresponding interrupt request bit to ?0? (no interrupt request issued). set the corresponding interrupt enable bit to ?1? (enabled). set the interrupt request bit to ?0? (no interrupt issued) nop (one or more instructions) execute the bbc or bbs instruction fig. 5 sequence of check of interrupt request bit
rej03b0156-0122 rev.1.22 mar 31, 2009 page 89 of 94 7547 group 3. interrupt discrimination bit use an ldm instruction to clear to ?0? an interrupt discrimination bit. ldm #%0000xxxx, $0b set the following values to ?x? ?0?: an interrupt discrimination bit to clear ?1?: other interrupt discrimination bits ex.) when a key-on wakeup interrupt discrimination bit is cleared; ldm #%00001110 and $0b. 4. interrupt discrimination bit and interrupt request bit for key-on wakeup, uart1 bus collision detection, a/d conver- sion and timer 1 interrupt, even if each interrupt valid bit (interrupt source set register (address 000a 16 )) is set ?0: invalid?, each inter- rupt discrimination bit (interrupt source discrimination register (address 000b 16 )) is set to ?1: interrupt occurs? when correspond- ing interrupt request occurs. but corresponding interrupt request bit (interrupt request registers 1, 2 (addresses003c 16 , 003d 16 ) is not affected. notes on timers 1. when n (0 to 255) is written to a timer latch, the frequency divi- sion ratio is 1/(n+1). 2. when a count source of timer x, timer a or timer b is switched, stop a count of the timer. notes on timer x 1. cntr 0 interrupt active edge selection cntr 0 interrupt active edge depends on the cntr 0 active edge switch bit (bit 2 of timer x mode register (address 002b 16 )). when this bit is ?0?, the cntr 0 interrupt request bit is set to ?1? at the falling edge of cntr 0 pin input signal. when this bit is ?1?, the cntr 0 interrupt request bit is set to ?1? at the rising edge of cntr 0 pin input signal. 2. timer x count source selection the f(x in ) (frequency not divided) can be selected by the timer x count source selection bits (bits 1 and 0 of timer count source set register (address 002a 16 )) only when the ceramic oscillation or the on-chip oscillator is selected. do not select it for the timer x count source at the rc oscillation. 3. pulse output mode set the direction register of port p1 4 , which is also used as cntr 0 pin, to output. when the tx out pin is used, set the direction register of port p0 3 , which is also used as tx out pin, to output. 4. pulse width measurement mode set the direction register of port p1 4 , which is also used as cntr 0 pin, to input. notes on timer a, b 1. setting of timer value when ?1: write to only latch? is set to the timer a (b) write control bit (bit 0 (bit 2) of timer x mode register (address 001d 16 )), written data to timer register is set to only latch even if timer is stopped or operating. accordingly, in order to set the initial value for timer when it is stopped, set ?0: write to latch and timer simultaneously? to timer a (b) write control bit. 2. read/write of timer a stop timer a to read/write its data in the following state; x in oscillation selected by clock division ratio selection bits (bits 7 and 6 of cpu mode register (address 003b 16 )), and the on-chip oscillator output is selected as the timer a count source. 3. read/write of timer b stop timer b to read/write its data in the following state; x in oscillation selected by clock division ratio selection bits, the timer a underflow is selected as the timer b count source, and the on-chip oscillator output is selected as the timer a count source. notes on output compare 1. when the selected source timer of each compare channel is stopped, written data to compare register is loaded to the com- pare latch simultaneously. 2. do not write the same data to both of compare latch x0 (x=0, 1, 2, 3) and x1. 3. when setting value of the compare register is larger than timer setting value, compare match signal is not generated. accord- ingly, the output waveform is fixed to ?l? or ?h? level. however, when setting value of another compare register is smaller than timer setting value, this compare match signal is generated. accordingly, if the corresponding compare latch y (y=00, 01, 10, 11, 20, 21, 30, 31) interrupt source bit is set to ?1? (valid), compare match interrupt request occurs. 4. when the compare x trigger enable bit is cleared to ?0? (dis- abled), the match trigger to the waveform output circuit is disabled. accordingly, the output waveform can be fixed to ?l? or ?h? level. however, in this case, the compare match signal is generated. accordingly, if the corresponding compare latch y (y=00, 01, 10, 1 1, 20, 21, 30, 31) interrupt source bit is set to ?1? (valid),compare match interrupt request occurs.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 90 of 94 7547 group notes on input capture 1. if the capture trigger is input while the capture register (low-or- der and high-order) is in read, captured value is changed between high-order reading and low-order reading. accordingly, some countermeasure by program is recommended, for ex- ample comparing the values that twice of read. 2. timer a cannot be used for the capture source timer in the fol- lowing state; ? x in oscillation selected by clock division ratio selection bits (bits 7 and 6 of cpu mode register (address 003b 16 )) ? timer a count source: on-chip oscillator output. t imer b cannot be used for the capture source timer in the fol- lowing state; ? x in oscillation selected by clock division ratio selection bits ? timer b count source: timer a underflow ? timer a count source: on-chip oscillator output. 3. as shown below, when the capture input is performed to both capture latch 00 and 01 at the same time, the value of capture 0 status bit (bit 4 of capture/compare status register (address 0022 16 )) is undefined (same as capture 1). ? when ?1? is written to capture latch 00 software trigger bit (bit 0 of capture software trigger register (address 0013 16 )) and cap- ture latch 01 software trigger bit (bit 1 of capture software trigger register) at the same time ? when external trigger of capture latch 00 and software trigger of capture latch 01 occur at the same time ? when external trigger of capture latch 01 and software trigger of capture latch 00 occur at the same time 4. when the capture interrupt is used as the interrupt for return from stop mode, set the capture 0 noise filter clock selection bits (bits 5 and 4 of capture mode register (address 0020 16 )) to ?00 (filter stop)? (same as capture 1). notes on serial i/oi (i=1, 2) 1. clock synchronous serial i/o (1) when the transmit operation is stopped, clear the serial i/oi enable bit and the transmit enable bit to ?0? (serial i/oi and transmit disabled). since transmission is not stopped and the transmission circuit is not initialized even if only the serial i/oi enable bit is cleared to ?0? (serial i/oi disabled), the internal transmission is running (in this case, since pins txd i , rxd i , s clki , and s rdyi function as i/o ports, the transmission data is not output). when data is written to the transmit buffer register in this state, data starts to be shifted to the transmit shift register. when the serial i/oi enable bit is set to ?1? at this time, the data during internally shifting is output to the txd i pin and an operation failure occurs. (2) when the receive operation is stopped, clear the receive en- able bit to ?0? (receive disabled), or clear the serial i/oi enable bit to ?0? (serial i/oi disabled). (3) when the transmit/receive operation is stopped, clear both the transmit enable bit and receive enable bit to ?0? (transmit and receive disabled) simultaneously. (any one of data transmis- sion and reception cannot be stopped.) in the clock synchronous serial i/o mode, the same clock is used for transmission and reception. if any one of transmission and reception is disabled, a bit error oc- curs because transmission and reception cannot be synchronized. in this mode, the clock circuit of the transmission circuit also oper- ates for data reception. accordingly, the transmission circuit does not stop by clearing only the transmit enable bit to ?0? (transmit disabled). also, the transmission circuit cannot be initialized even if the serial i/oi enable bit is cleared to ?0? (serial i/oi disabled) (same as (1)). (4) when signals are output from the s rdyi pin on the reception side by using an external clock, set all of the receive enable bit, the s rdyi output enable bit, and the transmit enable bit to ?1?. (5) when the s rdyi signal input is used, set the using pin to the in- put mode before data is written to the transmit/receive buffer register. 2. uart when the transmit operation is stopped, clear the transmit enable bit to ?0? (transmit disabled). same as (1) shown on the above ?1. clock synchronous serial i/o?. when the receive operation is stopped, clear the receive enable bit to ?0? (receive disabled). when the transmit/receive operation is stopped, clear the transmit enable bit to ?0? (transmit disabled) and receive enable bit to ?0? (receive disabled).
rej03b0156-0122 rev.1.22 mar 31, 2009 page 91 of 94 7547 group 3. notes common to clock synchronous serial i/o and uart (1) set the serial i/oi (i=1, 2) control register again after the trans- mission and the reception circuits are reset by clearing both the transmit enable bit and the receive enable bit to ?0.? fig. 6 sequence of setting serial i/oi control register again clear both the transmit enable bit (te) and the receive enable bit (re) to ?0? set the bits 0 to 3 and bit 6 of the serial i/oi control register set both the transmit enable bit (te) and the receive enable bit (re), or one of them to ?1? (2) the transmit shift completion flag changes from ?1? to ?0? with a delay of 0.5 to 1.5 shift clocks. when data transmission is controlled with referring to the flag after writing the data to the transmit buffer register, note the delay. (3) when data transmission is executed at the state that an exter- nal clock input is selected as the synchronous clock, set ?1? to the transmit enable bit while the s clki is ?h? state. also, write to the transmit buffer register while the s clki is ?h? state. (4) when the transmit interrupt is used, set as the following se- quence. ? serial i/oi transmit interrupt enable bit is set to ?0? (disabled). ? serial i/oi transmit enable bit is set to ?1?. ? serial i/oi transmit interrupt request bit is set to ?0? after 1 or more instructions have been executed. ? serial i/oi transmit interrupt enable bit is set to ?1? (enabled). when the transmit enable bit is set to ?1?, the transmit buffer empty flag and transmit shift completion flag are set to ?1?. accordingly, even if the timing when any of the above flags is set to ?1? is selected for the transmit interrupt source, interrupt request occurs and the transmit interrupt request bit is set. (5) write to the baud rate generator (brgi) while the transmit/re- ceive operation is stopped. can be set with the ldm instruction at the same time notes on serial i/o1 1. i/o pin function when serial i/o1 is enabled. the pin functions of p1 2 /s clk1 and p1 3 /s rdy1 are switched to as follows according to the setting values of a serial i/o1 mode selec- tion bit (bit 6 of serial i/o1 control register (address 001a 16 )) and a serial i/o1 synchronous clock selection bit (bit 1 of serial i/o1 control register). (1) serial i/o1 mode selection bit ?1? : clock synchronous type serial i/o is selected. ? setup of a serial i/o1 synchronous clock selection bit ?0? : p1 2 pin turns into an output pin of a synchronous clock. ?1? : p1 2 pin turns into an input pin of a synchronous clock. ? setup of a s rdy1 output enable bit (srdy) ?0? : p1 3 pin can be used as a normal i/o pin. ?1? : p1 3 pin turns into a s rdy1 output pin. (2) serial i/o1 mode selection bit ?0? : clock asynchronous (uart) type serial i/o is selected. ? setup of a serial i/o1 synchronous clock selection bit ?0?: p1 2 pin can be used as a normal i/o pin. ?1?: p1 2 pin turns into an input pin of an external clock. ? when clock asynchronous (uart) type serial i/o is selected, it functions p1 3 pin. it can be used as a normal i/o pin. note on bus collision detection when serial i/o1 is operating at half-duplex communication, set bus collision detection interrupt to be disabled. notes on serial i/o2 1. i/o pin function when serial i/o2 is enabled the pin functions of p0 6 /s clk2 and p0 7 /s rdy2 are switched to as follows according to the setting values of a serial i/o2 mode selec- tion bit (bit 6 of serial i/o2 control register (address 0030 16 )) and a serial i/o2 synchronous clock selection bit (bit 2 of serial i/o2 con- trol register). (1) serial i/o2 mode selection bit ?1? : clock synchronous type serial i/o is selected. ? setup of a serial i/o2 synchronous clock selection bit ?0? : p0 6 pin turns into an output pin of a synchronous clock. ?1? : p0 6 pin turns into an input pin of a synchronous clock. ? setup of a s rdy2 output enable bit (srdy) ?0? : p0 7 pin can be used as a normal i/o pin. ?1? : p0 7 pin turns into a s rdy2 output pin. (2) serial i/o2 mode selection bit ?0? : clock asynchronous (uart) type serial i/o is selected. ? setup of a serial i/o2 synchronous clock selection bit ?0?: p0 6 pin can be used as a normal i/o pin. ?1?: p0 6 pin turns into an input pin of an external clock. ? when clock asynchronous (uart) type serial i/o is selected, it functions p0 7 pin. it can be used as a normal i/o pin.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 92 of 94 7547 group notes on watchdog timer 1. the watchdog timer is operating during the wait mode. write data to the watchdog timer control register to prevent timer un- derflow. 2. the watchdog timer stops during the stop mode. however, the watchdog timer is running during the oscillation stabilizing time after the stp instruction is released. in order to avoid the un- derflow of the watchdog timer, the watchdog timer count source selection bit (bit 7 of watchdog timer control register (address 0039 16 )) before executing the stp instruction. 3. the stp instruction function selection bit (bit 6 of watchdog timer control register (address 0039 16 )) can be rewritten only once after releasing reset. after rewriting it is disable to write any data to this bit. notes on reset pin 1. connecting capacitor in case where the reset signal rise time is long, connect a ce- ramic capacitor or others across the reset pin and the vss pin. and use a 1000 pf or more capacitor for high frequency use. when connecting the capacitor, note the following : ? make the length of the wiring which is connected to a capacitor as short as possible. ? be sure to verify the operation of application products on the user side. if the several nanosecond or several ten nanosecond impulse noise enters the reset pin, it may cause a microcomputer fail- ure. notes on a/d conversion 1. analog input pin make the signal source impedance for analog input low, or equip an analog input pin with an external capacitor of 0.01 f to 1 f. further, be sure to verify the operation of application products on the user side. an analog input pin includes the capacitor for analog voltage com- parison. accordingly, when signals from signal source with high impedance are input to an analog input pin, charge and discharge noise generates. this may cause the a/d conversion/comparison precision to be worse. 2. clock frequency during a/d conversion the comparator consists of a capacity coupling, and a charge of the capacity will be lost if the clock frequency is too low. this may cause the a/d conversion precision to be worse. accordingly, set f(x in ) in order that the a/d conversion clock is 250 khz or over during a/d conversion. 3. a/d conversion clock selection select f(x in )/2 as an a/d conversion clock by setting the a/d con- version clock selection bit (bit 3 of a/d control register (address 0034 16 )) when rc oscillation is used. the f(x in ) can be also used as an a/d conversion clock only when ceramic oscillation or on-chip oscillator is used. 4. read a/d conversion register ? 8-bit read read only the a/d conversion low-order register (address 0035 16 ). ?10-bit read read the a/d conversion high-order register (address 0036 16 ) first, and then, read the a/d conversion low-order register (ad- dress 0035 16 ). in this case, the high-order 6 bits of address 0036 16 returns ?0? when read. 5. a/d conversion accuracy as for ad translation accuracy, on the following operating condi- tions, accuracy may become low. (1) since the analog circuit inside a microcomputer becomes sen- sitive to noise when v ref voltage is set up lower than vcc voltage, accuracy may become low rather than the case where v ref voltage and vcc voltage are set up to the same value.. (2) when v ref voltage is lower than [ 3.0 v ], the accuracy at the low temperature may become extremely low compared with that at room temperature. when the system would be used at low temperature, the use at v ref =3.0 v or more is recom- mended.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 93 of 94 7547 group notes on clock generating circuit 1. switch of ceramic and rc oscillations after releasing reset, the oscillation mode selection bit (bit 5 of cpu mode register (address 003b 16 )) is ?0? (ceramic oscillation selected). when the rc oscillation is used, after releasing reset, set this bit to ?1?. 2. double-speed mode the double-speed mode can be used only when a ceramic oscilla- tion is selected. do not use it when an rc oscillation is selected. 3. cpu mode register oscillation mode selection bit (bit 5), processor mode bits (bits 1 and 0) of cpu mode register (address 003b 16 ) are used to select oscillation mode and to control operation modes of the microcom- puter. in order to prevent the dead-lock by erroneously writing (ex. program run-away), these bits can be rewritten only once after re- leasing reset. after rewriting, it is disabled to write any data to the bit. (the emulator mcu ?m37542rss? is excluded.) also, when the read-modify-write instructions (seb, clb, etc.) are executed to bits 2 to 4, 6 and 7, bits 5, 1 and 0 are locked. 4. clock division ratio, x in oscillation control, on-chip oscillator control the state transition shown in fig. 78 can be performed by setting the clock division ratio selection bits (bits 7 and 6), x in oscillation control bit (bit 4), on-chip oscillator oscillation control bit (bit 3) of cpu mode register. be careful of notes on use in fig. 78. 5. on-chip oscillator operation when the mcu operates by the on-chip oscillator for the main clock, connect x in pin to v cc through a 1 k ? to 10 k ? resistor and leave x out pin open. the clock frequency of the on-chip oscillator depends on the sup- ply voltage and the operation temperature range. be careful that this margin of frequencies when designing applica- tion products. 6. ceramic resonator when the ceramic resonator is used for the main clock, connect the ceramic resonator and the external circuit to pins x in and x out at the shortest distance. externally connect a damping resis- tor rd depending on the oscillation frequency. a feedback resistor is built-in. use the resonator manufacturer?s recommended value because constants such as capacitance depend on the resonator. 7. rc oscillation when the rc oscillation is used for the main clock, connect the x in pin and x out pin to the external circuit of resistor r and the capacitor c at the shortest distance. the frequency is affected by a capacitor, a resistor and a micro- computer. so, set the constants within the range of the frequency limits. notes on oscillation control 1. oscillation stop detection circuit (1) when the stop mode is used, set the oscillation stop detection function to ?invalid?. (2) when the ceramic or rc oscillation is stopped by the x in oscil- lation control bit (bit 4 of cpu mode register (address 003b 16 )), set the oscillation stop detection function to ?invalid?. 2. stop mode (1) when the stop mode is used, set the oscillation stop detection function to ?invalid?. (2) when the stop mode is used, set ?0? ( stp instruction enabled) to the stp instruction function selection bit of the watchdog timer control register (bit 6 of watchdog timer control register (address 0039 16 )). (3) the oscillation stabilizing time after release of stp instruction can be selected from ?set automatically ?/?not set automati- cally? by the oscillation stabilizing time set bit after release of the stp instruction (bit 0 of misrg (address 0038 16 )). when ?0? is set to this bit, ?01 16 ? is set to timer 1 and ?ff 16 ? is set to prescaler 1 automatically at the execution of the stp instruc- tion. when ?1? is set to this bit, set the wait time to timer 1 and prescaler 1 according to the oscillation stabilizing time of the oscillation. also, when timer 1 is used, set values again to timer 1 and prescaler 1 after system is returned from the stop mode. (4) do not execute the stp instruction during the a/d conversion. notes on on-chip oscillation division ratio ? when the clock division ratio is switched from f(x in ) to on-chip oscillator by the clock division ratio selection bits (bits 7 and 6 of cpu mode register (address 003b 16 )), the on-chip oscillator divi- sion ratio (bits 1 and 0 of on-chip oscillation division ratio selection register (address 0037 16 )) is ?10 2 ? (on-chip oscillator middle-speed mode (r osc /8)). 8. external clock when the external signal clock is used for the main clock, connect the x in pin to the clock source and leave x out pin open. select ?0? (ceramic oscillation) to oscillation mode selection bit. 9. count source (timer 1, timer a, timer b, timer x, serial i/o, serial i/o2, a/d converter, watchdog timer) the count sources of these functions are affected by the clock di- vision selection bit of the cpu mode register. the f(x in ) clock is supplied to the watchdog timer when selecting f(x in ) as the cpu clock. the on-chip oscillator output is supplied to these functions when selecting the on-chip oscillator output as the cpu clock. however, the watchdog timer is also affected by the function set rom.
rej03b0156-0122 rev.1.22 mar 31, 2009 page 94 of 94 7547 group notes on oscillation stop detection circuit 1. after the reset by the oscillation stop detection, the value of fol- lowing bits are retained, not initialized. ? ceramic or rc oscillation stop detection function active bit bit 1 of misrg (address 003b 16 ) ? oscillation stop detection status bit bit 3 of misrg 2. oscillation stop detection status bit is initialized (?0?) by the fol- lowing operation. ? external reset ? write ?0? data to the ceramic or rc oscillation stop detection function active bit. 3. the oscillation stop detection circuit is not included in the emu- lator mcu ?m37542rss?. note on power source voltage when the power source voltage value of a microcomputer is less than the value which is indicated as the recommended operating conditions, the microcomputer does not operate normally and may perform unstable operation. in a system where the power source voltage drops slowly when the power source voltage drops or the power supply is turned off, reset a microcomputer when the supply voltage is less than the recommended operating conditions and design a system not to cause errors to the system by this unstable operation. notes on hardware handling of power source pin in order to avoid a latch-up occurrence, connect a capacitor suit- able for high frequencies as bypass capacitor between power source pin (vcc pin) and gnd pin (vss pin). besides, connect the capacitor to as close as possible. for bypass capacitor which should not be located too far from the pins to be connected, a ce- ramic capacitor of 0.01 f to 0.1 f is recommended. notes on qzrom product shipped in blank as for the product shipped in blank, renesas does not perform the writing test to user rom area after the assembly process though the qzrom writing test is performed enough before the assembly process. therefore, a writing error of approx.0.1 % may occur. moreover, please note the contact of cables and foreign bodies on a socket, etc. because a writing environment may cause some writing errors. precautions regarding overvoltage make sure that voltage exceeding the v cc pin voltage is not ap- plied to other pins. in particular, ensure that the state indicated by bold lines in figure below does not occur for cnv ss pin (v pp power source pin for qzrom) during power-on or power-off. otherwise the contents of qzrom could be rewritten. fig. 7 timing diagram (bold-lined periods are applicable) v cc pin voltage cnv ss pin voltage ?l? input 1.8v 1.8v (1) input voltage to other mcu pins rises before v cc pin voltage. (2) input voltage to other mcu pins falls after v cc pin voltage. note: the internal circuitry is unstable when v cc is below the minimum voltage specification of 1.8v (shaded portion), so particular care should be exercised regarding overvoltage. notes on qzrom writing orders when ordering the qzrom product shipped after writing, submit the mask file (extension: .msk) which is made by the mask file converter mm. ? be sure to set the rom option data* setup when making the mask file by using the mask file converter mm.. the rom code protect is specified according to the rom option data* in the mask file which is submitted at ordering. note that the mask file which has nothing at the rom option data* or has the data other than ?00 16 ? and ?ff 16 ? can not be accepted. ? set ?ff 16 ? to the rom code protect address in rom data re- gardless of the presence or absence of a protect. when data other than ?ff 16 ? is set, we may ask that the rom data be sub- mitted again. * rom option data: mask option noted in mm data required for qzrom writing orders the following are necessary when ordering a qzrom product shipped after writing: 1. qzrom writing confirmation form* 2. mark specification form* 3. rom data...........mask file * for the qzrom writing confirmation form and the mark specifi- cation form, refer to the ?renesas technology corp.? homepage (http://www.renesas.com/homepage.jsp). note that we cannot deal with special font marking (customer's trademark etc.) in qzrom microcomputer.
1.00 oct 14,2005 1.10 jun 05, 2006 1.20 aug 30, 2006 1.21 nov 15, 2006 1.22 mar 31, 2009 first edition issued ?preliminary? eliminated. package revised. prsp0036ga-a prsp0036ga-b power dissipation added. fig.1: part number added. power source voltage (at on-chip oscillator) and power dissipation added. memory expansion plan: ?under development? eliminated. notes on use (2): $0bn 1 - 2
2 - 2 revision history rev. date description page summary 7547 group datasheet - power-on reset circuit characteristics: tw(v por ) limits max. and min. values changed. - low voltage detection circuit characteristics: tw(v lvd ) and tw (v lvd -v det ) eliminated. v det- v det , v(v det+- v det- ) deleted. - fig. 99 revised. - ?1. processor status register? revised - the last fig. 2 sequence of plp instruction execution deleted. - figure title of fig. 3 revised ?4. modifying output data with bit managing instruction? revised. - ?precautions regarding overvoltage? added - ?notes on qzrom writing orders? revised. 80 86 87 94 1.22 mar 31, 2009 all trademarks and registered trademarks are the property of their respective owners.
notes: 1. this document is provided for reference purposes only so that renesas customers may select the appropriate renesas product s for their use. renesas neither makes warranties or representations with respect to the accuracy or completeness of the information contained in this document nor grants any license to any intellectual property rights or any other rights of renesas or any third party with respect to the information in this document. 2. renesas shall have no liability for damages or infringement of any intellectual property or other rights arising out of t he use of any information in this document, including, but not limited to, product data, diagrams, charts, programs, algorithms, and application circuit examples. 3. you should not use the products or the technology described in this document for the purpose of military applications such as the development of weapons of mass destruction or for the purpose of any other military use. when exporting the products or technology described herein, you should follow the applicable export control laws and regulations, and procedures required by such laws and regulations. 4. all information included in this document such as product data, diagrams, charts, programs, algorithms, and application ci rcuit examples, is current as of the date this document is issued. such information, however, is subject to change without any prior notice. before purchasing or using any renesas products listed in this document, please confirm the latest product information with a renesas sales office. also, please pay regular and careful attentio n to additional and different information to be disclosed by renesas such as that disclosed through our website. (http://www.renesas.com ) 5. renesas has used reasonable care in compiling the information included in this document, but renesas assumes no liability whatsoever for any damages incurred as a result of errors or omissions in the information included in this document. 6. when using or otherwise relying on the information in this document, you should evaluate the information in light of the t otal system before deciding about the applicability of such information to the intended application. renesas makes no representations, warranties or guaranties regarding th e suitability of its products for any particular application and specifically disclaims any liability arising out of the application and use of the information in this do cument or renesas products. 7. with the exception of products specified by renesas as suitable for automobile applications, renesas products are not desi gned, manufactured or tested for applications or otherwise in systems the failure or malfunction of which may cause a direct threat to human life or create a risk of h uman injury or which require especially high quality and reliability such as safety systems, or equipment or systems for transportation and traffic, healthcare, combustion co ntrol, aerospace and aeronautics, nuclear power, or undersea communication transmission. if you are considering the use of our products for such purposes, please contact a r enesas sales office beforehand. renesas shall have no liability for damages arising out of the uses set forth above. 8. notwithstanding the preceding paragraph, you should not use renesas products for the purposes listed below: (1) artificial life support devices or systems (2) surgical implantations (3) healthcare intervention (e.g., excision, administration of medication, etc.) (4) any other purposes that pose a direct threat to human life renesas shall have no liability for damages arising out of the uses set forth in the above and purchasers who elect to us e renesas products in any of the foregoing applications shall indemnify and hold harmless renesas technology corp., its affiliated companies and their officers, dir ectors, and employees against any and all damages arising out of such applications. 9. you should use the products described herein within the range specified by renesas, especially with respect to the maximum rating, operating supply voltage range, movement power voltage range, heat radiation characteristics, installation and other product characteristics. renesas sha ll have no liability for malfunctions or damages arising out of the use of renesas products beyond such specified ranges. 10. although renesas endeavors to improve the quality and reliability of its products, ic products have specific characteristic s such as the occurrence of failure at a certain rate and malfunctions under certain use conditions. please be sure to implement safety measures to guard against the poss ibility of physical injury, and injury or damage caused by fire in the event of the failure of a renesas product, such as safety design for hardware and software includin g but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures. among others, sinc e the evaluation of microcomputer software alone is very difficult, please evaluate the safety of the final products or system manufactured by you. 11. in case renesas products listed in this document are detached from the products to which the renesas products are attached or affixed, the risk of accident such as swallowing by infants and small children is very high. you should implement safety measures so that renesas products may not be easily detached from your products. renesas shall have no liability for damages arising out of such detachment. 12. this document may not be reproduced or duplicated, in any form, in whole or in part, without prior written approval from r enesas. 13. please contact a renesas sales office if you have any questions regarding the information contained in this document, renes as semiconductor products, or if you have any other inquiries. sales strategic planning div. nippon bldg., 2-6-2, ohte-machi, chiyoda-ku, tokyo 100-0004, japan http://www.renesas.com refer to " http://www.renesas.com/en/network " for the latest and detailed information. renesas technology america, inc. 450 holger way, san jose, ca 95134-1368, u.s.a tel: <1> (408) 382-7500, fax: <1> (408) 382-7501 renesas technology europe limited dukes meadow, millboard road, bourne end, buckinghamshire, sl8 5fh, u.k. tel: <44> (1628) 585-100, fax: <44> (1628) 585-900 renesas technology (shanghai) co., ltd. unit 204, 205, aziacenter, no.1233 lujiazui ring rd, pudong district, shanghai, china 200120 tel: <86> (21) 5877-1818, fax: <86> (21) 6887-7858/7898 renesas technology hong kong ltd. 7th floor, north tower, world finance centre, harbour city, canton road, tsimshatsui, kowloon, hong kong tel: <852> 2265-6688, fax: <852> 2377-3473 renesas technology taiwan co., ltd. 10th floor, no.99, fushing north road, taipei, taiwan tel: <886> (2) 2715-2888, fax: <886> (2) 3518-3399 renesas technology singapore pte. ltd. 1 harbour front avenue, #06-10, keppel bay tower, singapore 098632 tel: <65> 6213-0200, fax: <65> 6278-8001 renesas technology korea co., ltd. kukje center bldg. 18th fl., 191, 2-ka, hangang-ro, yongsan-ku, seoul 140-702, korea tel: <82> (2) 796-3115, fax: <82> (2) 796-2145 renesas technology malaysia sdn. bhd unit 906, block b, menara amcorp, amcorp trade centre, no.18, jln persiaran barat, 46050 petaling jaya, selangor darul ehsan, m alaysia tel: <603> 7955-9390, fax: <603> 7955-9510 renesas sales offices ? 200 9. re nesas technology corp ., all rights reser v ed. printed in ja pan. colophon .7.2


▲Up To Search▲   

 
Price & Availability of M37547G2-XXXFP

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