Toshiba TLCS-900 Bedienungsanleitung
- Schauen Sie die Anleitung online durch oderladen Sie diese herunter
- 260 Seiten
- 1.84 mb
Zur Seite of
Ähnliche Gebrauchsanleitungen
-
Computer Hardware
Toshiba TMP87CM24AF
132 Seiten 6.34 mb -
Computer Hardware
Toshiba L650
197 Seiten 6.6 mb -
Computer Hardware
Toshiba L650D
197 Seiten 6.6 mb -
Computer Hardware
Toshiba AR-B1376
69 Seiten 0.67 mb -
Computer Hardware
Toshiba SD-R5112
18 Seiten 0.34 mb -
Computer Hardware
Toshiba TX39
246 Seiten 0.71 mb -
Computer Hardware
Toshiba AR-B1375
69 Seiten 0.67 mb -
Computer Hardware
Toshiba L655
197 Seiten 6.6 mb
Richtige Gebrauchsanleitung
Die Vorschriften verpflichten den Verkäufer zur Übertragung der Gebrauchsanleitung Toshiba TLCS-900 an den Erwerber, zusammen mit der Ware. Eine fehlende Anleitung oder falsche Informationen, die dem Verbraucher übertragen werden, bilden eine Grundlage für eine Reklamation aufgrund Unstimmigkeit des Geräts mit dem Vertrag. Rechtsmäßig lässt man das Anfügen einer Gebrauchsanleitung in anderer Form als Papierform zu, was letztens sehr oft genutzt wird, indem man eine grafische oder elektronische Anleitung von Toshiba TLCS-900, sowie Anleitungsvideos für Nutzer beifügt. Die Bedingung ist, dass ihre Form leserlich und verständlich ist.
Was ist eine Gebrauchsanleitung?
Das Wort kommt vom lateinischen „instructio”, d.h. ordnen. Demnach kann man in der Anleitung Toshiba TLCS-900 die Beschreibung der Etappen der Vorgehensweisen finden. Das Ziel der Anleitung ist die Belehrung, Vereinfachung des Starts, der Nutzung des Geräts oder auch der Ausführung bestimmter Tätigkeiten. Die Anleitung ist eine Sammlung von Informationen über ein Gegenstand/eine Dienstleistung, ein Hinweis.
Leider widmen nicht viele Nutzer ihre Zeit der Gebrauchsanleitung Toshiba TLCS-900. Eine gute Gebrauchsanleitung erlaubt nicht nur eine Reihe zusätzlicher Funktionen des gekauften Geräts kennenzulernen, sondern hilft dabei viele Fehler zu vermeiden.
Was sollte also eine ideale Gebrauchsanleitung beinhalten?
Die Gebrauchsanleitung Toshiba TLCS-900 sollte vor allem folgendes enthalten:
- Informationen über technische Daten des Geräts Toshiba TLCS-900
- Den Namen des Produzenten und das Produktionsjahr des Geräts Toshiba TLCS-900
- Grundsätze der Bedienung, Regulierung und Wartung des Geräts Toshiba TLCS-900
- Sicherheitszeichen und Zertifikate, die die Übereinstimmung mit entsprechenden Normen bestätigen
Warum lesen wir keine Gebrauchsanleitungen?
Der Grund dafür ist die fehlende Zeit und die Sicherheit, was die bestimmten Funktionen der gekauften Geräte angeht. Leider ist das Anschließen und Starten von Toshiba TLCS-900 zu wenig. Eine Anleitung beinhaltet eine Reihe von Hinweisen bezüglich bestimmter Funktionen, Sicherheitsgrundsätze, Wartungsarten (sogar das, welche Mittel man benutzen sollte), eventueller Fehler von Toshiba TLCS-900 und Lösungsarten für Probleme, die während der Nutzung auftreten könnten. Immerhin kann man in der Gebrauchsanleitung die Kontaktnummer zum Service Toshiba finden, wenn die vorgeschlagenen Lösungen nicht wirksam sind. Aktuell erfreuen sich Anleitungen in Form von interessanten Animationen oder Videoanleitungen an Popularität, die den Nutzer besser ansprechen als eine Broschüre. Diese Art von Anleitung gibt garantiert, dass der Nutzer sich das ganze Video anschaut, ohne die spezifizierten und komplizierten technischen Beschreibungen von Toshiba TLCS-900 zu überspringen, wie es bei der Papierform passiert.
Warum sollte man Gebrauchsanleitungen lesen?
In der Gebrauchsanleitung finden wir vor allem die Antwort über den Bau sowie die Möglichkeiten des Geräts Toshiba TLCS-900, über die Nutzung bestimmter Accessoires und eine Reihe von Informationen, die erlauben, jegliche Funktionen und Bequemlichkeiten zu nutzen.
Nach dem gelungenen Kauf des Geräts, sollte man einige Zeit für das Kennenlernen jedes Teils der Anleitung von Toshiba TLCS-900 widmen. Aktuell sind sie genau vorbereitet oder übersetzt, damit sie nicht nur verständlich für die Nutzer sind, aber auch ihre grundliegende Hilfs-Informations-Funktion erfüllen.
Inhaltsverzeichnis der Gebrauchsanleitungen
-
Seite 1
TOSHIBA Original CMOS 32-Bit Microcontroller TLCS-900/H1 Series TMP92CM22FG Semiconductor Company[...]
-
Seite 2
Preface Thank you very much for making us e of Toshiba microcomputer LSIs. Before use this LSI, refer the section, “Points of Note and Restrictions”.[...]
-
Seite 3
TMP92CM22 2007-02-16 92CM22-1 CMOS 32-Bit Microcontrollers TMP92CM22FG 1. Outline and Device Characteristics TMP92CM22 is high -speed advanced 32-bit microc ontroller dev eloped for controlling equipment, which processes mass data. TMP92CM22FG is a microcontroller , which has a high-per formance CPU (900/H1 CP U) and various built-in I/Os. TMP92CM2[...]
-
Seite 4
TMP92CM22 2007-02-16 92CM22-2 (4) External memory expansion • Expandable up to 16 Mb ytes (Shared program/data area) • Can simultaneously support 8-/1 6- bit width external data bus ・・・ Dynamic data bus sizing • Separate bus system (5) Memory controller • Chip select output: 4 channels (6) 8-bit timers: 4 channels (7) 16-bit timers: 2[...]
-
Seite 5
TMP92CM22 2007-02-16 92CM22-3 Figure 1.1 TMP92CM22 Block Dia g ram XSP XIZ XI Y XIX XHL XDE XBC XWA 900/H1 CPU F SR 32 bits IX IY IZ SP L H E D C B A W P C 32-Kbyte RAM Serial I/O SIO0 PF1 (RXD0) PF0 (TXD0) DVSS [4] DVCC [3] Mode controller RESET AM0 AM1 Data bus D0 to D7 Port 5 10-bit 8-ch AD converter VREFL VREFH AVSS AVCC PG0 to PG7 (AN0 to AN7)[...]
-
Seite 6
TMP92CM22 2007-02-16 92CM22-4 2. Pin Assignment and Functions The assignment of input/outp ut pins for the TMP92CM22F G, their names and functions are as follows. 2.1 Pin Assignment Figure 2.1.1 shows the pin assignment of th e TMP92CM22FG. Figure 2.1.1 Pin Assignment Diagram (100-Pin Q FP) TMP92CM22 QFP100 Top view 1 5 10 15 20 25 75 70 65 60 55 1[...]
-
Seite 7
TMP92CM22 2007-02-16 92CM22-5 2.2 Pin Names and Functions The following tab les show the names and function s of the input/output pins. T able 2.2.1 Pin Names an d Functions (1/2) Pin Names Number of Pins I/O Functions D0 to D7 8 I/O Data (Lower): Data bus D0 to D7. P10 to P17 D8 to D15 8 I/O I/O Port 1: I/O port that allows I/O to be selected at t[...]
-
Seite 8
TMP92CM22 2007-02-16 92CM22-6 T able 2.2.2 Pin Names an d Functions (2/2) Pin Names Number of Pins I/O Functions PC0 TA0IN 1 I/O Input Port C0: I/O port. Timer input: 8-bit timer A0 input. PC1 INT1 TA1OUT 1 I/O Input Output Port C1: I/O port. Interrupt request pin 1: Interrupt request pin with programmable level/rising edge/falling edge. Timer outp[...]
-
Seite 9
TMP92CM22 2007-02-16 92CM22-7 3. Operation This section describes the bas ic components, functions and oper ation of the TMP92CM22. 3.1 CPU The TMP92CM22 incorporates a high -performan ce 32-bit CPU (The TLCS-9 00/H1 CPU). For a description of this C PU’ s operation, please refer t o the section of this data book which describes the TLCS-900/H1 C[...]
-
Seite 10
TMP92CM22 2007-02-16 92CM22-8 3.1.2 Reset Operation When resetting the TMP 92CM22 microcontrolle r , ensure that the powe r supply volta ge is within the operatin g voltage range, and that th e internal high-frequency osci llator has stabilized. Then hold the RESET input to low for at least 20 system cloc ks (16 μ s at fc = 40 MHz). When the reset[...]
-
Seite 11
TMP92CM22 2007-02-16 92CM22-9 Figure 3.1.1 Reset T iming Example 3.1.3 Outline of Operation Mode Set AM1 and AM0 pins to “10” to use 8-b it exte rnal bus, or set it to “01” to use 16-bit external bus. T able 3.1.2 Operation Mode Setup T able Mode Setting Input Pin Operation RESET AM1 AM0 16-bit external bus start 8-/16-bit dynamic bus sizin[...]
-
Seite 12
TMP92CM22 2007-02-16 92CM22-10 3.2 Memory Map Figure 3.2.1 shows memory map of TMP92CM22. Figure 3.2.1 Memory Map Note 1: When use emulator , optional 64 Kbytes of 16-Mbyte area are u sed to control emu lator . Therefore, don’t use this area. Note 2: Don’t use the last 16-byte area (FFFFF0H to FFFFF FH). This area is reserved. Note 3: On emulat[...]
-
Seite 13
TMP92CM22 2007-02-16 92CM22-1 1 3.3 Clock Function and S tandby Function TMP92CM22 contains (1) Cl ock gear , (2) Standby controller and (3) Noise-reducin g circuit. It is used fo r low-power , low-noi se systems. This chapter is organized as follows: 3.3.1 Block Diagram of System Clock 3.3.2 SFRs 3.3.3 System Clock Controller 3.3.4 Clock Doubler ([...]
-
Seite 14
TMP92CM22 2007-02-16 92CM22-12 The clock operating m odes are as follows: (a) Single clock mode (X1 and X2 pins only), (b) Dual clock mode (X1, X2 pins and PLL). Figure 3.3.1 shows a transition figure. Figure 3.3.1 System Clock Block Diagram The clock frequency input from th e X1 and X2 pins is called f OSCH and the clock frequenc y selected by SYS[...]
-
Seite 15
TMP92CM22 2007-02-16 92CM22-13 3.3.1 Block Diagram of System Clock Figure 3.3.2 Block Diagram of Dual Clo ck a nd System Clock ÷ 4 ÷ 16 ÷ 8 ÷ 4 ÷ 2 X2 fc/16 fc/8 fc/4 fc/2 ÷ 8 φ T φ T0 f FPH ÷ 2 ÷ 2 f SYS f iO fc PLLCR<FCSEL> Clock gear High- frequency oscillator X1 PLLCR<PLLON> Warm-up timer (for high-frequency oscillator)/lo[...]
-
Seite 16
TMP92CM22 2007-02-16 92CM22-14 3.3.2 SFRs 7 6 5 4 3 2 1 0 Bit symbol − − Read/Write R/W R/W After reset 1 0 Function Always write “1”. A l w a y s write “0”. Bit symbol − GEAR2 GEAR1 GEAR0 Read/Write R/W After reset 0 1 0 0 Function Always write “0”. Select gear value of high- frequency oscillator 000: High-frequency oscillator 00[...]
-
Seite 17
TMP92CM22 2007-02-16 92CM22-15 7 6 5 4 3 2 1 0 Bit symbol PLLON FCSEL LWUPFG Read/Write R/W R After reset 0 0 0 Function 0: PLL stop 1: PLL run 0: fc = OSCH 1: fc = PLL ( × 4) PLL warm-up flag 0: Don’t end up or stop 1: End up Note: Logic of PLLCR< LWUPFG> is different DFM of 900/L1. Figure 3.3.4 SFR for PLL 7 6 5 4 3 2 1 0 Bit symbol PROT[...]
-
Seite 18
TMP92CM22 2007-02-16 92CM22-16 3.3.3 System Clock Controller The system clock contr o ller gene rates the system clock signal (f SYS ) for the CPU core and i n te r n a l I / O . I t i s u se d a s i n p u t t h a t f c o u tputted from high-frequ e ncy oscillation circuit and PLL (Cloc k doubler) SYSCR1<GEA R2:0>, SYSCR1<GEAR2:0> sets [...]
-
Seite 19
TMP92CM22 2007-02-16 92CM22-17 3.3.4 Clock Doubler (PLL) PLL outputs the f PL L clock signal, which is four times as fast as f OSCH . A reset initializes PLL to stop status, setting to PLLCR register is needed befo re use. Like an oscillator , this circuit requires time to stabilize. This is called th e lockup time. Note 1: Input frequency limitati[...]
-
Seite 20
TMP92CM22 2007-02-16 92CM22-18 Example 2: PLL stopping PLLCR EQU 10E8H LD (PLLCR), 10XXXXXXB ; Changes fc from 40 MHz to10 MH z. LD (PLLCR), 00XXXXXXB ; Stop PLL. X: Don’t care Limitation p oint on the us e of PLL 1. When PLL is started, don’t set fc from f OSCH to f PLL at same time. Don’t s etting: LD (PLLCR), 00H LD (PLLCR), C0H 2. When PL[...]
-
Seite 21
TMP92CM22 2007-02-16 92CM22-19 3.3.5 Noise Reduction Circuits Noise reduction circuits are bu ilt in for redu ction EMI (Unnec essary radius noise) and reinforcemen t EMS (Measure of endure noise), allow ing implementation of the followin g features. (1) Reduced drivability for hi gh-frequency oscillat or (2) Single dr ive for high-fr equency oscil[...]
-
Seite 22
TMP92CM22 2007-02-16 92CM22-20 (2) Single dr ive for high-fr equency oscillator (Purpose) Not need twin-driv e and protect mistake operation by inpu tted noise to X2 pin when the external oscill ator is used. (Block diagram) (Setting method) The oscillator is disabled and starts operation as buffer by writing “1” to EMCCR0<EXTIN> registe [...]
-
Seite 23
TMP92CM22 2007-02-16 92CM22-21 (3) Runaway pr ovision with SFR protection register (Purpose) Provision in runaway of program by noise mixin g . W rite operat ion to specified SFR is proh ibited so that provision program in runaway prevents that is in the state which is f etch impossibility by stop ping of clock , memory c ontro l registe r (Memory [...]
-
Seite 24
TMP92CM22 2007-02-16 92CM22-22 3.3.6 S tandby Controller (1) HAL T modes When the HAL T instruction is executed, the operating mode switches t o IDLE2, IDLE1, or STOP mode, depending on the contents o f the SYSCR2<HAL TM1:0> register . The subsequent actions perf ormed in each mode ar e as follows: a. IDLE2: Only the CPU halts. The internal I[...]
-
Seite 25
TMP92CM22 2007-02-16 92CM22-23 (2) How to release the HAL T mode These halt states ca n be released by r e setting or r equesting an interrupt. The halt release sources are d etermined by the com bination betw een the states of interrupt mask register <IFF2:0> and the HAL T modes. The details for release the halt status are shown in T able 3.[...]
-
Seite 26
TMP92CM22 2007-02-16 92CM22-24 T able 3.3.3 Source of Halt Stat e Release and Halt Release Operation Status of Received Interrupt Interrupt Enable (Interrupt level) ≥ (Interrupt mask) Interrupt Disable (Interrupt level) < (Interrupt mask) HAL T Mode Programmable IDLE2 IDLE1 ST OP Programmable IDLE2 IDLE1 STOP Interrupt NMI INTWDT INT0 to 3 (No[...]
-
Seite 27
TMP92CM22 2007-02-16 92CM22-25 (3) Operation a. IDLE2 mode In IDLE2 mode only sp ecific internal I/ O operations, as designated b y the IDLE2 setting regist er , can take place. Instruction execut ion by the CPU stops. Figure 3.3.6 illustrates an examp le of the timing for clearanc e of the IDLE2 mode halt state by an interrupt. Interr upt o f rele[...]
-
Seite 28
TMP92CM22 2007-02-16 92CM22-26 c. ST OP mode When STOP mode is selected, all inte rnal circuits stop, including the inter nal oscillator pin status in STOP mode depends on the settings in the SYSCR2<SELDR V , DRVE> register . T able 3.3.5, T able 3.3.6 shows the state of these pins in STOP mode. After STOP mode has been released sy stem clock[...]
-
Seite 29
TMP92CM22 2007-02-16 92CM22-27 T able 3.3.5 Input Buffer S tate T able Input Buffer State In HALT mod e (IDLE1/STOP) Input Buffer State Input Buffer State Condition A (Note) Condition B (Note) Port Name Input Function Name During Reset When Used as function Pin When Used as Input Port When Used as function Pin When Used as Input Port When Used as f[...]
-
Seite 30
TMP92CM22 2007-02-16 92CM22-28 T able 3.3.6 Output Buffer S tate T able Note: Condition A/B are as follows. SYSCR2 register setting HALT mode <DRVE> <SELDRV> IDLE1 STOP 0 0 Condition B 0 1 Condition A Condition A 1 0 1 1 Condition B Condition B Output Buffer State In HALT mode (IDLE1/STOP) When the CPU is Operating In HALT mode(IDLE2) C[...]
-
Seite 31
TMP92CM22 2007-02-16 92CM22-29 3.4 Interrupt Interrupts of TLCS-900/H1 are controlled by the CPU interru pt mask flip-fl op (IFF2:0) and by the built-in interrupt controller . The TMP92CM22 has a total of 41 interrup t s divided into the following types: Interrupts generated by CPU: 9 sources (Software interrupts: 8 sourc e s, illegal instructio n [...]
-
Seite 32
TMP92CM22 2007-02-16 92CM22-30 Figure 3.4.1 Interrupt and Micro DMA Processing Sequence Interrupt processing Interrupt vector “V” read Interrupt request F/F clear Interrupt specified by micro DMA start vector? PUSH PC PUSH SR SR<IFF2:0> ← Level of accepted interrupt + 1 INTNEST ← INTNEST + 1 PC ← (FFFF00H) + V) Interrupt process pro[...]
-
Seite 33
TMP92CM22 2007-02-16 92CM22-31 3.4.1 General-purpose Interrupt Processing When the CPU accepts an interrupt , it usually performs the fo llowing sequenc e of operations. That is also the same as TLCS-900/L, TLCS-900/H, and TLCS-9 00/L1. (1) The CPU rea ds the interrupt vector fr om the interrupt controller . If the same level interrupts occur simul[...]
-
Seite 34
TMP92CM22 2007-02-16 92CM22-32 T able 3.4.1 TMP92CM22 Interrupt V ectors and Micro DMA S tart V ectors Default Priority T ype Interrupt Source Ve c t o r V alue Address Refer to Ve c t o r Micro DMA St a r t Ve c t or 1 Reset or “SWI0” instruction 0000H FFFF00H 2 “SWI1” instruction 0004H FFFF04H 3 “Illegal instruction” or “SWI2” ins[...]
-
Seite 35
TMP92CM22 2007-02-16 92CM22-33 Default Priority T ype Interrupt Source Ve c t o r V alue Address Refer to Ve c t o r Micro DMA St a r t Ve c t or 52 INTAD: AD conversion end 00CCH FFFFCCH 33H 53 INTTC0: Micro DMA end (Channel 0) 00D0H FFFFD0H 34H 54 INTTC1: Micro DMA end (Channel 1) 00D4H FFFFD4H 35H 55 INTTC2: Micro DMA end (Channel 2) 00D8H FFFFD[...]
-
Seite 36
TMP92CM22 2007-02-16 92CM22-34 3.4.2 Micro DMA In addition to gener al-purpose int errupt processing, the TMP 92CM22 also includes a micro DMA function. Micro D MA processing fo r interrupt requests set by micro DMA is performed at the high est priority level for maskable interrupts (Level 6), regardless of the priority leve l of the inte rrupt sou[...]
-
Seite 37
TMP92CM22 2007-02-16 92CM22-35 Although the contr ol registers used for setting the transfer source and transfer destination addresses ar e 32 bits wide, this type of regist er can only output 24-bit addresses. Accordingly , micro DMA can only access 16 Mbytes (the upper eight bits of a 32-bit address are not valid). Three micro DMA transfer modes [...]
-
Seite 38
TMP92CM22 2007-02-16 92CM22-36 (2) Soft start functi on In addition to starting th e micro DMA function by interrupts, TMP92C M22 includes a micro DMA software start function that starts micro DMA on the generation of the write cycle to the DM AR register . W riting “1” to each bit of DMAR register ca uses micro DMA once (If write “0” to ea[...]
-
Seite 39
TMP92CM22 2007-02-16 92CM22-37 (4) Detaile d description of th e transfer mode regist er 0 0 0 Mode DMAM0 to DMAM7 DMAM [4:0] Operation Execution T ime 000 zz Destination address INC mode (DMADn + ) ← (DMASn) DMACn ← DMACn − 1 If DMACn = 0 then INTTC 5 states 001 zz Source address DEC mode (DMADn − ) ← (DMASn) DMACn ← DMACn − 1 If DMA[...]
-
Seite 40
TMP92CM22 2007-02-16 92CM22-38 3.4.3 Interrupt Controller Operation The block diagram in Figure 3.4.3 shows the int e rrupt circuits. The left-h and side of the diagram shows the interrupt controller ci rcuit. The right-hand side shows the CPU interrupt request signal circuit and the halt release circuit. For each of the 33 interrupts channels ther[...]
-
Seite 41
TMP92CM22 2007-02-16 92CM22-39 Figure 3.4.3 Block Diagram of Interrupt Controller Interrupt request signal to CPU Micro DMA start ve ctor setting register During STOP 36 3 3 3 1 6 2 2 4 6 34 4-input OR INT0 to INT3 Micro DMA channel p riorit y encode r Priority encode r DMA0V DMA1V DMA2V DMA3V Reset Interrupt request flag Reset Reset Priorit y sett[...]
-
Seite 42
TMP92CM22 2007-02-16 92CM22-40 (1) Interrupt priority settin g registers Symbol Name Address 7 6 5 4 3 2 1 0 INT2 INT1 I2C I2M2 I2M1 I2M0 I1C I1M2 I1M1 I1M0 R R/W R R/W INTE12 INT1&INT2 enable D0H 0 0 0 0 0 0 0 0 − INT3 − − − − I3C I3M2 I3M1 I3M0 − − R R/W INTE3 INT3 enable D1H Note: Always write “0”. 0 0 0 0 INTTA1 (TMRA1) IN[...]
-
Seite 43
TMP92CM22 2007-02-16 92CM22-41 Symbol Name Address 7 6 5 4 3 2 1 0 INTAD INT0 IADC IADM2 IADM1 IADM0 I0C I0M2 I0M1 I0M0 R R/W R R/W INTE0AD INT0&INTAD enable F0H 0 0 0 0 0 0 0 0 INTTC1 (DMA1) INTTC0 (DMA0) ITC1C ITC1M2 ITC1M1 ITC1M0 ITC0C ITC0M2 ITC0M1 ITC0M0 R R/W R R/W INTETC01 INTTC0& INTTC1 enable F1H 0 0 0 0 0 0 0 0 INTTC3 (DMA3) INTTC[...]
-
Seite 44
TMP92CM22 2007-02-16 92CM22-42 (2) External in terrupt control Symbol Name Address 7 6 5 4 3 2 1 0 I3EDGE I2EDGE I1EDGE I0EDGE I0LE NMIREE W R/W 0 0 0 0 0 0 IIMC Interrupt input mode control 00F6H (Prohibit RMW) INT3EDGE 0: Rising/ high 1: Falling/ low INT2EDGE 0: Rising/ high 1: Falling/ low INT1EDGE 0: Rising/ high 1: Falling/ low INT0EDGE 0: Ris[...]
-
Seite 45
TMP92CM22 2007-02-16 92CM22-43 T able 3.4.2 Function Setting of External Interrupt Pin Interrupt Pin Shared Pin Mode Setting Method Rising edge IIMC<I0LE> = 0, INT0EDGE = 0 Falling edge IIMC<I0LE> = 0, INT0EDGE = 1 High level IIMC<I0LE> = 1, INT0ED GE = 0 INT0 PC3 Low level IIMC<I0LE> = 1, INT0ED GE = 1 Rising edge IIMC2<[...]
-
Seite 46
TMP92CM22 2007-02-16 92CM22-44 (3) SIO receive interrupt control Symbol Name Address 7 6 5 4 3 2 1 0 IR1LE IR0LE W 1 1 SIMC SIO Interrupt mode control F5H (Prohibit RMW) 0: INTRX1 edge mode 1: INTRX1 level mode 0: INTRX0 edge mode 1: INTRX0 level mode * INTRX1 level enables 0 Detect edge INTRX1 1 “H” level INTRX1 * INTRX0 rising edge enable 0 D[...]
-
Seite 47
TMP92CM22 2007-02-16 92CM22-45 (4) Interrupt request flag clear register The interrupt requ est flag is cleared by writing the ap propriate micro DMA start vector , as gi ven in T able 3.4.1, to the register INTCLR. For example, to clear the interrupt flag INT 0, perform the foll owing register operation after e xecution of the DI inst ruction. INT[...]
-
Seite 48
TMP92CM22 2007-02-16 92CM22-46 Symbol Name Address 7 6 5 4 3 2 1 0 DMA0V5 DMA0V4 DMA0V3 DMA0V2 DMA0V1 DMA0V0 R/W 0 0 0 0 0 0 DMA0V DMA0 start vector 100H DMA0 start vector DMA1V5 DMA1V4 DMA1V3 DMA1V2 DMA1V1 DMA1V0 R/W 0 0 0 0 0 0 DMA1V DMA1 start vector 101H DMA1 start vector DMA2V5 DMA2V4 DMA2V3 DMA2V2 DMA2V1 DMA2V0 R/W 0 0 0 0 0 0 DMA2V DMA2 star[...]
-
Seite 49
TMP92CM22 2007-02-16 92CM22-47 (6) Specificat ion of a micro DMA burst Specifying the micro DMA burst function ca uses micro DMA transfer , once started, to continue until the va lue in the transfer co unt er register reaches 0. Setting any of the bits in the register DMAB which correspon d to a micro DMA channel (as shown below) to 1 specifies tha[...]
-
Seite 50
TMP92CM22 2007-02-16 92CM22-48 (7) Notes The instruction execut ion unit and the bus interface unit in this CPU oper ate independentl y . Therefore if, imm ediately befor e an interrupt is generated, the CPU fetches an instruction which clears th e co rrespon ding interrupt requ est flag (Note) , the CPU may execute this instruction in betwe en acc[...]
-
Seite 51
TMP92CM22 2007-02-16 92CM22-49 3.5 Port Function The TMP92CM22 features 50-bit sett ings wh ich relate to the various I/O ports. As well as general- purpose I/O port fu nctionalit y , the port pins also have I/O funct i ons which relate to the built-in CPU and internal I/Os. T able 3.5.1 lists the functions of each port pin . T able 3.5.2 and T abl[...]
-
Seite 52
TMP92CM22 2007-02-16 92CM22-50 T able 3.5.2 I/O Port Setting List (1/2) I/O Register Setting V alue Ports Input Pins S pecification Pn PnCR PnFC PnODE Input port × 0 Output port × 1 0 Port 1 P10 to P17 D8 to D15 bus × × 1 None Input port* × 0* Output port* × 1* 0 Port 4 P40 to P47 A0 to A7 output × × 1 None Input port* × 0* Output port* ×[...]
-
Seite 53
TMP92CM22 2007-02-16 92CM22-51 T able 3.5.3 I/O Port Setting List (2/2) I/O Register Setting V alue Ports Input Pins S pecification Pn PnCR PnFC PnODE Port A PA0, PA1, PA2, PA7 Input port × None None None Input port × 0 0 PC0, PC1, PC3, PC5, PC6 Output port × 1 0 PC0 TA0IN input × × 1 TA1OUT output × 1 1 PC1 INT1 input × 0 1 PC3 INT0 input ?[...]
-
Seite 54
TMP92CM22 2007-02-16 92CM22-52 3.5.1 Port 1 (P10 to P17) Port1 is an 8-bit general-purpose I/O port. Bits can be individually set as either inputs or outputs by control regist er P1CR and function regi ster P1FC. In addition to functioning as a general-purp ose I/O port, port1 can also function as a data bus (D8 to D15). After released reset, devic[...]
-
Seite 55
TMP92CM22 2007-02-16 92CM22-53 Port 1 Register 7 6 5 4 3 2 1 0 Bit symbol P17 P16 P15 P14 P13 P12 P11 P10 Read/Write R/W After reset Data from external port (Output latch register is clear to “0”.) Port 1 Control Register 7 6 5 4 3 2 1 0 Bit symbol P17C P16C P15C P14C P13C P12C P11C P10C Read/Write W After reset 0 0 0 0 0 0 0 0 Function Refer t[...]
-
Seite 56
TMP92CM22 2007-02-16 92CM22-54 3.5.2 Port 4 (P40 to P47) Port 4 is an 8-bit general-purpose I/O port*. Bi ts can be individually set as eith er inputs or outputs by control regis ter P4CR and function r egister P4FC*. In addition to functionin g as a general-purp ose I/O port, p o rt 4 can also function as a address bus (A0 to A7). After released r[...]
-
Seite 57
TMP92CM22 2007-02-16 92CM22-55 Port 4 Register 7 6 5 4 3 2 1 0 Bit symbol P47 P46 P45 P44 P43 P42 P41 P40 Read/Write R/W After reset Data from external port (Output latch register is cleared to “0”.) Port 4 Control Register 7 6 5 4 3 2 1 0 Bit symbol P47C P46C P45C P44C P43C P42C P41C P40C Read/Write W After reset 0 0 0 0 0 0 0 0 Function 0: In[...]
-
Seite 58
TMP92CM22 2007-02-16 92CM22-56 3.5.3 Port 5 (P50 to P57) Port 5 is an 8-bit general-purpose I/O port*. Bi ts can be individually set as eith er inputs or outputs by control regis ter P5CR and function r egister P5FC*. In addition to function ing as a general-purp os e I/O port, port 5 can also function as an address bus (A8 to A15). A f t e r r e l[...]
-
Seite 59
TMP92CM22 2007-02-16 92CM22-57 Port 5 Register 7 6 5 4 3 2 1 0 Bit symbol P57 P56 P55 P54 P53 P52 P51 P50 Read/Write R/W After reset Data from external port (Output latch register is cleared to “0”.) Port 5 Control Register 7 6 5 4 3 2 1 0 Bit symbol P57C P56C P55C P54C P53C P52C P51C P50C Read/Write W After reset 0 0 0 0 0 0 0 0 Function 0: In[...]
-
Seite 60
TMP92CM22 2007-02-16 92CM22-58 3.5.4 Port 6 (P60 to P67) Port 6 is an 8-bit general-purpose I/O port*. Bi ts can be individually set as eith er inputs or outputs by control regis ter P6CR and function r egister P6FC*. In addition to function ing as a general-purp os e I/O port, port 6 can also function as an address bus (A16 to A23). A f t e r r e [...]
-
Seite 61
TMP92CM22 2007-02-16 92CM22-59 Port 6 Register 7 6 5 4 3 2 1 0 Bit symbol P67 P66 P65 P64 P63 P62 P61 P60 Read/Write R/W After reset Data from external port (Output latch register is cleared to “0”.) Port 6 Control Register 7 6 5 4 3 2 1 0 Bit symbol P67C P66C P65C P64C P63C P62C P61C P60C Read/Write W After reset 0 0 0 0 0 0 0 0 Function 0: In[...]
-
Seite 62
TMP92CM22 2007-02-16 92CM22-60 3.5.5 Port 7 (P70 to P76) Port 7 is a 7-bit general-purpose I/O p ort (P70 to P75 are used for output only). Bits can be individ ually set as either inputs or outputs by co ntrol register P7CR and function register P7FC. In addition to functioning as a gen eral-purpose I/O port, P70 to P7 3 pins can also functi on as [...]
-
Seite 63
TMP92CM22 2007-02-16 92CM22-61 Figure 3.5.10 Port 7 (P76) Port 7 Register 7 6 5 4 3 2 1 0 Bit symbol P76 P75 P74 P73 P72 P71 P70 Read/Write R/W After reset Data from external port (Note) 1 1 1 1 1 1 Note: Output latch register is cleared to 0. Port 7 Control Register 7 6 5 4 3 2 1 0 Bit symbol P76C Read/Write W After reset 0 Function 0: Input 1: Ou[...]
-
Seite 64
TMP92CM22 2007-02-16 92CM22-62 3.5.6 Port 8 (P80 to P83) Port 8 is 4-bit output port. Resetting sets outpu t latch of P82 to “0” and set output latches of P80, P81, and P83 to “1”. In addition to functioning as a output port, port 8 can also function as a output chip select signal ( CS0 to CS3 ). These settings operat e by programmin g “1[...]
-
Seite 65
TMP92CM22 2007-02-16 92CM22-63 3.5.7 Port 9 (P90 to P92) Port 9 is 3-bit general-purpose I/O port. Each bit can be set individually for input or output. In addition to functionin g as a general-purp ose I/O port, p o rt 9 can also function as a serial bus interface input (SCK (Clock signal in SIO m ode), SO (Data output signal in SIO mode), SDA (Da[...]
-
Seite 66
TMP92CM22 2007-02-16 92CM22-64 Port 9 Register 7 6 5 4 3 2 1 0 Bit symbol P92 P91 P90 Read/Write R/W After reset Data from exte rnal port (Output latch register is set to 1) Port 9 Control Register 7 6 5 4 3 2 1 0 Bit symbol P92C P91C P90C Read/Write W After reset 0 0 0 Function 0: Input 1: Output Port 9 Function Register 7 6 5 4 3 2 1 0 Bit symbol[...]
-
Seite 67
TMP92CM22 2007-02-16 92CM22-65 3.5.8 Port A (P A0 to P A2, P A7) Port A is 4-bit general-pur pose input port with pull-up resistor . Figure 3.5.16 Port A Port A Register 7 6 5 4 3 2 1 0 Bit symbol PA7 PA2 PA1 PA0 Read/Write R R After reset D a ta fro m external port Data from external port Figure 3.5.17 Register for Port A Internal data bus PA0, PA[...]
-
Seite 68
TMP92CM22 2007-02-16 92CM22-66 3.5.9 Port C (PC0, PC1, PC3, PC5, and PC6) Port C is 5-bit general-purpose I/O port. Each bit can be set individually for input or output. Resetting sets por t C to input port. In addition to functioning as a general-purp ose I/O port, port C can also function as a input/output pin (T A0IN, T A1OUT , T A3OUT , and TB0[...]
-
Seite 69
TMP92CM22 2007-02-16 92CM22-67 (2) PC1 (INT1, T A1OUT), PC5 (INT2, T A3OUT), PC6 (INT3, TB0OUT0) In addi tion to f unction as I/O port , port PC1, PC5, and PC6 can also function as external interrupt inpu t pin INT1 to INT3 and output pin of timer channel T A 1OUT , T A 3OUT , and TB0OUT0. Note: Can not read the output latch data when output mode. [...]
-
Seite 70
TMP92CM22 2007-02-16 92CM22-68 (3) PC3 (INT0) In addition to function as I/O port, port PC3 can also function as external interrupt pin INT0. Figure 3.5.20 Port C (PC3) Internal data bus Direction control (on bit basis) Reset PCCR write PC read PC read PC3 (INT0) Function control (on bit basis) PCFC write S Output latch S B Selector A Select level/[...]
-
Seite 71
TMP92CM22 2007-02-16 92CM22-69 Port C Register 7 6 5 4 3 2 1 0 Bit symbol PC6 PC5 PC3 PC1 PC0 Read/Write R/W R/W R/W After reset Data from external port (Note) Data fro m external port (Note) Data from external port (Note) Note: Output latch register is set to 1. Port C Control Register 7 6 5 4 3 2 1 0 Bit symbol PC6C PC5C PC3C PC1C PC0C Read/Write[...]
-
Seite 72
TMP92CM22 2007-02-16 92CM22-70 3.5.10 Port D (PD0 to PD3) Port D is 4-bit general-purpose I/O port. Each bit can be set individually for input or output. Resetting sets por t D to input port. In addition to functioning as a general-purp ose I/O port, port D can als o function as an input pin (INT4 and INT5)/out put pin (TB0IN, TB1OUT , TB3OUT , and[...]
-
Seite 73
TMP92CM22 2007-02-16 92CM22-71 (2) PD2 (TB1OUT0) and PD 3 (TB1OUT1) In addition to function as I/O port, port PD0 an d PD1 can also function as timer channel output pins TB1OUT0 and TB1OUT1. Figure 3.5.23 Port D (PD2 and PD3) Internal data bus Direction control (on bit basis) Reset PDCR write PD write PF read PD2 (TB1OUT0) PD3 ( TB1OUT1 ) Function [...]
-
Seite 74
TMP92CM22 2007-02-16 92CM22-72 Port D Register 7 6 5 4 3 2 1 0 Bit symbol PD3 PD2 PD1 PD0 Read/Write R/W After reset Data from external port (Output latch register is set to 1) Port D Control Register 7 6 5 4 3 2 1 0 Bit symbol PD3C PD2C PD1C PD0C Read/Write W After reset 0 0 0 0 Function 0: Input 1: Output 0: Input 1: Output 0: Input 1: Output 0: [...]
-
Seite 75
TMP92CM22 2007-02-16 92CM22-73 3.5.11 Port F (PF0 to PF7) Port F is 8-bit general-purpose I/O port. Each bit can be set individ ually for input or output. Resetting resets the PFCR and PFFC to “0 ”, and sets all bits to input po rt. And all bits of output latch register to “1”. In addition to function ing as a general-purpose I/O port, port[...]
-
Seite 76
TMP92CM22 2007-02-16 92CM22-74 (2) Ports PF1 and PF4 (RXD0 and XD1) In addition to function as I/O port, port PF1 and PF4 can also function as RXD input pin of serial channel. Figure 3.5.26 Port F (PF and PF4) Internal data bus Direction control (on bit basis) Reset PFCR write PF write PF read PF1 (RXD0) PF4 (RXD1) S Output latch S B Selector A RXD[...]
-
Seite 77
TMP92CM22 2007-02-16 92CM22-75 (3) Port PF2 ( CTS0 , SCLK0) and port PF5 ( CTS1 , SCLK1) In addition to function as I/O port, port PF2 and PF5 can also function as CTS input pin of serial channel or SCLK I/O pin. Figure 3.5.27 Port F (PF2 and PF5) (4) Port PF6 and port PF7 These ports are genera l-purpose I/O port. Figure 3.5.28 Port F (PF6 and PF7[...]
-
Seite 78
TMP92CM22 2007-02-16 92CM22-76 Port F Register 7 6 5 4 3 2 1 0 Bit symbol PF7 PF6 PF5 PF4 PF PF2 PF1 PF0 Read/Write R/W After reset Data from external port (Output latch register is set to 1) Port F Control Register 7 6 5 4 3 2 1 0 Bit symbol PF7C PF6C PF5C PF4C PF3C PF2C PF1C PF0C Read/Write W After reset 0 0 0 0 0 0 0 0 Function 0: Input 1: Outpu[...]
-
Seite 79
TMP92CM22 2007-02-16 92CM22-77 3.5.12 Port G (PG0 to PG7) Port G is 8-bit input port and can als o be used as the an alog input pins for the internal AD converter . PG3 can also be used as ADTRG pin for the AD converter . Figure 3.5.30 Port G Port G Register 7 6 5 4 3 2 1 0 Bit symbol PG7 PG6 PG 5 PG4 PG3 PG2 PG1 PG0 Read/Write R After reset Data f[...]
-
Seite 80
TMP92CM22 2007-02-16 92CM22-78 3.6 Memory Controller 3.6.1 Function TMP92CM22 has a memory contro ller with a variable 4-block address area that contr ols as follows. (1) 4-block address area support Specifies a start address a nd a bloc k size for 4-bloc k address area. (2) Connecting memory spec ifications Specifies SRAM and R OM as memories to c[...]
-
Seite 81
TMP92CM22 2007-02-16 92CM22-79 3.6.2 Control Register and Operation after Reset Release This section describes the regi sters to control the memory co ntro ller , the state after reset release and necessary settings. (1) Control register The control registers of the memory controll er are as follows. • Control register: Bn CSH/BnCSL (n = 0 to 3, [...]
-
Seite 82
TMP92CM22 2007-02-16 92CM22-80 3.6.3 Basic Functions and Register Setting In this section, setting of the block address area, the connecting memory and the number of waits out of th e memory controller ’s func tions are described. (1) Block addres s area specification The block address area is specified b y two registers. The memory start address[...]
-
Seite 83
TMP92CM22 2007-02-16 92CM22-81 (iii) Example of register setting T o set the block address area 1 to 512 bytes from address 1 10000H, set the register as follows. MSAR1 Register 7 6 5 4 3 2 1 0 Bit symbol M1S23 M1S22 M1S21 M1S20 M1S19 M1S18 M1S17 M1S16 Setting value 0 0 0 1 0 0 0 1 M1S23 to M1S16 bits of the memory start address register MSAR1 corr[...]
-
Seite 84
TMP92CM22 2007-02-16 92CM22-82 (2) Connection memory specification Setting the BnOM1 to BnOM0 bit of the control register (BnCSH) specifies the memory type to be connect ed with the block address areas. The int erface signal is output according to the s e t memory as foll ows. T MP92CM22 prohibit changing default (SRAM/ROM). BnOM1, BnOM0 Bit (BnCSH[...]
-
Seite 85
TMP92CM22 2007-02-16 92CM22-83 CPU Data Data Size (Bit) St a r t Address Data Width in Memory Side (Bit) CPU Address D15 to D8 D7 to D0 4n + 0 8/16 4n + 0 xxxxx b7 to b0 8 4n + 1 xxxxx b7 to b0 4n + 1 16 4n + 1 b7 to b0 xxxxx 4n + 2 8/16 4n + 2 xxxxx b7 to b0 8 4n + 3 xxxxx b7 to b0 8 4n + 3 16 4n + 3 b7 to b0 xxxxx (1) 4n + 0 xxxxx b7 to b0 8 (2) [...]
-
Seite 86
TMP92CM22 2007-02-16 92CM22-84 (4) Wa it contro l The external bus cycle completes a wait of two states at least (100 ns at f SYS = 20 MHz). Setting the <BnWW2: 0> and <BnWR2: 0> of BnCSL specifies the number of w aits in the read cycle and the wri te cycle. BnWW is set with the same method as BnWR. BnWW/BnWR Bit (BnCSL Register) BnWW2 [...]
-
Seite 87
TMP92CM22 2007-02-16 92CM22-85 • When not inserting a dummy (0 waits) • When inserting a dummy cycle (0 waits) CLKOUT Address CSm CSn RD CLKOUT Address CSm CSn RD Dummy[...]
-
Seite 88
TMP92CM22 2007-02-16 92CM22-86 (5) Bus access timing • External read/write bus cycle (0 waits) • External read/write bus cycle (1 wait) CS WR RD Address in p ut output Read Write CLKOUT (20 MHz) D7 to D0 D7 to D0 T1 T2 CS WR RD Address Outpu t CLKOUT (20 MHz) D7 to D0 D7 to D0 T1 TW In p u t Read Write T2[...]
-
Seite 89
TMP92CM22 2007-02-16 92CM22-87 • External read/write bus cycle (0 waits at WAIT pin input mode) • External read/write bus cycle (n waits at WAIT pin input mode) CS WR RD Address In p ut Out p ut Read Write CLKOUT (20 MHz) D7 to D0 D7 to D0 T1 T2 WAIT Sampling CS WR RD Address Output CLKOUT (20 MHz) D7 to D0 D7 to D0 T1 TW In p ut Read Write T2 [...]
-
Seite 90
TMP92CM22 2007-02-16 92CM22-88 Example of WAIT input cycle (5 waits) D Q CK RES D Q CK RES D Q CK RES D Q CK RES D Q CK RES FF0 FF1 FF2 FF3 FF4 CLKOUT (20 MHz) 1 2 345 6 7 CSn RD WAIT FF _ RES FF0 _ D FF0 _ Q FF1 _ Q FF2 _ Q FF3 _ Q WAIT CSn CLKOUT WRLU WRLL D R[...]
-
Seite 91
TMP92CM22 2007-02-16 92CM22-89 (6) Co nnecting exter nal memory Figure 3.6.1 shows an example of how to connect ext e rnal memory to the TMP92CM22. This example connects ROM and SRAM in 16-bit width. Figure 3.6.1 Example of External Memory By resetting, TMP92CM2 2 function as output port. Output latch of P82 ( CS2 ) is cleared to “0”, and out p[...]
-
Seite 92
TMP92CM22 2007-02-16 92CM22-90 3.6.4 ROM Control (Page mode) This section describes ROM pa ge mode accessing and how to set registers. ROM page mode is set by the page ROM control register . (1) Operation and how t o set the registers The TMP92CM22 supports ROM acc ess of th e page mode . ROM access of the page mode is specified only in block addr [...]
-
Seite 93
TMP92CM22 2007-02-16 92CM22-91 3.6.5 List of Registers The memory control registers and the sett ings are described as follows. For the addresses of the registers, see list of special function registers in section 5. (1) Control registers The control register is a pair of BnCSL and Bn CSH. (“n” is a number of the block address area.) BnCSL has [...]
-
Seite 94
TMP92CM22 2007-02-16 92CM22-92 B2REC Sets the dummy cycle for data output recovery time. 0 = Not insert a dummy cycle (Default) 1 = Insert a dummy cycle B2OM[1:0] 00 = SRAM or ROM (Default) Others = (Reserved) B2BUS[1:0] Sets the data bus width. 00 = 8 bits (Default) 01 = 16 bits 10 = (Reserved) 11 = (Reserved) Note: The value of B2BUS bit is set a[...]
-
Seite 95
TMP92CM22 2007-02-16 92CM22-93 BEXCSL 7 6 5 4 3 2 1 0 Bit symbol BEXWW2 BEXWW1 BEXWW0 BEXWR2 BEXWR1 BEXWR0 Read/Write W W After reset 0 1 0 0 1 0 BEXWW[2:0] S pecifies the number of write waits. 001 = 2 states (0 wait s) access 010 = 3 states (1 wait) access 101 = 4 states (2 wait s) access 1 10 = 5 states (3 wait s) access 111 = 6 states (4 waits)[...]
-
Seite 96
TMP92CM22 2007-02-16 92CM22-94 (1) Block addres s area specification register A start address and range in t he block address are specified b y the memory start address register (MSARn) an d the memory address mask register (MAMRn). The memory start address register sets all start address similarly regardless of the block address areas. The bit to [...]
-
Seite 97
TMP92CM22 2007-02-16 92CM22-95 (2) Page ROM contr ol register (PMEMCR) The page ROM cont rol regi ster set s page ROM accessing. ROM page accessing is executed only in bl ock address area 2. PMEMCR 7 6 5 4 3 2 1 0 Bit symbol OPGE OPWR1 OPWR0 PR1 PR0 Read/Write R/W After reset 0 0 0 1 0 OPGE Enable bit. 0 = No ROM page mode accessing (Default) 1 = R[...]
-
Seite 98
TMP92CM22 2007-02-16 92CM22-96 T able 3.6.1 Control Register 7 6 5 4 3 2 1 0 B0CSL Bit symbol B0WW2 B0WW1 B0WW0 B0WR2 B0WR1 B0WR0 (0140H) Read/Write W W After reset 0 1 0 0 1 0 B0CSH Bit symbol B0E − − B0REC B0OM1 B0OM0 B0BUS1 B0BUS0 (0141H) Read/Write W After reset 0 0 (Note) 0 (Note) 0 0 0 0 0 MAMR0 Bit symbol M0V20 M0V19 M0V18 M0V17 M0V16 M0[...]
-
Seite 99
TMP92CM22 2007-02-16 92CM22-97 3.6.6 Caution If the parasitic capacitance of th e read signal (Output enable signal) is greater than that of the chip select signal, it is possible that an unintended read cycle occurs due to a delay in the read sign al. Such an unintende d read cycle may caus e a trouble as in the case of (a) in Figure 3.6.3 Figure [...]
-
Seite 100
TMP92CM22 2007-02-16 92CM22-98 (2) The cautions at th e time of the fun ctional change of a CSn . A chip select signal output has the ca se of a combinatio n terminal with a general-purpose port function. In this case, an outp ut latch register and a function control register are initialized by the rese t action, and an object terminal is initializ[...]
-
Seite 101
TMP92CM22 2007-02-16 92CM22-99 3.7 8-Bit T imers (TMRA) The TMP92CM22 features 4 built-in 8-b it timers. These timers are pa ired into four m odules: TMRA01 and T MRA23. Each m odule consists of t wo channels and can operat e in any of the foll owing four oper ating modes. • 8-bit interval timer mode • 16-bit interval tim er mode • 8-bit prog[...]
-
Seite 102
TMP92CM22 2007-02-16 92CM22-100 3.7.1 Block Diagrams Figure 3.7.1 TMRA01 Block Diagram φ T1 φ T16 φ T256 8-bit comparator (CP1) 8-bit comparator (CP0) 8-bit up counter (UC0) 2 n overflow 8-bit up counter (UC1) Timer flip-flop TA1FF Match detect Match detect 8-bit timer register TA1REG φ T1 φ T4 φ T16 512 256 128 64 32 16 8 4 2 φ T1 φ T4 φ [...]
-
Seite 103
TMP92CM22 2007-02-16 92CM22-101 Figure 3.7.2 TMRA23 Block Diagram φ T1 φ T16 φ T256 8-bit comparator register (CP3) 8-bit comparator (CP2) 8-bit up counter (UC2) 2 n over- flow 8-bit up counter (UC3) Timer flip-flop TA3FF Match detect Match detect 8-bit timer register TA3REG φ T1 φ T4 φ T16 512 256 128 64 32 16 8 4 2 φ T1 φ T4 φ T16 φ T25[...]
-
Seite 104
TMP92CM22 2007-02-16 92CM22-102 3.7.2 Operation of Each Circuit (1) Prescaler A 9-bit prescaler generates the input clock to T MRA01. The prescaler ’ s operation can be controlled using T A 01RUN<T A0PRUN> in the timer control register . Setting <T A0PRUN> to “1” starts the count; setting <T A0PRUN> to “0” clears the pre[...]
-
Seite 105
TMP92CM22 2007-02-16 92CM22-103 (3) Timer registers (T A0REG and T A1REG) These are 8-bit regist ers, which can be used to set a time interval. When th e value set in the timer register T A0REG or T A1REG matches the value in the corresp onding up counter , the comparator match detect signal goes Active. If the value s et in the timer register is 0[...]
-
Seite 106
TMP92CM22 2007-02-16 92CM22-104 (4) Comparator (CP0) The comparator compar es the value in an up counter with the value set in a timer register . If they match, the up counter is cleared to 0 and an interrupt signal (INTT A0 or INTT A1) is generate d. If timer flip-flop i nversion is enabled, the ti mer flip-flop is inverted at the same time . (5) [...]
-
Seite 107
TMP92CM22 2007-02-16 92CM22-105 3.7.3 SFRs 7 6 5 4 3 2 1 0 Bit symbol TA0RDE I2TA01 TA01PRUN TA1RUN TA0RUN Read/Write R/W R/W After reset 0 0 0 0 0 TMRA01 prescaler UP counter (UC1) UP counter (UC0) Function Double buffer 0: Disable 1: Enable IDLE2 0: Stop 1: Operate 0: Stop and clear 1: Run (Count up) 0 Disable 0 Stop and clear 1 Enable 1 Count No[...]
-
Seite 108
TMP92CM22 2007-02-16 92CM22-106 7 6 5 4 3 2 1 0 Bit symbol TA01M1 TA01M0 PWM01 PWM 00 TA1CLK1 TA1CLK0 TA0CLK1 TA0CLK0 Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode PWM cycle 00: Reserved 01: 2 6 10: 2 7 11: 2 8 TMRA1 source clock 00: TA0TRG 01: φ [...]
-
Seite 109
TMP92CM22 2007-02-16 92CM22-107 7 6 5 4 3 2 1 0 Bit symbol TA23M1 TA23M0 PWM21 PWM 20 TA3CLK1 TA3CLK0 TA2CLK1 TA2CLK0 Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function Operation mode 00: 8-bit timer mode 01: 16-bit timer mode 10: 8-bit PPG mode 11: 8-bit PWM mode PWM cycle 00: Reserved 01: 2 6 10: 2 7 11: 2 8 TMRA3 source clock 00: TA2TRG 01: φ [...]
-
Seite 110
TMP92CM22 2007-02-16 92CM22-108 7 6 5 4 3 2 1 0 Bit symbol TA1FFC1 TA1FFC0 TA1FFCIE TA1FF CIS Read/Write R/W After reset 1 1 0 0 Function 00: Invert TA1FF 01: Set TA1FF to “1” 10: Clear TA1FF to “0” 11: Don’t care TA1FF control for inversion 0: Disable 1: Enable TA1FF Inversion signal select 0: TMRA0 1: TMRA1 0 Inversion by TMRA0 1 Invers[...]
-
Seite 111
TMP92CM22 2007-02-16 92CM22-109 TMRA3 Flip-Flop Control Regi ster 7 6 5 4 3 2 1 0 Bit symbol TA3FFC1 TA3FFC0 TA3FFCIE TA3FF CIS Read/Write R/W After reset 1 1 0 0 Function 00: Invert TA3FF 01: Set TA3FF to “1” 10: Clear TA3FF to “0” 11: Don’t care TA3FF control for inversion 0: Disable 1: Enable TA3FF inversion select 0: TMRA2 1: TMRA3 0 [...]
-
Seite 112
TMP92CM22 2007-02-16 92CM22-1 1 0 Symbol Address 7 6 5 4 3 2 1 0 − W TA0REG 1102H Undefined − W TA1REG 1103H Undefined − W TA2REG 110AH Undefined − W TA3REG 110BH Undefined Note: Read-modify-write instruction is prohibited for above re gisters. Figure 3.7.9 Register for TMRA Timer Register (TA0REG to TA3REG)[...]
-
Seite 113
TMP92CM22 2007-02-16 92CM22-1 1 1 3.7.4 Operation in Each Mode (1) 8-bit timer mode Both TMRA0 and TMRA1 can be use d independently as 8-bit int erval timers. When set function and count data, TMRA0 and TMRA1 should be stopped. 1. Generating interrupts at a fixed interval (usin g TMRA1) T o generate interrupts at constant inte rvals using TMRA1 (IN[...]
-
Seite 114
TMP92CM22 2007-02-16 92CM22-1 1 2 2. Generating a 50% duty ratio square wave pulse The state of the timer f lip-flop (T A1FF1) is inverted at co nstant intervals and its status output via the tim er output pin (T A1OUT). Example: T o output a 2.4 μ s square wave pulse from the T A1OUT pin at f C = 40 MHz, use the following procedu re to make the a[...]
-
Seite 115
TMP92CM22 2007-02-16 92CM22-1 1 3 3. Making TMRA1 count up on the match signal fr om the TMRA0 comparator Select 8-bit timer mode and set the comparat or output from TMRA0 to be the input clock to TMRA1. Figure 3.7.1 1 TMRA1 Count up on Signal from TM RA0 (2) 16-bit timer mode A 16-bit interval timer is configured by pairing the two 8-bit timers TM[...]
-
Seite 116
TMP92CM22 2007-02-16 92CM22-1 1 4 The comparator m atch signal is output from T MRA0 each tim e the up count er UC0 matches T A0REG, though the up-coun ter UC0 is not cleared. In the case of the T MRA1 comparator , the match detect signal is output o n each comparator puls e on which the values in the up count er UC1 and T A1REG match. When the mat[...]
-
Seite 117
TMP92CM22 2007-02-16 92CM22-1 1 5 In this mode, a programmable square wave is generated by inver ting the timer output each time the 8-bit up count er (UC0) matches t he value in one of th e timer registers TA0REG or TA1REG. The value set in TA0RE G must be smaller than th e value set in TA1REG. Although the up count er for TMRA1 (UC1) is n ot used[...]
-
Seite 118
TMP92CM22 2007-02-16 92CM22-1 1 6 Example: To generate 1/4 duty 62.5 kHz pulses (at f C = 40 MHz): Calculate the value that should be set in the timer regi ster . T o obtain a frequency of 62.5 kHz, the pulse cycle t should be: t = 1/62.5 kHz = 16 μ s φ T1 ( = (16/fc)s (at f C = 40MHz); 16 μ s/(16/fc)s = 40 Therefore set T A1REG to 40 (28H) The [...]
-
Seite 119
TMP92CM22 2007-02-16 92CM22-1 1 7 (4) 8-bit PWM (P ulse width modulation ) output mode This mode is only val id for TMRA0. In this mode, a PWM pulse with the maximum resolution of 8 bits can b e output. When TMRA0 is used the PWM pulse is output on the TA1OUT pin (which i s also used as PC1). TMRA1 can also be used as an 8-bit timer. The timer outp[...]
-
Seite 120
TMP92CM22 2007-02-16 92CM22-1 1 8 In this mode, the value of the register buffer will be shifted into TA0REG if 2 n overflow is detected when the T A0REG doubl e buffer is enabled. Use of the double buffer facilitates th e handling of low dut y ratio waves. Figure 3.7.18 Operation of Register Buf fer Example: To output the following PWM waves on th[...]
-
Seite 121
TMP92CM22 2007-02-16 92CM22-1 1 9 T able 3.7.4 Relationship of PWM Cycle and 2 n Counte r PWM cycle TAxxMOD<PWMx1:0> 2 6 (x64) 2 7 (x128) 2 8 (x256) TAxxMOD<TAxCLK1:0> TAxxMOD<TA xCLK1:0> TAxxMOD<TA xCLK1:0> Clock gear SYSCR1 <GEAR2:0> System cloc k SYSCR0 <SYSCK> − φ T1(x2) φ T4(x 8) φ T16(x 32) φ T1(x2) ?[...]
-
Seite 122
TMP92CM22 2007-02-16 92CM22-120 3.8 16-Bit Timer/Event Counters (TMRB) The TMP92CM22 contains 2 chann els 16-bit ti mer/event counter (TMRB) which have the following op eration modes: • 16-bit interval timer mode • 16-bit event counter mode • 16-bit programmable square wave pu lse genera tion output mode (PPG: V ariable duty cycle with variab[...]
-
Seite 123
TMP92CM22 2007-02-16 92CM22-121 3.8.1 Block Diagram Figure 3.8.1 Block Diagram of TMRB0 Capture, external interrupt control Timer flip-flop control Match detection Match detection 32 16 8 4 2 φ T1 φ T4 φ T16 Run/ clear φ T1 φ T4 φ T16 TB0MOD<TB0CLK1:0> Prescaler clock: φ T0 Selecto r Register buffer 10 TB0RUN<TB0RUN> TB0MOD<TB[...]
-
Seite 124
TMP92CM22 2007-02-16 92CM22-122 Figure 3.8.2 Block Diagram of TMRB1 Timer flip-flop control Match detection Match detection 32 16 8 4 2 φ T1 φ T4 φ T16 Run/ clear φ T1 φ T4 φ T16 TB1MOD<TB1CLK1:0> Prescaler clock: φ T0 External interrupt input INT4 INT5 Selecto r Register buffer 12 TB1RUN<TB1RUN> TB1MOD<TB1CLE> TB0FF0 Inter[...]
-
Seite 125
TMP92CM22 2007-02-16 92CM22-123 3.8.2 Operation (1) Prescaler The 5-bit prescaler generates the source clock for TMRB0. The prescaler clock ( φ T0 ) is a divided clock (D ivided by 8) from selected cloc k by the register SYSCR1<GEA R1:0> of clock gear . This prescaler can be started or stopped using TB0RUN<T B0PRUN>. Counting starts wh[...]
-
Seite 126
TMP92CM22 2007-02-16 92CM22-124 (3) T imer registers (TB0 RG0H/L and TB0RG1H/L) These two 16-bit registers are used to set the interval tim e. When the value i n the up counter UC10 matches the value set in th is timer register , the comparator match detect signal will go active. Setting data for both upper and lower timer regist ers TB0RG0H/L and [...]
-
Seite 127
TMP92CM22 2007-02-16 92CM22-125 (4) Capture reg isters (TB0CP0H/L, TB 0CP1H/L, TB1CP0H/ L and TB1CP1H/ L) These 16-bit reg isters are used to latch the va lues in the up counters UC10. Data in the capture registers should be read both upper and lower all 16 bits. For example, using 2-byte data transfer inst ruction or using 1-byte data transfer ins[...]
-
Seite 128
TMP92CM22 2007-02-16 92CM22-126 (6) Comparators (CP10 and CP1 1) CP10 and CP1 1 are 16-bit comparators which compare the value in th e up counter UC10 with the value set i n TB0RG0H/L or TB0RG1H/L respect ively , in order to detect a match. If a match is detected, the comparator generates an interrupt (INTTB00 or INTTB01 respectively). (7) Timer fl[...]
-
Seite 129
TMP92CM22 2007-02-16 92CM22-127 3.8.3 SFRs TMRB0 Run Register 7 6 5 4 3 2 1 0 Bit symbol TB0RDE − I2TB0 TB0PRUN TB0RUN TB0RUN (1180H) Read/Write R/W R/W R/W After reset 0 0 0 0 0 TMRB0 Prescaler Up counter UC10 Function Double buffer 0: Disable 1: Enable Always write “0”. IDLE2 0: Stop 1: Operate 0: Stop and clear 1: Run (Count) 0 Stop and cl[...]
-
Seite 130
TMP92CM22 2007-02-16 92CM22-128 TMRB0 Mode Register 7 6 5 4 3 2 1 0 Bit symbol − − TB0CP0I TB0CPM1 TB0CPM0 TB0CLE TB0CLK1 TB0CLK0 TB0MOD (1182H) Read/Write R/W W R/W After reset 0 0 1 0 0 0 0 0 Function Always write “0”. Always write “0”. Software capture control 0: Software capturer 1: Undefined Capture timing 00: Disable 01: (Reserved[...]
-
Seite 131
TMP92CM22 2007-02-16 92CM22-129 TMRB1 Mode Register 7 6 5 4 3 2 1 0 Bit symbol TB1CT1 TB1ET1 TB1CP0I T B1CPM1 TB1CPM0 TB1CLE TB1CLK1 TB1CLK0 TB1MOD (1192H) Read/Write R/W W R/W After reset 0 0 1 0 0 0 0 0 TB1FF1 Inversion trigger 0: Trigger disable 1: Trigger enable Function Invert when UC12 is loaded in to TB1CP1H/ L Invert when UC12 matches with [...]
-
Seite 132
TMP92CM22 2007-02-16 92CM22-130 TMRB0 Flip-flop Control Registe r 7 6 5 4 3 2 1 0 Bit symbol − − TB0C1T1 TB0C0T1 TB0E1T1 TB0E0T1 TB0FFC1 TB0FFC0 TB0FFCR (1183H) Read/Write W R/W W * After reset 1 1 0 0 0 0 1 1 TB0FF0 inversion trigger 0: Trigger disable 1: Trigger enable Function Always write “11” . Invert when the UC10 value is loaded in t[...]
-
Seite 133
TMP92CM22 2007-02-16 92CM22-131 TMRB1 Flip-flop Control Registe r 7 6 5 4 3 2 1 0 Bit symbol TB1FF1C1 TB1FF1C0 TB1C1T1 TB1C0T1 TB1E1T1 TB1E0T1 TB1FFC1 TB1FFC0 TB1FFCR (1193H) Read/Write W * R/W W * After reset 1 1 0 0 0 0 1 1 TB1FF0 inversion trigger 0: Trigger disable 1: Trigger enable Function TB1FF1 control 00: Invert 01: Set 10: Clear 11: Don?[...]
-
Seite 134
TMP92CM22 2007-02-16 92CM22-132 TMRB0 register 7 6 5 4 3 2 1 0 bit Symbol − Read/Write W TB0RG0L (1188H) After reset Undefined bit Symbol − Read/Write W TB0RG0H (1189H) After reset Undefined bit Symbol − Read/Write W TB0RG1L (118AH) After reset Undefined bit Symbol − Read/Write W TB0RG1H (118BH) After reset Undefined bit Symbol − Read/Wri[...]
-
Seite 135
TMP92CM22 2007-02-16 92CM22-133 3.8.4 Operation in Each Mode (1) 16-bit interval tim er mode Generating interrupts at fixed intervals in th is example, th e interval time is set the timer register TB0RG1H/L to ge nerate the interrupt INTTB01. 7 6 5 4 3 2 1 0 TB0RUN ← 0 0 X X − 0 X 0 Stop TMRB0. INTETB0 ← X 1 0 0 X 0 0 0 Enable INTTB01 and set[...]
-
Seite 136
TMP92CM22 2007-02-16 92CM22-134 (3) 16-bit progra mmable pulse generation (PPG) output mode Square wave pulses can be generated at any frequency and duty rati o. The output pulse may be either low active or h igh active. The PPG mode is obtained by invers ion of the timer flip-flop TB0FF0 that is to be enabled by the match of the up counter UC10 wi[...]
-
Seite 137
TMP92CM22 2007-02-16 92CM22-135 The following block diagr am illustrates this mode. Figure 3.8.1 1 Block Diagram of 16-Bit PPG Mode The following ex ample shows how to s e t 16-bit PPG outp ut mode: 7 6 5 4 3210 TB0RUN ← 0 0 X X − 0 X 0 Disable the TB0RG0H/L double buffer and stop T MRB0. TB0RG0H/L ← * * * * * * * * Set the dut y ratio. * * *[...]
-
Seite 138
TMP92CM22 2007-02-16 92CM22-136 (4) Capture function examples Used capture functi on, they can be applicabl e in many ways, for examp l e: 1. One-shot pulse output from ext ernal trigger pulse 2. Frequency measurement 3. Pulse width measurement 4. Measurement of differenc e time 1. One-shot pulse output from ext ernal trigger pulse Set the up count[...]
-
Seite 139
TMP92CM22 2007-02-16 92CM22-137 Example: To output a 2 [ms] one-shot pul se with a 3 [ms] delay to the external trigger pulse via the TB1IN0 pin. * Clock state : Clock gear 1/1 (f c) Setting in Main Set free running. Count using φ T1. TB1MOD ← X X 1 0 1 001 Load into TB1CP 0H/L by rising edge of TB1IN0 pin input. TB1FFCR ← X X 0 0 0 010 C l e [...]
-
Seite 140
TMP92CM22 2007-02-16 92CM22-138 Figure 3.8.13 One-shot Pu lse Output (without delay) 2. Frequency measurement The frequenc y of the exter nal clock can be measured in this mode. Frequenc y is measured by the 8-bit timers TMRA23 and the 16-bit timer/event count er . TMRA23 is used to setting of meas urement time by inversion T A3FF . Counter clock i[...]
-
Seite 141
TMP92CM22 2007-02-16 92CM22-139 3. Pulse width measurement This mode allows m easuring the high level wi dth of an exter nal pulse. While keeping the 16-bit tim er/event counter counting (Free running) with the pres caler output clock input, external pu lse is input through the TB1 IN0 pin. Then the capture function is used to loa d the UC12 values[...]
-
Seite 142
TMP92CM22 2007-02-16 92CM22-140 4. Measurement of differenc e time This mode is used to measure the d ifference in time between the rising ed ges of external pulses inpu t through TB1IN0 and TB1IN1. Keep the 16-bit timer/ event counter (TMRB1 ) counting (Free running) with the prescaler output cloc k, and load the UC12 val ue into TB1CP0H/ L at the[...]
-
Seite 143
TMP92CM22 2007-02-16 92CM22-141 3.9 Serial Channels (SIO) The TMP92CM22 includes 2 serial I/O channels. Each chann el is called SIO0 and SIO1. For both channels ei ther UART M ode (Asynchronous transm ission) or I/O interface mod e (Synchronous transmissi on) can be selected. • I/O interface mode Mode 0 : For transmitting and receiving I/O dat a [...]
-
Seite 144
TMP92CM22 2007-02-16 92CM22-142 Figure 3.9.1 Data Form at Bit0 1 234567 Bit0 12345 6S t o p Start Bit0 12345 Parity Stop Start 6 Bit0 12345 7 Stop Start Bit0 12345 Parity Stop Start 7 6 6 Bit0 12345 8 Stop Start Bit0 1234 5 Stop Start Bit8 6 6 7 7 Transfer direction • Mode 0 (I/O interface mode) • Mode 1 (7-bit UART mode) No parity Parity No pa[...]
-
Seite 145
TMP92CM22 2007-02-16 92CM22-143 3.9.1 Block Diagram Figure 3.9.2 Block Diagram of SIO0 Selector φ T0 φ T2 φ T8 φ T32 SC0MOD0 <SC1:0> Receive buffer 1 (Shift register) RXDCLK SC0MOD0 <CTSE> Prescaler Selector TA0TRG (from TMRA0) UART mode BR0CR <BR0S3:0> Baud rate generater Selector SC0MOD0 <SM1:0> Selector ÷ 2 I/O inter[...]
-
Seite 146
TMP92CM22 2007-02-16 92CM22-144 Figure 3.9.3 Block Diagram of SIO1 Selector φ T0 φ T2 φ T8 φ T32 SC1MOD0 <SC1:0> Receive buffer 1 (Shift register) RXDCLK SC1MOD0 <CTSE> Prescaler Selector TA0TRG (from TMRA0) UART mode BR1CR <BR1S3:0> Baud rate generater Selector SC1MOD0 <SM1:0> Selector ÷ 2 I/O interface mode SC1CR <[...]
-
Seite 147
TMP92CM22 2007-02-16 92CM22-145 3.9.2 Operation of Each Circuit (1) Prescaler There is a 6-bit prescaler for generating a clock to SIO0. The clock selected using SYSCR1<GEAR2:0> is divided by 8 and input to the prescaler as φ T0. The prescaler can be run only case of selecting the baud ra te generat or as the serial transfer clock. T able 3.[...]
-
Seite 148
TMP92CM22 2007-02-16 92CM22-146 (2) Baud rate generator The baud rate generator is a circuit that ge nerates transmission and receivin g clocks that determine the transfer rate of th e serial channels. The input clock to the baud rate generator , φ T0, φ T2, φ T8, or φ T32, is generated by the 6-bit prescaler which is shared by the timers. One [...]
-
Seite 149
TMP92CM22 2007-02-16 92CM22-147 • Intege r divider (N divider) For example, when the f C = 39.3216 MHz, the input clock freq uency = φ T2, the frequency divider N (BR0CR<BR0S3:0>) = 8, and BR0CR<BR0ADDE> = 0, the baud rate in UART mode is as follows: ∗ Clock st at e Cloc k gear: 1/1 (f C ) f C /32 8 = 39.3216 × 10 6 ÷ 16 ÷ 8 ÷ [...]
-
Seite 150
TMP92CM22 2007-02-16 92CM22-148 T able 3.9.3 UART Baud Rate Sele ction (when using baud rate generater an d BR0 CR<BR0ADDE> = 0) Unit (k bps) f SYS [MHz] Input Clock Frequency Divider φ T0 (f SYS /4) φ T2 (f SYS /16) φ T8 (f SYS /64) φ T32 (f SYS /256) 9.8304 2 76.800 19.200 4.800 1.200 ↑ 4 38.400 9.600 2.400 0.600 ↑ 8 19.200 4.800 1.[...]
-
Seite 151
TMP92CM22 2007-02-16 92CM22-149 (3) Serial clock generation circuit This circuit generates the basic clock for transmitting and rec eiving data. • In I/O interface mode In SCLK output mode with th e setting SC0CR<IOC> = 0, th e basic clock is generated by div iding the ou tput of the baud rate gen erator by 2, as described previously . In S[...]
-
Seite 152
TMP92CM22 2007-02-16 92CM22-150 (6) The receivi ng buffers To prevent ov errun errors, the rec eiving buff ers are arranged in a double-buffer structure. Received data is stored o ne bit at a time in receiving bu ffer 1 (which is a shift register). When 7 o r 8 bits of data have be en stored in recei ving buffer 1, the stored data is transferred to[...]
-
Seite 153
TMP92CM22 2007-02-16 92CM22-151 Handshake function Use of CTS0 pin allows data to be sent in units of one d ata format; thus, overrun errors can be avoided. The handshake funct ion is enabled or disabl ed by the SC0MOD0<CTSE> setting. When the CTS0 pin condition is high level, after completed the current data transmission, data transmi ssion [...]
-
Seite 154
TMP92CM22 2007-02-16 92CM22-152 (9) T ransmission buffer The transmission buffer (SC0BUF) shifts out and sends the transmission data written from the CP U form the least significant bit in or der . When all the bits are shifted out, the transmission buffer becomes e mpty an d generat es an I NTTX0 interrupt. (10) Parity control circuit When SC0CR&l[...]
-
Seite 155
TMP92CM22 2007-02-16 92CM22-153 2. Parity error <PERR> The parity generat ed for the data sh ifted into re ceiving buffe r 2 (SC0BUF) is compared with the parity bit rec e ived via the RXD pin. If they are n ot equal, a parity error is generated. 3. Framing error <FERR> The stop bit for the received data is s a mpled three times arou nd[...]
-
Seite 156
TMP92CM22 2007-02-16 92CM22-154 3.9.3 SFRs 7 6 5 4 3 2 1 0 Bit symbol TB8 CTSE RXE WU SM1 SM0 SC1 SC0 SC0MOD0 (1202H) Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function T ra ns f e r data bit8 Handshake function control 0: CTS disable 1: CTS enable Receive control 0: Receive disable 1: Receive enable Wakeup function 0: Disable 1: Enable Serial tra[...]
-
Seite 157
TMP92CM22 2007-02-16 92CM22-155 7 6 5 4 3 2 1 0 Bit symbol TB8 CTSE RXE WU SM1 SM0 SC1 SC0 SC1MOD0 (120AH) Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function Transfer data bit8 Handshake function control 0: CTS disable 1: CTS enable Receive control 0: Receive disable 1: Receive enable Wakeup function 0: Disable 1: Enable Serial transmission mode 0[...]
-
Seite 158
TMP92CM22 2007-02-16 92CM22-156 7 6 5 4 3 2 1 0 Bit symbol RB8 EVEN PE OERR PERR FERR SCLKS IOC SC0CR (1201H) Read/Write R R/W R (Cleared to 0 when read) R/W After reset Undefined 0 0 0 0 0 0 0 Function 1: Error Received data bit8 Parity 0: Odd 1: Even Parity addition 0: Disable 1: Enable Overrun Parity Framing 0: SCLK0 1: SCLK0 0: Baud rate genera[...]
-
Seite 159
TMP92CM22 2007-02-16 92CM22-157 7 6 5 4 3 2 1 0 Bit symbol RB8 EVEN PE OERR PERR FERR SCLKS IOC SC1CR (1209H) Read/Write R R/W R (Cleared to 0 when read) R/W After reset Undefined 0 0 0 0 0 0 0 Function 1: Error Received data bit8 Parit y 0: Odd 1: Even Parity addition 0: Disable 1: Enable Overrun Parity Framing 0: SCLK1 1: SCLK1 0: Baud rate gener[...]
-
Seite 160
TMP92CM22 2007-02-16 92CM22-158 7 6 5 4 3 2 1 0 Bit symbol − BR0ADDE BR0CK1 BR0CK0 BR0S3 BR0S2 BR0S1 BR0S0 BR0CR (1203H) Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function Always write “0”. + (16 − K)/16 division 0: Disable 1: Enable 00: φ T0 01: φ T2 10: φ T8 11: φ T32 Divided frequency setting 7 6 5 4 3 2 1 0 Bit symbol BR0K3 BR0K2 B[...]
-
Seite 161
TMP92CM22 2007-02-16 92CM22-159 7 6 5 4 3 2 1 0 Bit symbol − BR1ADDE BR1CK1 BR1CK0 BR1S3 BR1S2 BR1S1 BR1S0 BR1CR (120BH) Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function Always write “0”. + (16 − K)/16 division 0: Disable 1: Enable 00: φ T0 01: φ T2 10: φ T8 11: φ T32 Divided frequency setting 7 6 5 4 3 2 1 0 Bit symbol BR1K3 BR1K2 B[...]
-
Seite 162
TMP92CM22 2007-02-16 92CM22-160 7 6 5 4 3 2 1 0 TB7 TB6 TB5 TB4 TB3 TB2 TB1 TB0 (for transmission) SC0BUF (1200H) 7 6 5 4 3 2 1 0 RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 (for receiving) Note: Prohibit read-mo dify-write for SC0BUF Figure 3.9.13 Serial Transmission/Rece iving Buffer Register (for SIO0 and SC0BUF) 7 6 5 4 3 2 1 0 Bit symbol I2S0 FDPX0 SC0MOD[...]
-
Seite 163
TMP92CM22 2007-02-16 92CM22-161 3.9.4 Operation in Each Mode (1) Mode 0 (I/O interface mode) This mode allows an increas e in the number o f I/O pins available for transm itting data to or receiving data from an external shift register . This mode includes the SCLK ou tput mode to output synchronous clock SCLK and SCLK input mode to in put external[...]
-
Seite 164
TMP92CM22 2007-02-16 92CM22-162 Bit0 Bit1 Bit6 Bit5 SCLK0 input (<SCLKS> = 0 rising mode) SCLK0 input (<SCLKS> = 1 falling mode) TXD0 ITX0C (INTTX0 interrupt request) 1. T ransmission In SCLK output mode 8 -bit data and a synchronous clock are ou tput on the TXD0 and SCLK0 pins respectively each time th e CPU writes the data to the tran[...]
-
Seite 165
TMP92CM22 2007-02-16 92CM22-163 2. Receiving In SCLK output mod e, the synchronou s clock is outputted from SCLK0 pin a nd the data is shifted to receiv ing buffer 1. This starts when the receive interrupt flag INTES0<IRX0C> is cleared by reading th e received data. When 8-bit data are received, the data will be transferred to receiving buffe[...]
-
Seite 166
TMP92CM22 2007-02-16 92CM22-164 3. T ransmission and receiving (Full duplex mode) When the full duplex m ode is used, set the leve l of receive inter rupt to “0” and set enable the in terrupt level (1 to 6) to the transfer interru pts. In the transfer interrupt program, the r e ceiving operation shou ld be done lik e the below exa mple before s[...]
-
Seite 167
TMP92CM22 2007-02-16 92CM22-165 (2) Mode 1 (7-bit UART mode) 7-bit UART mode is selected by se tting serial channel mode register SC0MOD0<SM1:0> to 01. In this mode, a parity bit can be added. Use of a parity bit is enabl ed or disabl ed by the setting of the serial channel control re gister S C0CR<PE> bit; whether even parity or odd pa[...]
-
Seite 168
TMP92CM22 2007-02-16 92CM22-166 (4) Mode 3 (9-bit UART mode) 9-bit UART mode is selected by set ting SC0MOD0<SM1:0> to 1 1. In this mode parity bit cannot be added. In the case of transmission the MSB (9th bit) is programmed to SC0MOD0<TB8>. In the case of receiving it is stor ed in SC0 CR<RB8>. When the buffer is writt en and rea[...]
-
Seite 169
TMP92CM22 2007-02-16 92CM22-167 Protocol 1. Select 9-bit UART mode on the master and slave controllers. 2. Set the SC0MOD0<WU> bit on each slave co ntroll er to 1 to enable data receiving. 3. The master control ler transmits one- frame data including the 8- bit select code for the slave controll ers. The MSB (Bit8) <TB8> is set to “1?[...]
-
Seite 170
TMP92CM22 2007-02-16 92CM22-168 Example: To link two slave controllers serially with the master controller using the system clock f IO as the transfer cl ock. • Master controller setting Main routine PFCR ← − − − − − − 01 PFFC ← − − − − − − X1 Set PF0 to TXD0, and set PF1 to RXD0 pin. INTES0 ← 1 1 0 0 1 1 0 1 Set INT[...]
-
Seite 171
TMP92CM22 2007-02-16 92CM22-169 3.9.5 Support for IrDA Mode SIO0 includes support for the IrDA 1.0 in frared data communication specificat ion. Figure 3.9.24 shows the block diagr am. Figure 3.9.24 Block Diagram of IrDA (1) Modulation of transmission data When the transmission data is 0, output “H” level with eith er 3/16 or 1/16 times for widt[...]
-
Seite 172
TMP92CM22 2007-02-16 92CM22-170 (3) Data format Format of transmission/receiving must set to data length 8-bit, without parity bit, 1 bit of stop bit. Any other settings don’ t guarantee the normal op eration. (4) SFR Figure 3.9.27 shows the control regist er SIRCR. If chang e setting this register , must set it after set operati on of transmissi[...]
-
Seite 173
TMP92CM22 2007-02-16 92CM22-171 As the same reason, + (16 − K)/16 d ivision function in the baud rate gene rator of SIO0 cannot be used to generate 1 15.2 kbps baud rate. Also when the 38.4 kbps and 1/16 pulse width, + (16 − K)/16 division function cannot be used. T able 3.9.5 shows baud rate and pulse width for (16 − K)/16 division function.[...]
-
Seite 174
TMP92CM22 2007-02-16 92CM22-172 3.10 Serial Bus Interface (SBI) The TMP92CM22 has a 1-channel serial bus int erface. Serial bus int erface (SBI0) include following 2 o peration modes. • I 2 C bus mode (Multi mast er) • Clocked-synchron ous 8-bit SIO mode The serial bus interface is connected t o an ex ternal device through P91 (SDA) and P92 (SC[...]
-
Seite 175
TMP92CM22 2007-02-16 92CM22-173 3.10.2 Control The following re gisters are used to c ontrol the serial b us interface and m onitor the operation status. • Serial bus interface 0 control register 1 (SBI0CR1) • Serial bus interface 0 control register 2 (SBI0CR2) • Serial bus interface 0 data buffer register (S BI0DBR) • I 2 C bus 0 address r[...]
-
Seite 176
TMP92CM22 2007-02-16 92CM22-174 3.10.4 I 2 C Bus Mode Control Register The following regist ers are used to control and monitor the operation status when us ing the serial bus inter face (SBI) in the I 2 C bus m ode. Serial Bus Interface Control Register 1 7 6 5 4 3 2 1 0 Bit symbol BC2 BC1 BC0 ACK SCK2 SCK1 SCK0/ SWRMON SBI0CR1 (1240H) Read/Write [...]
-
Seite 177
TMP92CM22 2007-02-16 92CM22-175 Serial Bus Interface Control Register 2 7 6 5 4 3 2 1 0 Bit symbol MST TRX BB PIN SBIM1 SBIM0 SWRST1 SWRST0 SBI0CR2 (1243H) Read/Write W W (Note 1) W (Note 1) After reset 0 0 0 1 0 0 0 0 Read- modify-write instruction is prohibited. Function Master/ slave selection Transmitter/ receiver selection Start/stop condition[...]
-
Seite 178
TMP92CM22 2007-02-16 92CM22-176 Serial Bus Interface S tatus Register 7 6 5 4 3 2 1 0 Bit symbol MST TRX BB PIN AL AAS AD0 LRB SBI0SR (1243H) Read/Write R After reset 0 0 0 1 0 0 0 0 Read- modify-write instruction is prohibited. Function Master/ slave status selection monitor Transmitter/ receiver status selection monitor I 2 C bus status monitor I[...]
-
Seite 179
TMP92CM22 2007-02-16 92CM22-177 Serial Bus Interface Baud Rate Register 0 7 6 5 4 3 2 1 0 Bit symbol − I2SBI0 SBI0BR0 (1244H) Read/Write W R/W After reset 0 0 Function Always write “0”. IDLE2 0: Stop 1: Run 0 Stop 1 Run Serial Bus Interface Baud Rate Register 1 7 6 5 4 3 2 1 0 Bit symbol P4EN − SBI0BR1 (1245H) Read/Write W After reset 0 0 F[...]
-
Seite 180
TMP92CM22 2007-02-16 92CM22-178 3.10.5 Control in I 2 C Bus Mode (1) Acknowledge mode spe cification Set the SBI0CR1<A C K> to 1 for oper ation in the acknowledge mode. The TMP92CM22 generates an addit ional clock pulse for an acknowledge signal wh en operating in master mode . In the transmitter mode during th e clock pulse cycle, the SDA pi[...]
-
Seite 181
TMP92CM22 2007-02-16 92CM22-179 2. Clock synchronization In the I 2 C bus mode, in order to wir ed-AND a bus, a master device which pulls down a clock line to l ow level, in the fir st place, invalidate a clock pulse of an other master device which g enerates a high- level clock pulse. The ma ster device with a high-level clock puls e needs to dete[...]
-
Seite 182
TMP92CM22 2007-02-16 92CM22-180 (6) Transmitter/receiver selection Set the SBI0CR2<TRX> to “1” for oper atin g the TMP92CM22 as a transmitter. Clear the <TRX> to “0” for operation as a receiver . In slave mo de, when transfer dat a in addressing format, when received sla v e addr ess is same value wi th setting value to I2C0AR, [...]
-
Seite 183
TMP92CM22 2007-02-16 92CM22-181 (8) Interrupt service requests and interrupt cancellation When a serial bus interface interrupt request 0 (INTSBE0) occurs, the SBI0S R2 <PIN> is cleared to “0”. During the time that the SBI0SR2<PIN> is “0”, the SCL line is pulled down to the low level. The <PIN> is cleared to “0” wh en [...]
-
Seite 184
TMP92CM22 2007-02-16 92CM22-182 The TMP92CM 22 compares the l evels on the bus’s SDA li ne with those of the internal SDA output on the rising ed ge of the SCL line. If the levels do not match, arbitration is lost and SBI 0SR<AL> is set to “1”. When SBI0SR<AL> is set to “1”, SBI0SR <MST, TRX> are cleared to “00” and [...]
-
Seite 185
TMP92CM22 2007-02-16 92CM22-183 (14) Software reset function The software reset function is used t o init ialize the SBI circuit, when S BI is rocked by external noises, etc. When write first “10” next “01” to SBI0CR 2<SWRST1:0>, reset signal is inputted to serial bus interface c ircuit, and circuit is ini tialized. All com mand regis[...]
-
Seite 186
TMP92CM22 2007-02-16 92CM22-184 3.10.6 Data Tr ansfer in I 2 C Bus Mode (1) Device initializati on In first, set the SBI0BR1 <P4EN>, SBI0 CR1<ACK, SCK2:0>. Set SBI0B R1<P4EN> to “1” and clear bits 7 to 5 and 3 in the SBI0 CR1 to “0”. Next, set a slave address <SA6:0> and the <ALS> (<ALS> = “0” when an[...]
-
Seite 187
TMP92CM22 2007-02-16 92CM22-185 Figure 3.10.13 S tart Conditi on and Slave Address Generation (3) 1-wo rd da ta t ransfer Check the <MST> by the INTSBE0 interrupt process after the 1-w ord data transfer is completed, and det ermine whether t he mode is a master or slave. 1. If <MST> = “1” (Master mode) Check the <TRX> an d det[...]
-
Seite 188
TMP92CM22 2007-02-16 92CM22-186 When the <TRX> is “0” (Receiver mode) When the next transmitted data is other than 8 bits, set <BC2:0> <ACK> and read the rece ived data from SBI0DBR to rel ease the SCL lin e (Data which is read immediately after a slave address is sent is und efined). After the data is read, <PIN> be com[...]
-
Seite 189
TMP92CM22 2007-02-16 92CM22-187 2. If <MST> = 0 (Slave mode) In the slave mod e the TMP92C M22 operates eith er in normal slav e mode or in slave mode after losing ar bitration. In the slave mode, an INTS BE0 interrupt request gener ate when the TMP92CM22 rece ives a slave addre ss or a GENERAL CALL from the master device, or when a GENERAL C[...]
-
Seite 190
TMP92CM22 2007-02-16 92CM22-188 (4) Stop condition generation When SBI0SR<BB> = 1, the sequence for gen erating a stop conditio n is started by writing “111” to SBI0CR2<MST, TRX, PIN> and “0” to SBI0CR2<BB>. Do not modify the contents of S B I0CR2<MST, TR X, PIN, BB> until a stop c ondition has been generated on the [...]
-
Seite 191
TMP92CM22 2007-02-16 92CM22-189 (5) Restart Restart is used during data transfer between a master d e vice and a slave d e vice to change the data transfer direction. The following descrip tion explains how to restart when this device is in the master mo de. Clear the SBI0CR2< MST, TRX, BB> to “000 ” and set the SBI0CR2<PIN> t o “[...]
-
Seite 192
TMP92CM22 2007-02-16 92CM22-190 3.10.7 Clocked-synchronous 8-bit SIO Mode Control The following reg isters are used to control and monit or the operation status when the serial bus interface (SBI ) is being operated in clocked synchro nous 8-bit SIO mode. Serial Bus Interface 0 Control Register 1 7 6 5 4 3 2 1 0 Bit symbol SIOS SIOINH SIOM1 SIOM0 S[...]
-
Seite 193
TMP92CM22 2007-02-16 92CM22-191 Serial Bus Interface 0 Control Register 2 7 6 5 4 3 2 1 0 Bit symbol SBIM1 SBIM0 − − SBI0CR2 (1243H) Read/Write W After reset 0 0 0 0 Read- modify-write instruction is prohibited. Function Serial bus interface operation mode selection 00: Port mode 01: SIO mode 10: I 2 C bus mode 11: (Reserved) (Note 2) (Note 2) [...]
-
Seite 194
TMP92CM22 2007-02-16 92CM22-192 (1) Serial Clock 1. Clock source SBI0CR1<SCK2:0> is used to se lect the following function s: Internal clock In internal clock mode on e of seven frequencies can be selected. The serial clock signal is output to th e outside on the SCK p in. When the device is wri ting (in transmit m ode) or reading ( in receiv[...]
-
Seite 195
TMP92CM22 2007-02-16 92CM22-193 2. Shift edge Data is transmitted on the leading ed ge of the clock and received on the trailing edge. Leading edge shift Data is shifted on the lea ding edge of the serial clock (on the fal ling edge of t he SCK pin i nput/out put). T railing edge shift Data is shifted on the trailing edg e of the serial clock (on t[...]
-
Seite 196
TMP92CM22 2007-02-16 92CM22-194 (2) Transfer modes The SBI0CR1<SIOM1: 0> is used to select a transmit, receiv e or transmit/receive mode. 1. 8-bit transmit mode Set a control register to a transmit mode and write transmission data to the SBI0DBR. After the transmit data has been written, set the SBI0 CR1<SIOS> to “1” to start data t[...]
-
Seite 197
TMP92CM22 2007-02-16 92CM22-195 Figure 3.10.25 T ransmission Mode Example: Program to stop data transmissi on (when an external clock is used) STEST1 : BIT 2, (SBI0SR) ; If <SEF> = 1 th en loop. JR NZ, STEST1 STEST2 : BIT 0, (P9) ; If SCK = 0 then loop. JR Z, STEST2 LD (SBI0CR1), 00000111B ; <SIOS> ← 0 b b 7 * <SIOS> (a) Interna[...]
-
Seite 198
TMP92CM22 2007-02-16 92CM22-196 Figure 3.10.26 T ransmission Data Hold Time at End Tra nsmit 2. 8-bit receive mode Set the control register to receive mode and s et the SBI0CR1<SIOS> to “1” for switching to receiv e mode. Data is rec e ived into th e shift register via the SI pin and synchronized with the serial clock, starting from the l[...]
-
Seite 199
TMP92CM22 2007-02-16 92CM22-197 Figure 3.10.27 Receiver Mode (Example: Internal clock) 3. 8-bit transmit/receive mode Set a control register to a transmit/recei ve mod e and write data to the SBI0D BR. After the data is w ritten, set the SBI0CR<SIOS> to “1” t o start transmitting/receiving. When data is transmitt ed, the data is output fr[...]
-
Seite 200
TMP92CM22 2007-02-16 92CM22-198 Figure 3.10.28 T ransmission/Receiving Mode (when an extern al cl ock is used) Figure 3.10.29 T ransmission Data Hol d T ime at End of Transmi ssion/Receiving (T ransmission/receiving mode) * a 7 d b 7 <SIOS> a 2 a 1 a 4 a 3 a 6 a 5 b 0 b 2 b 1 b 4 b 3 b 6 b 5 a 0 Clear <SIOS> <SIOF> <SEF> SCK[...]
-
Seite 201
TMP92CM22 2007-02-16 92CM22-199 3.11 Analog/Digital Converter The TMP92CM22 incorpora tes a 10-bit succe ssive appr oximation-type analog/digital converter (AD converter) with 8-channel an alog input. Figure 3.1 1.1 is a block diagram of the AD c onverter . The 8-channel analog input pins (AN 0 to AN7) are shared with th e input-only port G so they[...]
-
Seite 202
TMP92CM22 2007-02-16 92CM22-200 3.11.1 Analog/Digital Converter Registers The AD convert er is controlled by the three AD m ode control re gisters: ADMOD0, ADMOD1, and ADMOD2. The eigh t AD conversion data result registers (ADREG0H/L to ADREG7H/L) stor e the results of AD conversion. Figure 3.1 1.2 shows the registers relate d to the AD converter. [...]
-
Seite 203
TMP92CM22 2007-02-16 92CM22-201 AD Mode Control Register 1 7 6 5 4 3 2 1 0 Bit symbol VREFON I2AD − − − ADCH2 ADCH1 ADCH0 ADMOD1 (12B9H) Read/Write R/W After reset 0 0 0 0 0 0 0 0 Function VREF application control 0: OFF 1: ON IDLE2 0: Stop 1: Operate Always write “0”. Always write “0”. Always write “0”. Analog input channel selec[...]
-
Seite 204
TMP92CM22 2007-02-16 92CM22-202 AD Conversion Result Registe r 0 Lo w 7 6 5 4 3 2 1 0 Bit symbol ADR01 ADR00 ADR0RF ADREG0L (12A0H) Read/Write R R After reset Undefined 0 Function Stores lower 2 bits of AD conversion result AD conversion data storage flag 1: Conversion result stored AD Conversion Result Registe r 0 Hig h 7 6 5 4 3 2 1 0 Bit symbol [...]
-
Seite 205
TMP92CM22 2007-02-16 92CM22-203 AD Conversion Result Registe r 2 Lo w 7 6 5 4 3 2 1 0 Bit symbol ADR21 ADR20 ADR2RF ADREG2L (12A4H) Read/Write R R After reset Undefined 0 Function Stores lower 2 bits of AD conversion result. AD con version data storage flag 1: Conversion result stored AD Conversion Result Registe r 2 Hig h 7 6 5 4 3 2 1 0 Bit symbo[...]
-
Seite 206
TMP92CM22 2007-02-16 92CM22-204 AD Conversion Result Registe r 4 Lo w 7 6 5 4 3 2 1 0 Bit symbol ADR41 ADR40 ADR4RF ADREG4L (12A8H) Read/Write R R After reset Undefined 0 Function Stores lower 2 bits of AD conversion result. AD conversion data storage flag 1: Conversion result stored AD Conversion Result Registe r 4 Hig h 7 6 5 4 3 2 1 0 Bit symbol[...]
-
Seite 207
TMP92CM22 2007-02-16 92CM22-205 AD Conversion Result Registe r 6 Lo w 7 6 5 4 3 2 1 0 Bit symbol ADR61 ADR60 ADR6RF ADREG6L (12ACH) Read/Write R R After reset Undefined 0 Function Stores lower 2 bits of AD conversion result. AD conversion data storage flag 1:Conversion result sto red AD Conversion Result Registe r 6 Hig h 7 6 5 4 3 2 1 0 Bit symbol[...]
-
Seite 208
TMP92CM22 2007-02-16 92CM22-206 3.11.2 Description of Operation (1) Analog reference voltage A high-level anal og reference voltage i s applied to the VREFH pin; a low-leve l analog reference voltag e is applied to the VREFL pin. To perform AD c onversion, the reference voltage, the difference between VREF H and VREFL, is divided by 1024 using stri[...]
-
Seite 209
TMP92CM22 2007-02-16 92CM22-207 (3) Starting AD conversion To start AD conversion, program “1” to AD MOD0<ADS> in AD mode contro l register 0, or ADMOD1<ADTRGE> in AD m ode control register 1 and input fall ing edge on ADTRG pin. When AD conversion starts, the AD conversion busy flag ADMOD0<ADBF> will b e set to “1”, indic[...]
-
Seite 210
TMP92CM22 2007-02-16 92CM22-208 3. Channel fixed repeat conversion mode Setting ADMOD0<REP EAT> and ADMOD0<SCAN> to “10” selects conversion channel fixed repeat conversion mode. In this mode data on one specified channe l is converted re peatedly. When conversion has been completed, ADMOD 0<EOCF> is set to “1” an d ADMOD0&[...]
-
Seite 211
TMP92CM22 2007-02-16 92CM22-209 (5) AD conversion time 84 states (8.4 μ s at f SYS = 20 MHz) are require d for the AD conver sion of one channe l. (6) Storing and reading the results of AD conv ersion The AD conversion da ta upper and lower registers (ADREG0 H/L to ADREG7H/L) store the results of AD convers ion. (ADREG0H /L to ADREG7H/L are read -[...]
-
Seite 212
TMP92CM22 2007-02-16 92CM22-210 Example: 1. Convert the analog input volt age on the AN3 pin a nd write the result, to m emory address 0800H using the AD in terrupt (INTAD) processin g routine. Setting of main routine 7 6 543210 INTE0AD ← X 1 0 0 − − − − Enable INTAD and set it to interrupt level 4. ADMOD1 ← 1 1 000011 S e t p i n A N 3[...]
-
Seite 213
TMP92CM22 2007-02-16 92CM22-21 1 3.12 W atchdog T imer (Runaway detection timer) The TMP92CM22 contains a watchdog timer of ru naway detecting. The watchdog timer (WDT ) is used to return the CPU to th e normal state when it detects that the CPU has started to malfunc tion (Runaway) due to causes such as nois e. When the watchdog timer de tects a m[...]
-
Seite 214
TMP92CM22 2007-02-16 92CM22-212 3.12.2 Operation The watchdog timer generates an INT WD interrupt when the detection tim e set in the WDMOD<WDTP1:0> has elaps e d. The watchdog timer must be clear e d “0” in software before an INTWD interrupt will b e generated. If the CPU malfunctions (e.g., if runaway occurs) due to causes such as noise[...]
-
Seite 215
TMP92CM22 2007-02-16 92CM22-213 3.12.3 Control Registers The watchdog timer (WDT) is contr olled by two control register s WDMOD and WDCR. (1) W atchdog timer mode register (WDMOD) 1. Setting the detection time for the watchdog tim e r in <WDTP1:0> This 2-bit register is used for s etting the watchdog timer int errupt time used when de tectin[...]
-
Seite 216
TMP92CM22 2007-02-16 92CM22-214 7 6 5 4 3 2 1 0 Bit symbol WDTE WDTP1 WDTP0 − I2WDT RESCR − WDMOD (1300H) Read/Write R/W R/W After reset 1 0 0 0 0 0 0 Function WDT control 1: Enable Select detecting time 00: 2 15 /f IO 01: 2 17 /f IO 10: 2 19 /f IO 11: 2 21 /f IO Always write “0” IDLE2 0: Stop 1: Operate 1: Internally connects WDT out to th[...]
-
Seite 217
TMP92CM22 2007-02-16 92CM22-215 4. Electrical Characteristics 4.1 Absolute Maximum Ratings Parameter Symbol Rating Unit Power supply voltage Vcc − 0.5 to 4.0 Input voltage VIN − 0.5 to Vcc + 0.5 V Output current (1 pin) IOL 2 Output current (1 pin) IOH − 2 Output current (Total) Σ IOL 80 Output current (Total) Σ IOH − 80 mA Power dissipat[...]
-
Seite 218
TMP92CM22 2007-02-16 92CM22-216 DC Characteristic s (1/2 ) Vcc = 3.3 ± 0.3 V /fc = 4 to 40 MHz/Ta = − 40 to 85°C Parameter Sym bol Condition Min Typ. Max Unit Power supply voltage (DVCC = AVCC) (DVSS = AVSS = 0 V) V CC fc = 4 to 40 MHz (f SYS = 125 kHz to 20 MHz) 3.0 3.6 V Input low voltage P00 to P07 (D0 to D7) P10 to P17 (D8 to D15) V IL0 0.6[...]
-
Seite 219
TMP92CM22 2007-02-16 92CM22-217 DC Characteristic s (2/2 ) Vcc = 3.3 ± 0. 3 V/fc = 4 to 40 MHz/Ta = − 40 to 85°C Parameter Symbol Con dition Min Typ. Max Unit Output low voltage V OL IOL = 1.6 mA 0.45 Output high voltage V OH IOH = − 400 μ A 2.4 V Input leakage current I LI 0.0 ≤ Vin ≤ VCC 0.02 5 Output leakage current I LO 0.2 ≤ Vin ?[...]
-
Seite 220
TMP92CM22 2007-02-16 92CM22-218 4.2 AC Characteristics 4.2.1 Basis Bus Cycle Read cycle Vcc = 3.3 ± 0.3 V/fc = 4 to 40 MHz/Ta = − 40 to 85°C No. Parameter Symbol Min Max f SYS = 20 MHz (fc = 40 MHz ) f SYS = 125 kHz (fc = 4 MHz) Unit 1 OSC period (X1/ X2) t OSC 25 250 25 250 ns 2 System clock period ( = T) t CYC 50 8000 50 8000 ns 3 CLK OUT l o[...]
-
Seite 221
TMP92CM22 2007-02-16 92CM22-219 (1) Read cycle (0 waits, fc = f OSCH , f FPH = fc/1) Note: The phase relation between X1 input signal and the ot her signals is unsettled. The timing chart above is an example. CLKOUT t CL t TK t AD t H A WAIT A 0 to A23 X1 t OSC CSx t CYC t CH t KT t AR t RK t HR t RR D0 to D31 Data input RD t RD R/ W[...]
-
Seite 222
TMP92CM22 2007-02-16 92CM22-220 (2) Write cycle (0 waits, fc = f OSCH , f FPH = fc/1) Note: The phase relation between X1 input signal and the ot her signals is unsettled. The timing chart above is an example. X1 CLKOUT A 0 to A23 D0 to D31 WAIT RD Data output t OSC t CL t CH t CYC t TK t KT t AW t WK t WA t WW t DW t WD t RDO CSx WRxx R/ W[...]
-
Seite 223
TMP92CM22 2007-02-16 92CM22-221 (3) Read cycle (1 wait) (4) W rite cycle (1 wait ) A 0 to A23 WAIT Data input t RD3 t RR3 t AD3 CLKOUT D0 to D31 RD CSx R/ W A 0 to A23 WAIT Data out p ut CLKOUT D0 to D31 RD CSx t WW3 t DW3 t RD0 WRxx R/ W[...]
-
Seite 224
TMP92CM22 2007-02-16 92CM22-222 4.2.2 Page ROM Read Cycle (1) 3-2- 2-2 mode Vcc = 3.3 ± 0.3 V/fc = 4 to 40 MHz/Ta = − 40 to 85° C No. Parameter Symbol Min Max f SYS = 20 MHz (fc = 40 MHz ) f SYS = 125 kHz (fc = 4 MHz) Unit 1 S ystem clock period ( = T) t CYC 50 8000 50 8000 ns 2 A0, A1 → D0 to D31 input t AD2 2.0T − 50 50 15950 ns 3 A2 to A[...]
-
Seite 225
TMP92CM22 2007-02-16 92CM22-223 4.3 AD Conversion Characteristics Parameter Symbol Min Typ. Max Unit Analog reference voltage ( + ) V REFH VCC − 0.2 VCC VCC Analog reference voltage ( − ) V REFL VSS VSS VSS + 0.2 AD converter power supply voltage A VCC VCC VCC VCC AD converter power supply ground A VSS VSS VSS VSS Analog input voltage A VIN VRE[...]
-
Seite 226
TMP92CM22 2007-02-16 92CM22-224 4.5 Serial Channel T iming (I/O interface mode) Note: S ymbol “X” in the following table means the period of clock “f SYS ”, it’s same period of the system clock “f SYS ” for CPU core. The period of f SYS depends on the clock gear setting or changing high-speed oscillator/low-speed oscillator and so on.[...]
-
Seite 227
TMP92CM22 2007-02-16 92CM22-225 4.6 Interrupt, Capture Note: S ymbol “X” in the following table means the period of clock “f SYS ”, it’s same period of the system clock “f SYS ” for CPU core. The period of f SYS depends on the clock gear setting or changing high-speed oscillator/low-s peed oscillator and so on. (1) NMI and INT0 to INT[...]
-
Seite 228
TMP92CM22 2007-02-16 92CM22-226 4.7 Recommended Oscillation Circuit TMP92CM22 is evaluat ed by below os cillator vender . When selecting ext ernal parts, make use of this information. Note 1: T otal loads value of oscill ation is sum of external (or internal) loads (C1 and C2) and floating loads of actual assemble board. There is a possibility of m[...]
-
Seite 229
TMP92CM22 2007-02-16 92CM22-227 (2) TMP92CM22 recommended ceramic oscillator: Murata Manufacturing Co., Ltd. Following tabl e shows circ uit parameter recommende d. Parameter of Element s Running Con dition IC Name Oscillation Frequency [MHz] T ype Item of Oscillator (Old number ) C1 [pF] C2 [pF] Rf [ Ω ] Rd [ Ω ] Voltage of Power [V] Tc [ ° C] [...]
-
Seite 230
TMP92CM22 2007-02-16 92CM22-228 5. T able of S pecial Function Registers (SFRs) The SFRs includ e the I/O ports and p eripheral contr o l registers all ocated to the 8 K bytes address space from 000000H to 001FFFH. (1) I/O port (2) Interrupt controller (3) DMA controller (4) Memory controller (5) Clock gear/PLL (6) 8-bit timer (7) 16-bit timer (8) [...]
-
Seite 231
TMP92CM22 2007-02-16 92CM22-229 T able 5.1 I/O Register Address Map [1] I/O port Address Name Address Name Address Name Address Name 0000H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH P1 P1CR P1FC 0010H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH P4 P4CR P4FC P5 P5CR P5FC P6 P6CR P6FC P7 P7CR P7FC 0020H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH[...]
-
Seite 232
TMP92CM22 2007-02-16 92CM22-230 [2] Interrupt controller [3] DMA controller Address Name Address Name Address Name Address Name 00D0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH INTE12 INTE3 INTETA01 INTETA23 INTETB0 INTETBO0 INTES0 INTES1 00E0H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH INTE45 INTETB1 INTETBO1 INTESB0 INTEP0 00F0H 1H 2H 3H 4H 5[...]
-
Seite 233
TMP92CM22 2007-02-16 92CM22-231 [6] 8-bit timer [7] 16-bit timer [8] UART/SIO Address Name Address Name Addre ss Name Address Name 1100H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH TA01RUN TA0REG TA1REG TA01MOD TA1FFCR TA23RUN TA2REG TA3REG TA23MOD TA3FFCR 1180H 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH DH EH FH TB0RUN TB0MOD TB0FFCR TB0RG0L TB0RG0H TB0[...]
-
Seite 234
TMP92CM22 2007-02-16 92CM22-232 (1) I/O port (1/3) Symbol Name Address 7 6 5 4 3 2 1 0 P17 P16 P15 P14 P13 P12 P11 P10 R/W P1 Port 1 0004H Data from external port (Output latch register is cleared to “0”) P47 P46 P45 P44 P43 P42 P41 P40 R/W P4 Port 4 0010H Data from external port (Output latch register is cleared to “0”) P57 P56 P55 P54 P53[...]
-
Seite 235
TMP92CM22 2007-02-16 92CM22-233 I/O port (2/3) Symbol Name Address 7 6 5 4 3 2 1 0 P17C P16C P15C P14C P13C P12C P11C P10C W 0 0 0 0 0 0 0 0 P1CR Port 1 control register 0006H (Prohibit RMW) 0: Input 1: Output P 1 F W 0/1 P1FC Port 1 function register 0007H (Prohibit RMW) 0: Port 1: Data bus (D8 to D15) P47C P46C P45C P44C P43C P42C P41C P40C W 0 0[...]
-
Seite 236
TMP92CM22 2007-02-16 92CM22-234 I/O port (3/3) Symbol Name Address 7 6 5 4 3 2 1 0 P92C P91C P90C W 0 0 0 P9CR Port 9 control register 0026H (Prohibit RMW) 0: Input 1: Output P92F P91F P90F W 0 0 0 P9FC Port 9 function register 0027H (Prohibit RMW) 0: Port, SI 1: SCL Note 0: Port 1: SO, SDA 0: Port, SCK input 1: SCK output Note P92ODE P91ODE W 0 0 [...]
-
Seite 237
TMP92CM22 2007-02-16 92CM22-235 (2) Interrupt control (1/2) Symbol Name Address 7 6 5 4 3 2 1 0 INT2 INT1 I2C I2M2 I2M1 I2M0 I1C I1M2 I1M1 I1M0 R R/W R R/W 0 0 0 0 0 0 0 0 INTE12 INT1 & INT2 enable 00D0H 1: INT2 Interrupt r equest level. 1: INT1 Interrupt req uest level − INT3 − − − − I3C I3M2 I3M1 I3M0 − − − − R R/W 0 0 0 0 0[...]
-
Seite 238
TMP92CM22 2007-02-16 92CM22-236 Interrupt control (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 − INTP0 − − − − IP0C IP0M2 IP0M1 IP0M0 − − − − R R/W 0 0 0 0 0 0 0 0 INTEP0 INTP0 enable 00EEH Alwa ys wr i t e “0” . 1: INTP0 Interrupt reque st level INTAD INT0 IADC IADM2 IADM1 IADM0 I0C I0M2 I0M1 I0M0 R R/W R R/W 0 0 0 0 0 0 0 0 INT[...]
-
Seite 239
TMP92CM22 2007-02-16 92CM22-237 (3) DMA controller Symbol Name Address 7 6 5 4 3 2 1 0 DMA0V5 DMA0V4 DMA0V3 DMA0V2 DMA0V1 DMA0V0 R/W 0 0 0 0 0 0 DMA0V DMA0 start vector 0100H DMA0 start vector DMA1V5 DMA1V4 DMA1V3 DMA1V2 DMA1V1 DMA1V0 R/W 0 0 0 0 0 0 DMA1V DMA1 start vector 0101H DMA1 start vector DMA2V5 DMA2V4 DMA2V3 DMA2V2 DMA2V1 DMA2V0 R/W 0 0 0[...]
-
Seite 240
TMP92CM22 2007-02-16 92CM22-238 (4) Memory contr oller (1/2) Symbol Name Address 7 6 5 4 3 2 1 0 B0WW2 B0WW1 B0WW0 B0WR2 B0WR1 B0WR0 W W 0 1 0 0 1 0 B0CSL Block 0 MEMC control register low 0140H (Prohibit RMW) Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 111: 4 waits 011: WAIT pin Others: Reserved Read waits 001: 0 waits 010: 1 wa[...]
-
Seite 241
TMP92CM22 2007-02-16 92CM22-239 Memory control ler (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 BEXWW2 BEXWW1 BEXWW0 BEXWR2 BEXWR1 BEXWR0 W W 0 1 0 0 1 0 BEXCSL Block EX MEMC control register low 0158H (Prohibit RMW) Write waits 001: 0 waits 010: 1 wait 101: 2 waits 110: 3 waits 111: 4 waits 011: WAIT pin Others: Reserved Read waits 001: 0 waits 010: [...]
-
Seite 242
TMP92CM22 2007-02-16 92CM22-240 (5) Clock gear Symbol Name Address 7 6 5 4 3 2 1 0 − − R/W R/W 1 0 SYSCR0 System clock control 0 10E0H Always write “1”. A l w a y s write “0”. − GEAR2 GEAR1 GEAR0 R / W 0 1 0 0 SYSCR1 System clock control 1 10E1H A l w a y s write “0”. Select gear value of high frequency (fc) 000: fc 001: fc/2 010:[...]
-
Seite 243
TMP92CM22 2007-02-16 92CM22-241 (6) 8-bit timer Symbol Name Address 7 6 5 4 3 2 1 0 TA0RDE I2TA01 TA01PRUN TA1RUN TA0RUN R/W R/W 0 0 0 0 0 TMRA01 prescaler UP counter (UC1) UP counter (UC0) TA01RUN TMRA01 RUN register 1100H Double buffer 0: Disable 1: Enable IDLE2 0: Stop 1: Operate 0: Stop and clear 1: Run (Cou nt up) − W TA0REG 8-bit timer regi[...]
-
Seite 244
TMP92CM22 2007-02-16 92CM22-242 (7) 16-bit timer (1/2) Symbol Name Address 7 6 5 4 3 2 1 0 TB0RDE − I2TB0 TB0PRUN TB0RUN R/W R/W R/W 0 0 0 0 0 TMRB0 prescaler UP counter (UC10) TB0RUN Timer B0 RUN register 1180H Double buffer 0: Disable 1: Enable Always write “0”. IDLE2 0: Stop 1: Operate 0: Stop and clear 1: Run (Count up) − − TB0CP0I TB[...]
-
Seite 245
TMP92CM22 2007-02-16 92CM22-243 16-bit timer (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 TB1RDE − I 2 TB 0 TB1PRUN TB1 R UN R/W R/W R/W 0 0 0 0 0 TMRB1 prescaler UP counter (UC12) TB1RUN Timer B1 RUN register 1190H Double buffer 0: Disable 1: Enable Always write “0”. ID LE2 0: Stop 1: Operate 0: Stop and cle ar 1: Run (Cou nt up) TB1CT1 TB1ET1 [...]
-
Seite 246
TMP92CM22 2007-02-16 92CM22-244 (8) UART/Serial channel (1/2 ) Symbol Name Address 7 6 5 4 3 2 1 0 RB7 TB7 RB6 TB6 RB5 TB5 RB4 TB4 RB3 TB3 RB2 TB2 RB1 TB1 RB0 TB0 R(Receiving) / W(Transmission) SC0BUF Serial channel 0 buffer register 1200H (Prohibit RMW) Undefined RB8 EVEN PE OERR PERR FERR SCLKS IOC R R/W R (Clear o after reading) R/W Undefined 0 [...]
-
Seite 247
TMP92CM22 2007-02-16 92CM22-245 UART/Serial channel (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 RB7 TB7 RB6 TB6 RB5 TB5 RB4 TB4 RB3 TB3 RB2 TB2 RB1 TB1 RB0 TB0 R (Receiving)/W (Transmission) SC1BUF Serial channel 1 buffer register 1208H (Prohibit RMW) Undefined RB8 EVEN PE OERR PERR FERR SCLKS IOC R R/W R (Clear 0 after reading) R/W Undefined 0 0 0 0[...]
-
Seite 248
TMP92CM22 2007-02-16 92CM22-246 (9) I 2 C bus/Serial channel (1/2) Symbol Name Address 7 6 5 4 3 2 1 0 BC2 BC1 BC0 ACK SCK2 SCK1 SCK0/ SWRMON W R/W W R/W 0 0 0 0 0 0 0/1 1240H (Prohibit RMW) I 2 C mode Number of transfer bits 000: 8 001: 1 010: 2 011: 3 100: 4 101: 5 110: 6 111: 7 Acknowledge mode 0: Disable 1: Enable Setting of the divide value ?[...]
-
Seite 249
TMP92CM22 2007-02-16 92CM22-247 I 2 C bus/Serial channel (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 − I2SBI0 W R/W 0 0 1244H (I 2 C mode) (Prohibit RMW) Always write “0”. IDLE2 0: Abort 1: Operate − − W R/W 0 0 SBI0BR0 SBI0 baud rate register 0 1244H (SIO mode) (Prohibit RMW) Always write “0”. Always write “0”. P4EN − R/W W 0 0 S[...]
-
Seite 250
TMP92CM22 2007-02-16 92CM22-248 (10) AD converter (1/2) Symbol Name Address 7 6 5 4 3 2 1 0 EOCF ADBF − − ITM0 REPEAT SCAN ADS R R/W 0 0 0 0 0 0 0 0 ADMOD0 AD mode control register 0 12B8H AD conversion end flag 0: Busy 1: End AD conversion busy flag 0: End 1: Busy Always write “0”. Always write “0”. 0: Every 1 time 1: Every 4 times Rep[...]
-
Seite 251
TMP92CM22 2007-02-16 92CM22-249 AD converter (2/2) Symbol Name Address 7 6 5 4 3 2 1 0 ADR41 ADR40 ADR4RF R R ADREG4L AD result register 4 low 12A8H Undefined 0 ADR49 ADR48 ADR47 A DR46 ADR45 ADR44 ADR43 ADR42 R ADREG4H AD result register 4 high 12A9H Undefined ADR51 ADR50 ADR5RF R R ADREG5L AD result register 5 Low 12AAH Undefined 0 ADR59 ADR58 AD[...]
-
Seite 252
TMP92CM22 2007-02-16 92CM22-250 (1 1) W atchdog timer Symbol Name Address 7 6 5 4 3 2 1 0 WDTE WDTP1 WDTP0 − I2WDT RESCR − R/W R/W 1 0 0 0 0 0 0 WDMOD WDT mode register 1300H WDT control 1: Enable Select detecting time 00: 2 15 /f IO 01: 2 17 /f IO 10: 2 19 /f IO 11: 2 21 /f IO Always write “0”. IDLE2 0: Stop 1: Operate 1: Internally connec[...]
-
Seite 253
TMP92CM22 2007-02-16 92CM22-251 6. Port Section Equivalent Circuit Diagram ■ Reading the circuit diagram Basically , the gate symbo ls written are the sam e as those used for the standard CMOS logic IC [74HCXX] series. The dedicated signal is described below . STOP: This signal becomes active “1” w hen the ha lt mode setting register is set t[...]
-
Seite 254
TMP92CM22 2007-02-16 92CM22-252 ■ P70 ( RD ), P71 ( WRLL ), P72 ( WRLU ), P73, P74 (CLKOUT), P75 ( W R/ ), P80 ( CS0 ), P81 ( CS1 ), P82 ( CS2 ), and P83 ( CS3 ) ■ P A0, P A1, P A2, and P A7 ■ P91 (SO/SDA) and P92 (SI/SCL) VCC Output data Output P-ch N-ch Stop Input data Input VCC VCC Output data Open-drain out p ut enable Stop Input data I/O[...]
-
Seite 255
TMP92CM22 2007-02-16 92CM22-253 ■ PF0 (TXD0) and PF3 (TXD1) ■ PG0 (AN0), PG1 (AN1), PG2 (AN2), PG3 (AN3/ ADTRG ), PG4 (AN4), PG5 (AN5), PG6 (AN6), and PG7 (AN7) ■ RESET VCC Output data Open-drain out p ut enable Stop Input data I/O Input enable P-ch N-ch Analog input channel select Analog input Input data Input Input enable P-ch N-ch RESET In[...]
-
Seite 256
TMP92CM22 2007-02-16 92CM22-254 ■ X1 and X2 ■ VREFH and VREFL ■ AM0 and AM1 ■ NMI String resistance VREFON VREFH P-ch VREFL Input data Input NMI Input Schmitt Clock High-frequency oscillation enable X2 N-ch X1 P-ch Oscillato r[...]
-
Seite 257
TMP92CM22 2007-02-16 92CM22-255 7. Points to Note and Restrictio ns (1) Notation 1. The notation for built-in I/ O registers is as follows register sy mbol < Bit symbol>. Example: T A01RUN<T A0RUN> denotes bit T A0RUN of register T A01RUN. 2. Read-modify-write instru ctions (RMW) An instruction in that the CPU reads data from memory and[...]
-
Seite 258
TMP92CM22 2007-02-16 92CM22-256 (2) Poin ts to note a) AM0 and AM1 pins This pin is connected t o the VCC (Pow er supply level) or VSS (Ground le vel) pins. Do not alter the level when the p in is active. b) Reservation area of address area TMP92CM22 don’t inclu de reservation area. c) W arm-up counter The warm-up counter op erates when STOP mode[...]
-
Seite 259
TMP92CM22 2007-02-16 92CM22-257 8. Package Dimensions P-LQFP100-144-0.50F Unit: mm[...]
-
Seite 260
TMP92CM22 2007-02-16 92CM22-258[...]