TMP47C440AN TOSHIBA

Document overview

  • Manufacturer or author: Provided By digicamel.com
  • PDF pages: 18

Technical content

CMOS 4-BIT MICROCONTROLLER TMP47C440AN TMP47C440AF The 47C440A has 8-bit A/D converter and watchdog timer based on the TLCS-47 CMOS series. TMP47C440AF QFP44 TMP47C940AG

FEATURES

@4-bit single chip microcomputer spipaz instruction execution time : 1.9ps (at 4.2MHz) 90 basic instructions a Table look-up instructions a oy #5-bit to 8-bit data conversion instruction a Pu @Subroutine nesting : 15 levelsmax. Co a #6 interrupt sources (External : 2, Internal : 4) Mega All sources have independent latches each, and multiple TMP47C440AN interrupt control is available 1/0 port (34 pins) QFrag e Input 2ports Spins * Output 2ports 8pins * V0 6ports 2 pins a “Ss, interval timer ie Pe) @Two 12-bit Timer/Counters Vg Timer, event counter, and pulse width measurement mode Watchdog Timer TMPATCAOAF Serial Interface with 4-bit buffer External/internal clock, leading/trailing edge shift mode soicaa 8-bit successive approximate type A/D converter ee + With sample and hold oot * Banalog inputs gh © Converting time | 48s (4MHz) nan ei #High current outputs . “yt LED direct drive capability (typ. 20mA x 8bits) TMP47C940AE #Hold function Battery/Capacitor back-up Qrcaa @Real Time Emulator : BM47214A ptalGier. Qe TMP47C940AG 00900 5-259

PIN ASSIGNMENTS (TOP VIEW) a) SDIP42 (2) QFP44 vance —eQ1 a2 D<— voo > iets vass eth a Per 92600 ace rao (aino) {3 20 [<> 991,50) nao EES Zaman Rai(aint) +=(fa 39 <> R90(51) wee keener we ve aaranay <=> s 33 fee nanny reed tdhd dy Raz (AiN3) —+>(] 6 37 [<> Re2 (ini) (] no oo f] q qj no RSO(AINa) => U7 36 [+= Rei(ta) OHARA nARAD asi(ains) > 8 35 [> argo (inT2) 33 32 31 30 29 28 27 26 25 24 23 as2(ane) +> Q9 34 [<— HOLD iKEO) ROS(AINT) 10 33 je RESET. 63 (Ty CTH 3a 22 AT x00 Reo wee ao xour R91 (sO) +> COT) 36 20 (4) — P22 rer (12 uD xin R92 (SCK) 37 19 PI — pra ee rer eT 13 30 f<— test NC. CTH 38 a 20 res ml ia 29 fl<— Ko3 varer —® COO] ao 16 (IT + vss aro «(lis 28 [}<— Koz vass —> Cort) ar 15 FO) — P33 aniwro) ==U16 27 P< «or Rag (aino) > (OT a2 iE R41 (AIN1) > CIT) 43 13 PL — pit pio Gir 26 D<— xoo a2 (ain2) <> CoOL aa 12 FIL —> rio pu ie 2s []}— p23 HAAR AAA AAG pi3 <— [] 20 23 > par ws =e tf 2 fo UOUCUCOUDE eee ddd arTaeerer ye oO 22222 eee als BLOCK DIAGRAM aaaaa = Power Sunpty 4 ¥DO (vss pe as : ss weno TES sack rn Ol feretinput RESE System controller pin (2ch) | O Gi ai igi i iS O Gt [+] [re ] [we] | | {lJ [0] R71 (WTO) R63 P23) P13 RB (TIT R92 (5CK) VAREF R43(AIN3) — R53(AIN7) 03 R70 ‘ ‘ ‘ 82 (iNT) R91(SO) Vass. 1 1 1 i 7 REO P20 Lal ‘RB1(T2) R90 (SI) RAO{AINO) RSO{AINA) K00 watchdog timer) 110 port R80 (INT) ———~" output High current VO port VO port | Analog WO port Input port output port TC input (Senat port) relerence (Analog input) 260290 5-260

Piz = P10 | 4-bit output port with latch Output | 8-bit data are output by the 5-bit to 8-bit data conversion instruction [OUTB @HL] R43 (AIN3) | | @-biLVO port with lath R40 (AINO} i (AINO) vo (input) When used as input port or analog input, | a/0 converter analog input R53 (AIN7) | the latch must be set to "1" R50 (AINA) R63 - R60 4-bit /O port with latch R71 (WTO) vo(Outpary | 7P*WOPorewith latch Watchdog timer output When used as input port or watchdog timer R70 fe) output, the latch must be set to "1" R83 (Th) Timer/Counter 1 external input 4-bit /O port with batch R82 (INT?) 1 unt) vO (input) When used as input port, external interrupt | £*terne! interrupt t input Ret (12) input pin, or timericounter external input | timer/Counter 2 external input pin, the latch must be set to “1” R80 (INT2) External interrupt 2input R92 (SC 4vO(VO} Serial clock VO 92 (SCK) ) 3-bit MO port with latch erate R91 (SO) VO (Output) When used as input port or serial port, the | Serial data output latch must be set to "1" R90 (Si) VO (Input) Serial data input XIN input Resonator connecting pins your Output For inputting external clock, XIN is used and XOUT is opened RESET input Reset signal input vDO +5V vss OV (GNO) Power supply VAREF AID converter analog reference voltage (High) VASS AID converter analog reference voltage (Low) 380290 5-261

Conserning the 47C440A, the hardware configuration and operation of hardwares are described. As the description is porvided with priority on those parts deffering from the 47C400A, the technical data sheets for the 47C400A shall also be referred to. 1. SYSTEM CONFIGURATION (1) 1/0 Ports (2) A/D Converter (3) Watchdog Timer 2. PERIPHERAL HARDWARE FUNCTION

2.1 Ports

The 47C440A has 10 VO ports (34 pins) each as follows : a) KO ) 4-bitinput 2) P1,P2 ) 4-bit output 3. R4,R5 ; 4-bit input/output (shared with the A/D converter analog inputs) A RE } 4-bit input/output © R7 ; 2-bit input/output (shared with the watchdog timer output)

6 R8 | 4-bit input/output(shared with external interrupt request input and

timer/counter input) DRO | 3-bit input/output (shared with serial port) ‘8 KE ; 1-bit sense input (shared with hold request/release signal input) This section describes ports of (3) and ) which are changed from the 47C400A. Table 2-1 lists the port address assignments and the I/O instructions that can access the ports. (1) Ports R4 (R43-R40), RS (R53-R50) Ports R4 and RS are 4-bit I/O ports with latch shared by the analog inputs for A/D converter. When used as an input ports or analog inputs, the latch should be set to “1”. If other port is used as an output, be careful not to execute the output instruction for any port during A/D conversion in order to keep accuracy of conversion. The latch is initialized to "1" and analog input is selected R40 (AINO) pin during reset Port R4 (Port address OPO4/iP04) Analog input selector 3 2 1 ) ab Analog input cn mere (AIN3) (AIN2) (AINT) (AINO) Input data <} Port RS (Portaddress OP0S/1P05) 3 2 1 0 i R53 R52 RS) R50 (AIN7) (AIN6). (AINS) (Aina) Output data > PIN Figure 2-1. PortR4 and RS (2) Port R7 (R71, R70) Port R7 is 2-bits /O port with latch. R71 pin is shared by the watchdog timer output. To use R71 pin for the watchdog timer output, the latch should be set to "1". The latch is initialized to "1" during reset. R70 pin is normal I/O pin. R72 and R73 pins do not exist actually but "1" is read when an input instruction is executed IN/ TEST / TESTP Port R7 (Port address OPO7/1P07) R71 R70 Output data (+n (WTO) = WTO output Figure 2-2. Port R7 250290 5-262

i! —— ag rs Ac EPOQHMOMOAMD11O101 2.2 ag SK Proc cece ev ena «| &% | &d gs) z : =: © g e| @ [fom heehee rer rer alee rr etree evans o 3. ° g s/s Sy 3 a} = 5 fl é BE POO GOGI tr rOfe rr reer rere as £ bE ° 5 g fe) 2 — a 2 2 a= a 3 &z fava - 5 > €§ [POO FOOMGLO Hh rt OOOO Ge 1O11ourg R < a 2 no] 2>2 a c foXe} a 0 = 5 2 z g§ & <@] . 2 fa € € [900 1O00000! 10000 g kx & a zz s 3 xy < es 4 = & 3 8 s§ = . 2 as a c ict 5 eo? ol 5 2 S 8 ge < ? f § g £ BE a Ss = sje ss ° 5 ge § 2° 3 s an eo ¢ “8 ba £e . & grr EER EEL e|P2 ¢% sslUe|llCUE - S| 55 555555 qe £9 £ Fy Se s s8 &f i 3 g22,888888 fle gf ¢ z2 Ss S82 a | Lssleessssli{/l88les(8lilellesl gs 2 a21aaaaaa seize l s 3 CSle 828 so 35 333553 s/f 82% € 3) Se al Fe 8 @6 8688888 g|2 90 & = gb 3 3 2 rd =n nynLon ag alo ss . ov at < as eeeeee 32 22 3 fee 8 8 é > s§ se sé 23 & 3 é gg Bs ~ ne 8 ? 8s gos $8 a 2 4 of = . 35. Paes ale Clever 22ae =3 E/SSe S55555 eb E e$ aoe; aakada S¢Se4ovpvvepvepvevevvyy § 2 Sss3|/eeeees ZZSRSLILSSLLVVVBssy se

3221333353 BsoslCSesesesseeceees| EX

235 g223a8 Sst eeSzaseszaeeasaaa| § 3 see ecccce COSMIvvvosyyyyseseges SLN suenae SSOglEe SPP PEEL PERE LER [2 | Let 2882228 2zhsssssssssssssssssy |g zin-|. Sai |losoamesunwenwadmauduuld-ameunon ware = 4 PSt |SsSSSSSSSSSSYSSyorarsvereadevuows| TY < 55 260250 5-263

2.2 A/D Converter

The 47C440A has a 8-bit successive approximate type A/D converter and is capable of processing 8 analog inputs.

2.2.1 Circuit configuration

AINO L}H- Reference Voltage 7 | : Analog | Compa> ‘ Sample rator, ‘ | input +l 5 old ~ Successive Approximate Circuit ae] Control Circuit POD opi2 _ opis a oe Analoginpurseiecor | | 3. 2 1 «OO 30°21 0 3 tC) LRp=t TRo=0 Figure 2-3. Block Diagram of A/D Converter

2.2.2 Control of A/D converter

The operation of A/D converter is controlled by a command. The command register is accessed as port adderesses OP 12 and OP13. A/D converted value and end of conversion flag (EOCF) can be known by accessing port addresses IPOD and IPOC. (1) Analog input selector Analog inputs (AINO through AIN7) are selected by values of this register. Analog input select command register (Portaddress OP 12) 3 2 1 0 0000: R40(AINO) 0001: R41(AIN1) 0010: R42(AiN2) 0011: R43(AIN3) 0400: RSO(AINA) 0101: R51(AINS) 0110: R52(AIN6) 0111: R53(AIN7) Note.*,; don'tcare 1+ +4: Analog input isnot selected Figure 2-4. Analog input selector Wame 5-264

2.2.3. How to use A/D converter Apply positive of analog reference voltage to the VAREF pin and negative to the VASS pin. The A/D conversion is carried out by splitting reference voltage between VAREF and VASS to bit corresponding voltage by a ladder resistor and making a judgement by comparing it with analog input voltage. (1) Start of A/D conversion Prior to conversion, select one of the analog input AINO through AIN7 by the analog input selector. Place output of the analog input, which is to be A/D converted, in the high impedance state by setting "1". If other port is used as an output, be careful not to execute the output instruction for any port during conversion in order to keep accuracy of conversion. A/D conversion is started by setting ADS (bit 1 of the A/D conversion start register). When conversion ends after 24 instruction cycles, EOCF showing the end of conversion is set to "1". (2) Reading of an A/D converted value After the end of conversion, read an A/D converted value is read by splitting into lower 4 bits and upper 4 bits by the A/D converted value register (IPOD) Lower 4 bits of the A/D converted value can be read when LRo = 0 and upper 4 bits when LRo = 1. Usually an A/D converted value is stored in RAM by an instruction [IN %p, @HL]. Further, if an A/D converted value is read during the conversion, it becomes an indefinite value. (3) A/D conversion with HOLD operation When the HOLD operation is started during the conversion, the conversion is terminated and an A/D converted value becomes indefinite. Therefore, EOCF is kept clear to “0” after release from the HOLD operation. However, if the HOLD operation is started after the end of A/D conversion (after EOCF has been set), A/D converted value and status of EOCF are held Example Selecting analog input (AINA) , starting A/D conversion, monitoring EOCF and storing lower 4 bits and upper 4 bits of a converted value to RAM [104] and RAM [114] respectively LO A, #4 ; Selects analog input (AIN4) OUT A, %OP12 LD A, #1 ; Start of A/D conversion OUT A, %0P13 SLOOP : TEST *IPOC, 3 ; To wait until EOCF goes to “1 B SLOOP Lo HL, #10H ; HL 104 IN %IPOD, @HL ; RAM [10y] — Lower 4 bits INC L : Increment of L registers IN %1POD, @HL ; RAM [11H] <— Upper 4 bits W290 5-266

2.3 Watchdog Timer (WDT)

The purpose of the watchdog timer is to detect the malfunction (ranaway) of program due to external noise or other causes and return the operation to the normal condition The watchdog timer output is output to R71 must be set to “1”. Further, during reset, the output latch of R71 isset to "1", and the watchdog timer becomes disable state. The initialization at time of runaway will become possible when the WTO pin and RESET pin are connected each other. 2.3.1. Configuration of Watchdog Timer The watchdog timer consists of 3-stage binary counter, flip-flop (F/F), and its control circuit. The F/F is set to "1" during reset, and cleared to “0” at the rising edge of the binary counter output. BinaryCounter CPU reset 241 fe . ‘ [ FIF t External Circuit Bife +(s ! 26/4 Selector Clear Request LE ' “art (WTO) Interval Timer ops i? opo7 ' R7 Output Latch . 3 21 0 30 21 0 7 it it ReseT Simplified i FT Pomer-onreset Figure 2-8. Watchdog Timer

2.3.2 Control of watchdog timer

The watchdog timer is controlled by the command register (OP 15). This command register is initialized to “1000g" during reset. The following are procedure to detect the malfunction (runaway) of CPU by the watchdog timer. © At first, detection time of the watchdog timer should be set and binary counter should be cleared. ‘2 The watchdog timer should be become enable. Binary counter must be cleared before the detection time of the watchdog timer. When the runaway of CPU is taken place for some reason and binary counter is not cleared, the F/F is cleared to “O"at the rising edge of the binary counter and signal of runaway detection is become active (WTO output is "L” ) O99 5-267

Watchdog Timer control command register (Port address P15) 3 2 1 0 | | 0: Clears binary counter (Alter clear, automatically “1” is set) , | Enable/Disabie 0: Disable | 1: Enable Example : At {c= 4,19MHz 00: 2*7/ fc [sec] 31.25 [ms] OL 2197 Ee 125 10: 224/fe 500 Note. fc; Basic clock frequency [Hz] Ws 24ife 4000 Figure 2-9. Command Register Example: To set the watchdog detection time (221 / fc[sec] ). And to enable the watchdog timer. LO A, #00108 ; OP15 © 0010, (Sets WOT detection time. Clears binary counter) OUT A, ZOP15 LD A, #11108 ; OP15 + 1110, (Enables WOT) OUT A, %OP15 Within WOT : detection time LD A, #0110B ; OP15 © 0110, (Clears binary counter) OUT A, ZOP16 Note. It is not necessary to set RWT to “I”. Note that both EWT (Enable Watchdog Timer) and RWT should not be set to “1” at the same time 260250 5-268

ELECTRICAL CHARACTERISTICS

ABSOLUTE MAXIMUM RATINGS (Vss = OV) Output Voltage Voura | Ports P1, P2, R6-R9 -0.5t0 10 Vv Output Current (Per 1 pin) RECOMMENDED OPERATING CONDITIONS (Vss = OV, Topr = - 30 to 70°C) [nienenaimese| «3 _| Supply Voltage Vpo Vv Vop24.5V Voo = 4.5V re Note. Input voltage Vin3, Viz : in the HOLD mode 2AO2H ~ ~ 5-269

D.C. CHARACTERISTICS (Vss = OV, Topr = ~ 30 to 70°C) Port KO, TEST, line epee ") | RESET, HOLD Vop=5.5V, input Current Vi 5.5V/0V +2 | pa liz | Ports R (open drain) Input Resistance — KQ Ry [Reser [| ho | 220 | a0 Output Leakage Current ho Ports R (open drain) Vop = 5.5V, Vout =5.5V [- | -| 2 HA Supply Current A if Vop = 5.5V, fe = 4MH; ™ (in the Normal mode) | °° ee ‘ 2 3 § Supply Current . {in the HOLO mode) | '20" Voo=5.5V | - | os | 10 | ya Note 1. Typ. values show those at Topr = 25°C, Vop = 5V. Note 2. Input Current Iyy1 ;The current through resistor is not included, when the input resistor (pull- up/pull-down) is contained. Note 3. Supply Currentipp, loon; Vin =5.3V/0.2V The KO port is open when the input resistor is contained. The voltage applied to the R port is within the valid range. A/D CONVERSION CHARACTERISTICS (Topr = - 30 to 70°C) [were [owe [eon eo [or] [vee [vows =f ve | Analog Reference Voitage Vv cen Vpp = 5.0V, Vs5 = 0.0V aE Vanes = 5.000V Ls8 Vass =0.000V 260290 a 5-270

A.C. CHARACTERISTICS (Vs5 = OV, Vpp = 4.5 to 6.0V, Topr = - 30 to 70°C) [cen [omar [cova [in| ow [tan | om] [ronioncecrme fy [id - fl | External clock mode ns Low level Clock pulse Width twee fstonsietiw fm | me | | Note. Shift Data Hold Time aa Serial port (completion of transmission) External circuit for $CK pin and SO pin VOD 10KQ SoH F RECOMMENDED OSCILLATING CONDITIONS | (Vss=OV, Vop =4.5 to 6.0V, Topr = - 30 to 70°C) (1) 4MHz xin Our Ceramic Resonator CSA4.00MG (MURATA) —Cxin = Cxout = 30pF MHz KBR-4.00MS (KYOCERA) — Cxin = Cxout = 30pF ¢ Ol Crystal Oscillator “Ty J Cxout 204B-6F 4. 0000 (TOYOCOM) Cxin = Cxour = 20pF : (2) 400KHz XIN xOUT Ceramic Resonator CSB4008 (MURATA) Cxin = Cxout = 220pF, Rxout = 6.8K2 400KHz Rxou! KBR-400B (KYOCERA) Cxin = Cxout = 100pF, Rxout = 10K2 oI our z Cxour 360290 5-271

R=-Ta KO port R-Ta RESET pin R R 100 rl 400 Z vot Bea vot eT | VTTTT Coonan -40 0 40 80 (°C) =40 0 40 80 (°C) lou- Vou R port lou- Vou PI, P2 port lo lot mA pps 40 (mA | waiters [/T | | HE TIAL) «6ST TT TOA) “Pore yA | DAREER eee dee LA A Yeti ty. “YEE Et Tt 0 You 0 A Vou. top- Yoo Ipn-fe lop lop wafrecave TTT] mfiaesee’ | [IIIf es feet) CTT TT jucaaun pL PA Lied de an al 0 ees Yoo 0 ll fe 3 5 7 wv) On 04 4 4 10(MIlz) 260290 ~ 5-272

(1) Control pins The input/output circuitries of the 47C440A control pins are similar to that of the 47C400A. (2) W/O Ports The inpuvoutput circuitries of the 47C440A I/O ports are shown below, any one of the circuitries can be chosen by a code (SA-SC) as a mask option INPUT/OUTPUT CIRCUITRY and CODE [sa se i | Pull-up/ pull-down, oD | R resistor KO | input R Riw —hw-] | ew Rw Rin = 70KQ (typ.) R | R= 1kQ(typ.) Sink open drain output Pt Initial "Hi-Z" py Putput 5 High current | lou = 20m<A (typ.) Sink open drain p output Initial “Hi-2* Ra v0 AIN selector a R = 1KO (typ) RS Ca Ra Analog input L Ra=5K2 (typ.) | Ca = 12pF (typ.) Sink open drain *6 Initial "Hi ae a7 vo —Po—- initial “Hi- R R = 1KQ (typ) Sink open drain output Initial "Hi-2" RB ——Po— vO R Ro ‘ Hysteresis input R= 1KQ (typ) 260290 — 5-273

this Page Intentionally Left Blank-

CMOS 4-81T MICROCONTROLLER TMP47C940AE TMP47C940AG The 47C940A, which is equipped with an EPROM as program memory, is a piggyback type evaluator chip used for development and operational confirmation of the 47C440A/242A application systems (programs) The 47C940A is pin compatible with the 47C440A which are mask-programed ROM devices. Also, pin compatibility with the 47C242A is possible by using the 42-to-30 pin conversion adapter socket (BIM1113) PIN ASSIGNMENT (TOP VIEW) E ask i alzlg sesh 3e3 ans sDiCa2 QFCaa eeeltlegxe eo? LINN ono 00 3332 313029 18 27 2625 28 PF varee—ed i 42 P<—voo vass—eG 2 @)vec vec a1 De R92 BCR) attain) weg a AQYE COD SOB TE Roo isn repre @0O980GO0 2x00 Raaina) <= 5 ar vec G6) 38 em rear) 90035 pe Q@erulgewrer Qs MA sayin) 6 @as as (8) 37 Dee aot R91 (SO) HE yee GY FZ @ 4 20-322 aso(aina) <> 7 36 <> rei (12) 192 TK) yee @a Ae asvans)eeq a GAS 49 0%) 35 he» aso NTD) NC CBB vec @ @ we 18-320 Rs2iains) em 9 @)aa asi @) 34 P< HOG ED) yoo 39 yo no Vane AN?) x RESET meen DY FQ yh or vanet 20 Yop @ Bo idaauss never iz @)Ar a0 @) 31 P——xw VSM ADO one nge el Qu wean roe Gs Gai & GO) 30P+—tes1 nagar gy G ZF ABIAEA® _Q rar rei<> Gia ; 23 D<—xo3 ay (atv) 443 @OGO® nfsen 820 <> qs on 8 28 D<—Ko2 waz (nina) faa 80 2ESe10 anniv) +=G ic (i) 6 (8) 27 P*—xos P10 v : 26 P<—xoo ° an die 2" 2B sp 23 Lees erag on P29 GYR @ G6) 24D P22 FUUU UU J 13<—4.20 Gano 3 GS) BP worgn © © Berm a9995333325 33448 i PIN FUNCTION (Top of the package) aeeee Output vec | + 5V (connected with VDD) Powersupply | GNO | OV (connected with VSS) A.C. CHARACTERISTICS Vs5 = OV, Vop = 4.5 to 6 OV — Topr = - 3010 70°C Data Hold Time tae 50 ns 2509590 5-275