Summary of Contents for Mitsubishi Electric M16C/80 Series
Page 1
Specifications in this manual may be changed for functional or performance im- provements. Please make sure your manual is the latest edition. Mitsubishi Electric Corporation, Kitaitami Works Mitsubishi Electric Semiconductor Systems Corporation REV. B...
All information contained in these materials, including product data, diagrams, charts, programs and algorithms represents information on products at the time of publication of these materials, and are subject to change by Mitsubishi Electric Corporation without notice due to product improvements or other reasons. It is therefore...
How to Use This Manual This user's manual is written for the M16C/80 group. The reader of this manual is expected to have the basic knowledge of electric and logic circuits and microcomputers. This manual explains a function of the following kind. •...
Page 5
This manual comprises of six chapters. Use the suggested chapters as a reference for the following topics: * To understand hardware specifications ........... Chapter 1 Hardware * To understand the basic way of using peripheral features and the operation timing........ Chapter 2 Peripheral Functions Usage * To observe applications of peripheral features ......
Page 6
The figure of each register configuration describes its functions and attributes as follows : XXX register Symbol Address When reset Bit symbol Bit name Function b1 b0 XXX select bit XXX0 1 0 : XXX 0 1 : XXX 1 0 : Inhibited 1 1 : XXX XXX1 Nothing is assigned.
Page 7
(assembly language) opment opment Collection of sample programs with assembly Sample program language System evaluation M16C Family Line-up M16C Family M16C/80 Series M16C/80 Group M16C/60 Series M16C/60 Group M16C/61 Group M16C/62 Group M16C/20 Series M16C/20 Group M16C/21 Group...
Page 10
2.2.9 Operation of timer A (2-phase pulse signal process in event counter mode, free run type, multiply-by-4 mode and Z-phase input selected) ........... 346 2.2.10 Operation of Timer A (one-shot timer mode) ..............348 2.2.11 Operation of Timer A (one-shot timer mode, external trigger selected) ......351 2.2.12 Operation of Timer A (pulse width modulation mode, 16-bit PWM mode selected) ..
Page 11
2.6.2 Operation of Serial Interface Special Function (transmission in master mode without delay) (Note) ......................448 2.6.3 Operation of Serial Interface Special Function (reception in master mode with clock delay) (Note) ....................... 452 2.6.4 Operation of Serial Interface Special Function (transmission in slave mode without delay) (Note) ......................
Page 12
2.11.1 Overview ..........................510 2.11.2 Read data conversion mode ....................513 2.11.3 No conversion mode ......................515 2.11.4 Write data conversion mode ....................517 2.11.5 Read/Write data conversion mode ..................519 2.12 DRAM Controller ........................521 2.12.1 Overview ..........................521 2.12.2 Operation of DRAM controller ....................
Page 13
3.8 Controling Power Using Wait Mode .................... 598 3.9 How to enlarge figures using the X-Y converter ................. 602 3.10 How to reduce figures using the X-Y converter ................ 606 Chapter 4 Interrupt 4.1 Overview of Interrupt ........................612 4.1.1 Type of Interrupts .........................612 4.1.2 Software Interrupts ......................
Page 14
Quick Reference to Pages Classified by Address Address Register Page Address Register Page 0000 0060 0001 0061 0002 0062 0003 0063 Processor mode register 0 (PM0) 0004 0064 28, 29 Processor mode register 1(PM1) 0005 0065 System clock control register 0 (CM0) 0006 0066 System clock control register 1 (CM1)
Page 16
Quick Reference to Pages Classified by Address Address Register Page Address Register Page 0340 Count start flag (TABSR) 95, 107 0380 A-D register 0 (AD0) 0341 Clock prescaler reset flag (CPSRF) 0381 0342 0382 One-shot start flag (ONSF) A-D register 1 (AD1) 0343 0383 Trigger select register (TRGSR)
Page 17
Quick Reference to Pages Classified by Address Address Register Page 03C0 Port P6 (P6) 03C1 Port P7 (P7) 03C2 Port P6 direction register (PD6) 03C3 Port P7 direction register (PD7) 03C4 Port P8 (P8) Port P9 (P9) 03C5 Port P8 direction register (PD8) 03C6 Port P9 direction register (PD9) 03C7...
The M16C/80 group of single-chip microcomputers are built using the high-performance silicon gate CMOS process using a M16C/80 Series CPU core and are packaged in a 100-pin and 144-pin plastic molded QFP. The peripheral functions of 100-pin and 144-pin are common. These single-chip microcomputers operate using sophisticated instructions featuring a high level of instruction efficiency.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description Pin Configuration Figures 1.1.1 and 1.1.2 show the pin configuration (top view) for 100-pin and Figure 1.1.3 shows the pin configuration (top view) for 144-pin.
Page 22
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description PIN CONFIGURATION (top view) (MA10) (MA11) /CS3/A (MA12) /CS2/A /CS1/A /CS0/A /WRL/WR/CASL /WRH/BHE/CASH /RD/DW /BCLK/ALE/CLK /HLDA/ALE /HOLD M16C/80 Group /ALE/RAS /RDY /CTS...
Page 23
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description PIN CONFIGURATION (top view) /CS3/A (MA12) /CS2/A /CS1/A /CS0/A /WRL/WR/CASL /WRH/BHE/CASH /RD/DW /BCLK/ALE/CLK M16C/80 Group /HLDA/ALE /HOLD /ALE/RAS /RDY /KI3 /KI2...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description Performance Outline Table 1.1.1 is a performance outline of M16C/80 group. Table 1.1.1. Performance outline of M16C/80 group Item Performance Number of basic instructions...
Page 26
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description Mitsubishi plans to release the following products in the M16C/80 group: (1) Support for mask ROM version, external ROM version and flash memory version (2) ROM capacity (3) Package 100P6S-A...
Page 27
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description Type No. M 3 0 8 0 2 M C – X X X F P Package type: FP : Package 100P6S-A GP : Package...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Pin Description Pin Description (1) Pin name Signal name I/O type Function Power supply Supply 4.2 (2.7) to 5.5 V to the V pin.
Page 29
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Pin Description Pin Description (2) Pin name Signal name I/O type Function to P4 I/O port P4 This is an 8-bit I/O port equivalent to P0. These pins output 8 high-order address bits (A –A ).
Page 30
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Pin Description Pin Description (3) Pin name Signal name I/O type Function to P11 I/O port P11 II/O This is an 5-bit I/O port equivalent to P6. (Note) to P12 I/O port P12...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Memory Operation of Functional Blocks The M16C/80 group accommodates certain units in a single chip. These units include ROM and RAM to store instructions and data and the central processing unit (CPU) to execute arithmetic/logic operations.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Central Processing Unit (CPU) The CPU has a total of 28 registers shown in Figure 1.3.1. Eight of these registers (R0, R1, R2, R3, A0, A1, SB and FB) come in two sets;...
Page 33
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (1) Data registers (R0, R0H, R0L, R1, R1H, R1L, R2, R3, R2R0 and R3R1) Data registers (R0, R1, R2, and R3) are configured with 16 bits, and are used primarily for transfer and arithmetic/logic operations.
Page 34
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (9) Save PC register (SVP) This register consists of 24 bits and is used to save the program counter when a high-speed interrupt is generated.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (17) Flag register (FLG) Flag register (FLG) is configured with 11 bits, each bit is used as a flag. Figure 1.3.2 shows the flag register (FLG).
Page 36
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER • Bits 12 to 14: Processor interrupt priority level (IPL) Processor interrupt priority level (IPL) is configured with three bits, for specification of up to eight processor interrupt priority levels from level 0 to level 7.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Reset Reset There are two kinds of resets; hardware and software. In both cases, operation is the same after the reset. (See “Software Reset”...
Page 38
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Reset ____________ Table 1.4.1 shows the statuses of the other pins while the RESET pin level is “L”. Figures 1.4.3 and 1.4.4 show the internal status of the microcomputer immediately after the reset is cancelled.
Page 39
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Reset (30) Timer B3 interrupt control register Processor mode register 0 (Note1) (0004 )··· (0078 )··· ? 0 0 0 (31) Processor mode register 1 (0005...
Page 40
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Reset (68) Interrupt cause select register (031F )··· 0 0 0 0 0 0 (112) Function select register A0 (03B0 )···...
Page 41
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 0000 0060 0061 0001 0002 0062 0003 0063 Processor mode register 0 (PM0) 0004 0064 Processor mode register 1(PM1) 0005 0065 System clock control register 0 (CM0)
Page 42
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 02C0 0300 Timer B3, 4, 5 count start flag (TBSR) X0 register (X0R) Y0 register (Y0R) 02C1 0301 02C2 0302 X1 register (X1R) Y1 register (Y1R) Timer A1-1 register (TA11)
Page 43
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 0340 0380 Count start flag (TABSR) A-D register 0 (AD0) 0341 0381 Clock prescaler reset flag (CPSRF) 0342 0382 One-shot start flag (ONSF) A-D register 1 (AD1) 0343...
Page 44
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER <100-pin version> <144-pin version> 03C0 03C0 Port P6 (P6) Port P6 (P6) 03C1 Port P7 (P7) 03C1 Port P7 (P7) 03C2 Port P6 direction register (PD6) 03C2...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Software Reset Software Reset Writing “1” to bit 3 of the processor mode register 0 (address 0004 ) applies a (software) reset to the microcomputer.
Page 46
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Processor Mode Processor mode register 0 (Note 1) b3 b2 Symbol Address When reset 0004 (Note 2) Bit symbol Bit name Function b1 b0...
Page 47
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Processor Mode SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Processor mode register 1 (Note 1) :Mask ROM version ROMless version (144-pin version) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset...
Page 48
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Processor Mode Processor Mode Figure 1.6.3. Memory maps in each processor mode...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Settings Bus Settings The BYTE pin, bit 0 to 3 of the external data bus width control register (address 000B ), bits 4 and 5 of the processor mode register 0 (address 0004 ) and bit 0 and 1 of the processor mode register 1 (address...
Page 50
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Settings ____ The default after a reset is the separate bus configuration, and the full CS space multiplex bus configu- ____ ration cannot be selected in microprocessor mode.
Page 51
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Settings Table 1.7.3. Each processor mode and port function Processor Single-chip Memory Memory expansion mode/microprocessor modes mode mode expansion mode “11”...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control Bus Control The following explains the signals required for accessing external devices and software waits. The signals required for accessing the external devices are valid when the processor mode is set to memory expansion mode and microprocessor mode.
Page 53
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control The chip select signal turns “L” (active) in synchronize with the address bus. However, its turning “H” depends on the area accessed in the next cycle.
Page 54
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control (3) Read/write signals With a 16-bit data bus, bit 2 of the processor mode register 0 (address 0004 ) select the combinations of _____ ________...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control (4) ALE signal The ALE signal latches the address when accessing the multiplex bus space. Latch the address when the ALE signal falls.
Page 56
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control Separate bus (2 wait) 1st cycle 2nd cycle 3rd cycle 4th cycle BCLK (Note) (i=0 to 3) tsu(RDY - BCLK) RDY received timing Multiplexed bus (2 wait)
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control (6) Hold signal The hold signal is used to transfer the bus privileges from the CPU to the external circuits. Inputting “L” to __________ the HOLD pin places the microcomputer in the hold state at the end of the current bus access.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control _______ __________ __________ _____ (9) DRAM controller signals (RAS, CASL, CASH, and DW) Bits 1, 2, and 3 of the DRAM control register (address 0004 ) select the DRAM space and enable the DRAM controller.
Page 59
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control Wait control register b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset 0008 Bit symbol Bit name Function b1 b0...
Page 60
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control < Separate bus (no wait) > Bus cycle (Note) Bus cycle (Note) BCLK Write signal Read signal Data bus Output Input...
Page 61
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Bus Control < Separate bus (with 3 wait) > Bus cycle (Note) Bus cycle (Note) BCLK Write signal Read signal Data bus Data output Input...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit Clock Generating Circuit The clock generating circuit contains two oscillator circuits that supply the operating clock sources to the CPU and internal peripheral units.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit Clock Control Figure 1.8.3 shows the block diagram of the clock generating circuit. COUT 1/32 CM04 SIO2 SIO2 Sub clock...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit The following paragraphs describes the clocks generated by the clock generating circuit. (1) Main clock The main clock is generated by the main clock oscillation circuit. After a reset, the clock is divided by 8 to the BCLK.
Page 65
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit System clock control register 0 (Note 1) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset 0006...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit Main clock division register (Note 1) Symbol Address When reset 000C XXX01000 Bit symbol Bit name Function b4 b3 b2 b1 b0 Main clock division select...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit Table 1.8.2. Clock output setting (single chip mode) BCLK output function Clock output function select ALE pin select bit /BCLK/ALE/CLK select bit pin function...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock Generating Circuit Table 1.8.4. Port status during stop mode Memory expansion mode Single-chip mode Microprocessor mode _______ _______ _______ Address bus, data bus, CS0 to CS3, BHE Retains status before stop mode _____...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Wait Mode Wait Mode When a WAIT instruction is executed, the BCLK stops and the microcomputer enters the wait mode. In this mode, oscillation continues but the BCLK and watchdog timer stop.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER BCLK Status Status Transition of BCLK Power dissipation can be reduced and low-voltage operation achieved by changing the count source for BCLK.
Page 71
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER BCLK Status Note: When count source of BCLK is changed from clock A to clock B (X to X or X to X ), clock B...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Power Saving Power Saving In Power Save modes, the CPU and oscillator stop and the operating clock is slowed to minimize power dissipation by the CPU.
Page 73
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Power Saving Transition of stop mode, wait mode Reset WAIT CPU operation stopped All oscillators stopped instruction CM10=“1” Medium-speed mode Stop mode Wait mode (Divided-by-8 mode)
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Protection Protection The protection function is provided so that the values in important registers cannot be changed in the event that the program runs out of control.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Interrupt Outline Types of Interrupts Figure 1.9.1 lists the types of interrupts. Undefined instruction (UND instruction) Overflow (INTO instruction) Software BRK instruction BRK2 instruction...
Page 76
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Software Interrupts Software interrupts are generated by some instruction that generates an interrupt request when ex- ecuted. Software interrupts are nonmaskable interrupts. (1) Undefined-instruction interrupt This interrupt occurs when the UND instruction is executed.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Hardware Interrupts There are Two types in hardware Interrupts; special interrupts and Peripheral I/O interrupts. (1) Special interrupts Special interrupts are nonmaskable interrupts.
Page 78
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts High-speed interrupts High-speed interrupts are interrupts in which the response is executed at 5 cycles and the return is 3 cycles.
Page 79
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts • Fixed vector tables The fixed vector table is a table in which addresses are fixed. The vector tables are located in an area extending from FFFFDC to FFFFFF .
Page 80
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Table 1.9.3. Interrupt causes (variable interrupt vector addresses) Vector table address Software interrupt number Interrupt source Remarks Address (L) to address (H) Software interrupt number 0 +0 to +3 (Note 1) BRK instruction...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Interrupt control registers Peripheral I/O interrupts have their own interrupt control registers. Figure 1.9.3 shows the interrupt con- trol registers.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Interrupt control register Symbol Address When reset ADIC 0073 XXXXX000 BCNiIC(i=2 to 4) 008F , 0071 , 0091 XXXXX000 DMiIC(i=0 to 3) 0068...
Page 83
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Exit priority register Symbol Address When reset RLVL 009F XXXX0000 Bit symbol Function name b2 b1 b0 Interrupt priority set bit for 0 0 0 : Level 0 RLVL0 exiting Stop/Wait state...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Table 1.9.4 shows how interrupt priority levels are set. Table 1.9.5 shows interrupt enable levels in relation to the processor interrupt priority level (IPL). The following lists the conditions under which an interrupt request is acknowledged: •...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Interrupt Sequence An interrupt sequence — what are performed over a period from the instant an interrupt is accepted to the instant the interrupt routine is executed —...
Page 86
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Time (a) varies with each instruction being executed. The DIVX instruction requires a maximum time that consists of 24* cycles. Time (b) is shown in table 1.9.6.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Changes of IPL When Interrupt Request Acknowledged When an interrupt request is acknowledged, the interrupt priority level of the acknowledged interrupt is set to the processor interrupt priority level (IPL).
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Return from Interrupt Routine As you execute the REIT instruction at the end of the interrupt routine, the contents of the flag register (FLG) and program counter (PC) that have been saved to the stack area immediately preceding the interrupt sequence are automatically restored.
Page 89
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts High Priority level of each interrupt Level 0 (initial value) DMA0 DMA1 INT1 DMA2 INT0 DMA3 Timer B5 Timer A0 UART2 transmission/NACK Timer A1...
Page 90
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts ______ INT Interrupts ________ ________ INT0 to INT5 are external input interrupts. The level sense/edge sense switching bits of the interrupt control register select the input signal level and edge at which the interrupt can be set to occur on input signal level and input signal edge.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts ______ NMI Interrupt ______ ______ ______ An NMI interrupt is generated when the input to the P8 /NMI pin changes from “H” to “L”. The NMI interrupt is a non-maskable external interrupt.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Address Match Interrupt An address match interrupt is generated when the address match interrupt address register contents match the program counter value.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Precautions for Interrupts (1) Reading addresses 000000 and 000002 • When maskable interrupt is occurred, CPU read the interrupt information (the interrupt number and interrupt request level) in the interrupt sequence from address 000000 .
Page 94
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Set the interrupt priority level to level 0 (Disable interrupt) Set the polarity select bit Clear the interrupt request bit to “0” Set the interrupt priority level to level 1 to 7 (Enable the accepting of INT interrupt request) ______...
Page 95
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Example 3) fset ; Set I flag ( interrupt enabled) ; 1st instruction Do not set address match interrupt ;...
Page 96
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupts Interrupt A routine Interrupt_A: pushm R0,R1,R2,R3,A0,A1 ; Store registers •••• bclr 3,TA0IC ; Rewrite interrupt control register of interrupt B ••••...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Watchdog Timer Watchdog Timer The watchdog timer has the function of detecting when the program is out of control. The watchdog timer is a 15-bit counter which down-counts the clock derived by dividing the BCLK using the prescaler.
Page 98
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Watchdog Timer Watchdog timer control register Symbol Address When reset 000F 000XXXXX Bit symbol Bit name Function High-order bit of watchdog timer Reserved bit Must always be set to “0”...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC DMAC This microcomputer has four DMAC (direct memory access controller) channels that allow data to be sent to memory without using the CPU. DMAC is a function that to transmit 1 data of a source address (8 bits / 16 bits) to a destination address when transmission request occurs.
Page 100
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC Table 1.11.1. DMAC specifications Item Specification No. of channels 4 (cycle steal method) Transfer memory space • From any address in the 16 Mbytes space to a fixed address (16 Mbytes space) •...
Page 101
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC DMAi request cause select register (i = 0 to 3)(Note 1) Symbol Address When reset DMiSL 0378 to 037B 0X000000 Function Bit symbol...
Page 102
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC DMA mode register 0 (CPU internal register) Symbol When reset DMD0 Bit name Function Bit symbol b1 b0 Channel 0 transfer MD00 0 0 : DMA inhibit...
Page 103
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC DMAi transfer count register (i = 0 to 3) Symbol When reset (CPU internal register) DCT0 XXXX DCT1 XXXX DCT2 (bank 1;R0) (Note 1) 0000...
Page 104
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC DMAi memory address register (i = 0 to 3) Symbol When reset (CPU internal register) DMA0 XXXXXX DMA1 XXXXXX DMA2 (bank 1;A0) (Note 1) 000000...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC (1) Transfer cycle The transfer cycle consists of the bus cycle in which data is read from memory or from the SFR area (source read) and the bus cycle in which the data is written to memory or to the SFR area (destination write).
Page 106
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC (1) •When 8-bit data is transferred •When 16-bit data is transferred on a 16-bit data bus and the source address is even BCLK Address CPU use...
Page 107
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC (2) DMAC transfer cycles Any combination of even or odd transfer read and write addresses is possible. Table 1.11.2 shows the number of DMAC transfer cycles.
Page 108
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC (1) Internal factors The DMAi request flag is set to “1” in response to internal factors at the same time as the interrupt request bit of the interrupt control register for each factor is set.
Page 109
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAC Precautions for DMAC (1) Do not clear the DMA request bit of the DMAi request cause select register. In M16C/80, when a DMA request is generated while the channel is disabled (Note), the DMA transfer is not executed and the DMA request bit is cleared automatically.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Timer There are eleven 16-bit timers. These timers can be classified by function into timers A (five) and timers B (six).
Page 111
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Clock prescaler 1/32 Reset Clock prescaler reset flag (bit 7 at address 0341 ) set to “1” Timer B2 overflow (to timer A count source) •...
1 0 : One-shot timer mode TMOD1 1 1 : Pulse width modulation (PWM) mode This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. Function varies with each operation mode...
Page 113
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A Timer Ai register (Note 1) Symbol Address When reset (b15) (b8) 0347 ,0346 Indeterminate b0b7 0349 ,0348 Indeterminate 034B ,034A...
Page 114
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A One-shot start flag Symbol Address When reset ONSF 0342 Bit symbol Bit name Function Timer A0 one-shot start flag TA0OS 1 : Timer start When read, the value is “0”...
TMOD0 0 0 : Timer mode select bit TMOD1 This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. Gate function select bit b4 b3 : Gate function not available...
Operation mode select bit 0 1 : Event counter mode TMOD1 This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. Count polarity 0 : Counts external signal's falling edges...
Page 117
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A Table 1.13.3. Timer specifications in event counter mode Item Specification Count source • Two-phase pulse signals input to TAi or TAi Count operation •...
Page 118
0 1 : Event counter mode TMOD1 (Note 1) This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. 0 (Set to “0” when using two-phase pulse signal processing) 1 (Set to “1”...
Page 119
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A • Counter Resetting by Two-Phase Pulse Signal Processing This function resets the timer counter to “0” when the Z-phase (counter reset) is input during two- phase pulse signal processing.
Page 120
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A (A phase) (B phase) Count source INT2 (Note) (Z phase) Count value Becoming "0" at this timing. Note: When the rising edge of INT2 is selected Figure 1.13.9.
Operation mode select bit 1 0 : One-shot timer mode TMOD1 This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. 0 : Falling edge of TAi...
1 1 : Pulse width modulaten (PWM) mode select bit TMOD1 This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. External trigger select 0: Falling edge of TAi...
Page 123
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer A Condition : Reload register = 0003 , when external trigger (rising edge of TA pin input signal) is selected 1 / f –...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B Timer B Figure 1.14.1 shows the block diagram of timer B. Figures 1.14.2 and 1.14.3 show the timer B-related registers.
Page 125
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B Timer Bi register (Note) Symbol Address When reset 0351 , 0350 Indeterminate 0353 , 0352 Indeterminate (b15) (b8) b0 b7 0355...
Page 126
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B (1) Timer mode In this mode, the timer counts an internally generated count source. (See Table 1.14.1.) Figure 1.14.4 shows the timer Bi mode register in timer mode.
Page 127
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B (2) Event counter mode In this mode, the timer counts an external signal or an internal timer's overflow. (See Table 1.14.2.) Figure 1.14.5 shows the timer Bi mode register in event counter mode.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B (3) Pulse period/pulse width measurement mode In this mode, the timer measures the pulse period or pulse width of an external signal. (See Table 1.14.3.) Figure 1.14.6 shows the timer Bi mode register in pulse period/pulse width measurement mode.
Page 129
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer B When measuring measurement pulse time interval from falling edge to falling edge Count source “H” Measurement pulse “L”...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Three-phase motor control timers’ functions Use of more than one built-in timer A and timer B provides the means of outputting three-phase motor driving waveforms.
Page 131
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Three-phase output buffer register 0 (Note) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset...
Page 132
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Ai register (Note) Symbol Address When reset (b15) (b8) 0349 ,0348 Indeterminate b0 b7 034B ,034A Indeterminate...
Page 133
1 0 : One-shot timer mode select bit TMOD1 This bit is invalid in M16C/80 series. Port output control is set by the function select registers A and B. – – Invalid in three-phase PWM output mode. External trigger select...
Page 134
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Figure 1.15.5 shows the block diagram for three-phase waveform mode. In “L” active output polarity in three-phase waveform mode, the positive-phase waveforms (U phase, V phase, and W phase) and negative waveforms (U phase, V phase, and W phase), six waveforms in total, are output from P8 , P8...
Page 135
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Figure 1.15.5. Block diagram for three-phase waveform mode...
Page 136
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Triangular wave modulation To generate a PWM waveform of triangular wave modulation, set “0” in the modulation mode select bit (bit 6 at 0308 ).
Page 137
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER phase waveform. In this way, a waveform can be picked up from the applicable terminal in a manner in which the "L"...
Page 138
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Assigning certain values to DU0 (bit 0 at 030A ) and DUB0 (bit 1 at 030A ), and to DU1 (bit 0 at 030B and DUB1 (bit 1 at 030B ) allows you to output the waveforms as shown in Figure 1.15.7, that is, to...
Page 139
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Sawtooth modulation To generate a PWM waveform of sawtooth wave modulation, set “1” in the modulation mode select bit (bit 6 at 0308 ).
Page 140
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A carrier wave of sawtooth waveform Carrier wave Signal wave Timer B2 Data transfer is made from the three- phase buffer register to the three- Interrupt occurres.
Page 141
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Three-phase motor control timers’ functions SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting “1” both in DUB0 and in DUB1 provides a means to output the U phase alone and to fix the U phase output to “H”...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O Serial I/O Serial I/O is configured as five channels: UART0 to UART4. UART0 to 4 UART0 to UART4 each have an exclusive timer to generate a transfer clock, so they operate independently of each other.
Page 143
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O (UART0) TxD0 RxD0 UART reception Receive 1/16 Reception clock Clock source selection Transmit/ control circuit receive Clock synchronous type Bit rate unit Internal...
Page 144
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O (UART3) RxD polarity RxD3 polarity TxD3 reversing circuit reversing UART reception circuit Receive 1/16 Reception clock Transmit/ Clock source selection control circuit receive...
Page 145
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O Clock synchronous type UART (7 bits) UART (8 bits) Clock UARTi receive register synchronous UART (7 bits) type disabled UART...
Page 146
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O No reverse RxD data RxDi reverse circuit Reverse Clock synchronous type UART (7 bits) UART Clock UARTi receive register UART(7 bits) (8 bits) synchronous...
Page 147
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O Symbol Address When reset UARTi transmit buffer register (Note) U0TB 0363 , 0362 Indeterminate (b15) (b8) U1TB 036B , 036A Indeterminate...
Page 148
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UARTi transmit/receive mode register Symbol Address When reset UiMR(i=0,1) 0360 , 0368 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 149
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=0,1) 0364 , 036C...
Page 150
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=3,4) 032C , 02FC...
Page 151
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UARTi transmit/receive control register 1 Symbol Address When reset UiC1(i=0,1) 0365 036D Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 152
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UART transmit/receive control register 2 Symbol Address When reset UCON 0370 X0000000 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 153
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UARTi special mode register 2 Symbol Address When reset UiSMR2 (i=2 to 4) 0336 , 0326 , 02F6 Function Bit name symbol...
Page 154
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Serial I/O UART2 special mode register 3 Symbol Address When reset U2SMR3 0335 000XXXXX Bit name Function Bit symbol Nothing is assigned.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode (1) Clock synchronous serial I/O mode The clock synchronous serial I/O mode uses a transfer clock to transmit and receive data. Tables 1.17.1 and 1.17.2 list the specifications of the clock synchronous serial I/O mode.
Page 156
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode Table 1.17.2. Specifications of clock synchronous serial I/O mode (2) Item Specification Error detection •...
Page 157
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode UARTi transmit/receive mode registers Symbol Address When reset UiMR(i=0,1) 0360 , 0368 Bit symbol Bit name Function SMD0...
Page 158
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode Table 1.17.3 lists the functions of the input/output pins during clock synchronous serial I/O mode. This _______ table shows the pin functions when the transfer clock output from multiple pins and the separate CTS/ _______...
Page 159
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode • Example of transmit timing (when internal clock is selected) Transfer clock “1” Transmit enable “0”...
Page 160
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode (a) Polarity select function As shown in Figure 1.17.3, the CLK polarity select bit (bit 6 at addresses 0364 , 036C , 033C 032C...
Page 161
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock synchronous serial I/O mode (c) Transfer clock output from multiple pins function (UART1) This function allows the setting two transfer clock output pins and choosing one of the two to output a clock by using the port function select register (bits of related to-P6 and P6 ).
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode (2) Clock asynchronous serial I/O (UART) mode The UART mode allows transmitting and receiving data after setting the desired transfer rate and transfer data format.
Page 163
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode Table 1.18.2. Specifications of UART Mode (2) Item Specification Error detection • Overrun error (Note) This error occurs when the next data is ready before contents of UARTi receive buffer register are read out •...
Page 164
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode UARTi transmit / receive mode registers Symbol Address When reset UiMR(i=0,1) 0360 , 0368 Bit symbol Bit name Function...
Page 165
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode Table 1.18.3 lists the functions of the input/output pins during UART mode. This table shows the pin _______ _______ functions when the separate CTS/RTS pins function is not selected.
Page 166
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode • Example of transmit timing when transfer data is 8 bits long (parity enabled, one stop bit) The transfer clock stops momentarily as CTS is “H”...
Page 167
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode • Example of receive timing when transfer data is 8 bits long (parity disabled, one stop bit) BRGi count source “1”...
Page 168
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode (c) Function for switching serial data logic (UART2 to UART4) When the data logic select bit (bit 6 of address 033D , 032D , 02FD ) is assigned 1, data is inverted...
Page 169
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode (3) Clock-asynchronous serial I/O mode (compliant with the SIM interface) The SIM interface is used for connecting the microcomputer with a memory card I/C or the like; adding some extra settings in UART2 to UART4 clock-asynchronous serial I/O mode allows the user to effect this function.
Page 170
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode Transfer clock “1” Transmit enable bit(TE) “0” (Note 1) Data is set in UARTi transmit buffer register “1”...
Page 171
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode (a) Function for outputting a parity error signal With the error signal output enable bit (bit 7 of address 033D , 032D , 02FD ) assigned “1”, you...
Page 172
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock asynchronous serial I/O (UART) mode Figure 1.19.4 shows the example of connecting the SIM interface. Connect TxDi and RxDi and apply pull- Microcomputer (Note) SIM card...
Page 173
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register UARTi Special Mode Register (i = 2 to 4) UART2 to UART4 operate the IIC bus interface (simple IIC bus) using the UARTi special mode register (addresses 0336 , 0326 and 02F6...
Page 174
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register UARTi special mode register b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiSMR (i=2 to 4) 0337 , 0327...
Page 175
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register /TXD /SDA Timer To DMAi Selector UART2 UART2 IICM=1 IICM=0 or IICM2=1 transmission/NACK delay Transmission register interrupt request UART2 IICM=1 and...
Page 176
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register The start condition detection interrupt is generated when the fall at the SDA2 pin (P7 ) is detected while the SCL2 pin (P7 ) is in the H state.
Page 177
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register 1. Bus collision detect sampling clock select bit (Bit 4 of the UARTi special mode register) 0: Rising edges of the transfer clock CLKi TxDi/RxDi...
Page 178
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register UART2 Special Mode Register 2 (Address 0336 Bit 0 is the IIC mode select bit 2. Table 1.20.2 gives control changes by bit when the IIC mode select bit is “1”.
Page 179
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register Table 1.20.2. Functions changed by I C mode select bit 2 IICM2 = 0 IICM2 = 1 Function Acknowrege not detect (NACK) UART2 transfer (rising edge of )
Page 180
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register (2) Serial Interface Special Function _____ UART 3 and UART4 can control communications on the serial bus using the SSi input pins (Figure 1.20.5).
Page 181
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register UARTi special mode register 3 (i=3,4) Symbol Address When reset U3SMR3 0325 00000000 U4SMR3 02F5 00000000 Bit name Function...
Page 182
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register Clock Phase Setting With bit 1 of UARTi special mode register 3 (addresses 0325 and 02F5 [i = 3 or 4]) and bit 6 of UARTi transmission-reception control register 0 (addresses 032C and 02FC...
Page 183
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi Special Mode Register "H" SS input "L" "H" Clock input "L" (CKPOL=0, CKPH=0) Clock input "H" (CKPOL=1, CKPH=0) "L"...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter A-D Converter The A-D converter consists of one 10-bit successive approximation A-D converter circuit with a capacitive coupling amplifier.
Page 185
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter CKS1=1 φ CKS0=1 A-D conversion rate CKS1=0 CKS0=0 selection VCUT=0 Resistance ladder VCUT=1 Successive conversion register A-D control register 1 (address 0397 A-D control register 0 (address 0396 Addresses (0381...
Page 186
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter A-D control register 0 (Note 1) Symbol Address When reset ADCON0 0396 00000XXX Bit symbol Bit name Function b2 b1 b0 Analog input pin select bit...
Page 187
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter A-D control register 2 (Note) Symbol Address When reset ADCON2 0394 XXXXXXX0 0 0 0 Bit symbol Bit name Function 0 : Without sample and hold...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (1) One-shot mode In one-shot mode, the pin selected using the analog input pin select bit is used for one-shot A-D conver- sion.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (2) Repeat mode In repeat mode, the pin selected using the analog input pin select bit is used for repeated A-D conversion. Table 1.21.3 shows the specifications of repeat mode.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (3) Single sweep mode In single sweep mode, the pins selected using the A-D sweep pin select bit are used for one-by-one A-D conversion.
Page 191
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (4) Repeat sweep mode 0 In repeat sweep mode 0, the pins selected using the A-D sweep pin select bit are used for repeat sweep A-D conversion.
Page 192
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (5) Repeat sweep mode 1 In repeat sweep mode 1, all pins are used for A-D conversion with emphasis on the pin or pins selected using the A-D sweep pin select bit.
Page 193
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D Converter (a) Sample and hold Sample and hold is selected by setting bit 0 of the A-D control register 2 (address 0394 ) to “1”.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER D-A Converter D-A Converter This is an 8-bit, R-2R type D-A converter. The microcomputer contains two independent D-A converters of this type. D-A conversion is performed when a value is written to the corresponding D-A register.
Page 195
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER D-A Converter D-A control register Symbol Address When reset DACON 039C Bit symbol Bit name Function 0 : Output disabled DA0E D-A0 output enable bit 1 : Output enabled...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER CRC Calculation Circuit The Cyclic Redundancy Check (CRC) calculation circuit detects an error in data blocks. The microcom- puter uses a generator polynomial of CRC_CCITT (X + 1) to generate CRC code.
Page 197
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER CRC data register CRCD (1) Setting 0000 [037D , 037C CRC input register CRCIN (2) Setting 01 [037E 2 cycles After CRC calculation is complete CRC data register CRCD...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER X-Y Converter X-Y Converter X-Y conversion rotates the 16 x 16 matrix data by 90 degrees. It can also be used to invert the top and bottom of the 16-bit data.
Page 199
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER X-Y Converter The reading of the Yi register is controlled by the read-mode set bit (bit 0 at address 02E0 When the read-mode set bit (bit 0 at address 02E0 ) is “0”, specific bits in the Xi register can be read at the same time as the Yi register is read.
Page 200
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER X-Y Converter When the read-mode set bit (bit 0 at address 02E0 ) is “1”, you can read the value written to the Xi register by reading the Yi register.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller DRAM Controller There is a built in DRAM controller to which it is possible to connect between 512 Kbytes and 8 Mbytes of DRAM.
Page 202
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller • DRAM Controller Multiplex Address Output The DRAM controller outputs the row addresses and column addresses as a multiplexed signal to the address bus A to A .
Page 203
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller • Refresh _______ _______ The refresh method is CAS before RAS. The refresh interval is set by the DRAM refresh interval set register (address 0041 ).
Page 204
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller The DRAM self-refresh operates in STOP mode, etc. When shifting to self-refresh, select DRAM ignored by the DRAM space select bit. In the next instruction, simultaneously set the DRAM space select bit and self-refresh ON by self-refresh mode bit.
Page 205
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller < Read cycle (wait control bit = 0) > BCLK Column Column Column MA0 to MA12 address 2 address address 1 address 3...
Page 206
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller < Read cycle (wait control bit = 1) > BCLK Column Column Column Column MA0 to MA12 address 1 address address 2...
Page 207
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM Controller BCLK CASH CASL "H" < CAS before RAS refresh cycle > Note : Only CASL is operating in 8-bit data bus width. BCLK CASH CASL...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Programmable I/O Ports There are 87 programmable I/O ports for 100-pin version: P0 to P10 (excluding P8 ).
Page 209
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port (4) Function select register B Figures 1.26.10 and 1.26.11 show the function select registers B. This register selects the 1st peripheral function output and second peripheral function output when mul- tiple peripheral function outputs are assigned to a pin.
Page 210
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Pull-up selection Direction register to P0 , P2 to P2 to P3 , P4 to P4 to P5 , P5 to P5...
Page 211
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Pull-up selection to P8 Direction register Data bus Port latch Input to respective peripheral functions Note , P6 , P6 , P6...
Page 212
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Pull-up selection to P10 Direction register Data bus Port latch Analog input Pull-up selection to P10 Direction register Data bus Port latch...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Port Pi direction register (Note 1,2, 3) Symbol Address When reset PDi (i = 0 to 15, 03E2 , 03E3 , 03E6...
Page 214
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Port P11 direction register (Note) Symbol Address When reset b7 b6 b5 b4 b3 b2 b1 b0 PD11 03CB XXX00000...
Page 215
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Port Pi register (Note 1, 3) Symbol Address When reset Pi (i = 0 to 15, 03E0 , 03E1 , 03E4...
Page 216
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Port P11 register (Note) Symbol Address When reset b7 b6 b5 b4 b3 b2 b1 b0 03C9 Indeterminate Bit symbol...
Page 217
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Table 1.26.1. Each port and peripheral output function (Note 1) Port Periphral output function 1 Periphraloutput function 2 Periphral output function 3 output output...
Page 218
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Function select register A0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset 03B0 0X000X00 Bit name...
Page 219
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Function select register A2 Symbol Address When reset 03B4 XXXXXX00 Bit name Function Bit symbol PS2_0 Port P8 function select bit 0 : I/O port...
Page 220
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Function select register B0 Symbol Address When reset PSL0 03B2 XXX0XXXX Bit name Function Bit symbol Nothing is assigned.
Page 221
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Function select register B3 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PSL3 03B7 00000X0X...
Page 222
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Pull-up control register 0 (Note) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PUR0 03F0 Bit symbol...
Page 223
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port 100-pin version Pull-up control register 3 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PUR3 03DB...
Page 224
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Port control register (Note 1) b7 b6 b5 b4 b3 b2 b1 b0 Symbpl Address When reset 03FF XXXXXXX0 Bit symbol...
Page 225
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Programmable I/O Port Table 1.26.2. Example connection of unused pins in single-chip mode Pin name Connection Ports P0 to P15 (excluding P8 After setting for input mode, connect every pin to V via a resistance (pull-down);...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Usage Precaution SFR (100-pin version) (1) Addresses 03C9 , 03CB to 03D3 , 03DC area is for future plan. Must set "FF "...
Page 227
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution (3) The timer Ai interrupt request bit goes to “1” if the timer's operation mode is set using any of the following procedures: •...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Timer B (timer mode, event counter mode) (1) Reading the timer Bi register while a count is in progress allows reading , with arbitrary timing, the value of the counter.
Page 229
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution – Vc is generally V {1 – e C (R0 + R) And when t = T, –...
Page 230
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Tables 1.27.1. Output impedance values based on the LSB values (10-bit mode) Reference value f(XIN) Cycle Sampling time Resolution R0max (MHz)
Page 231
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Interrupts (1) Setting the stack pointer • The value of the stack pointer is initialized to 000000 immediately after reset.
Page 232
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Example 4) ldipl ; Rewrite IPL to a smaller value ; 1st instruction Do not set address match interrupt ;...
Page 233
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Interrupt C routine Interrupt_C: pushm R0,R1,R2,R3,A0,A1 ; Store registers fset ; Multiple interrupt enabled •••• •••• popm R0,R1,R2,R3,A0,A1 ;Restore registers fclr ;...
Page 234
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution DMAC (1) Do not clear the DMA request bit of the DMAi request cause select register. In M16C/80, when a DMA request is generated while the channel is disabled (Note), the DMA transfer is not executed and the DMA request bit is cleared automatically.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Reducing power consumption (1) When A-D conversion is not performed, select the Vref not connected with the Vref connect bit of A-D control register 1.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Usage precaution Setting the registers The registers shown in Table 1.27.3 include indeterminate bit when read. Set immidiate to these regis- ters.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Electrical characteristics Table 1.28.1. Absolute maximum ratings Symbol Parameter Condition Rated value Unit Supply voltage -0.3 to 6.5 Analog supply voltage AVcc -0.3 to 6.5...
Page 238
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 1.28.2. Recommended operating conditions (referenced to V = 2.7V to 5.5V at Topr = – 20 to 85 C / –...
Page 239
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Table 1.28.3. Electrical characteristics (referenced to V =5V, V =0V at Topr=25 C, f(X )=20MH unless otherwise specified)
Page 240
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Table 1.28.4. A-D conversion characteristics (referenced to V = AV = 5V, Vss = AV 0V at Topr = 25 C, f(X ) = 20MH...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Timing requirements (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.6.
Page 242
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Timing requirements (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.8.
Page 243
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Timing requirements (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.13.
Page 244
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Switching characteristics (referenced to V = 5V, V = 0V at Topr = 25 C, CM15 = “1”...
Page 245
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Switching characteristics (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.20.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Switching characteristics (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.21.
Page 247
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 5V Switching characteristics (referenced to V = 5V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.22.
Page 248
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 5V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 30pF (Note) Note: Port P11 to P15 exist in 144-pin version. Figure 1.28.1. Port P0 to P15 measurement circuit...
Page 249
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (without wait) Read Timing BCLK d(BCLK-ALE) h(BCLK-ALE) 18ns.max -2ns.min d(BCLK-CS) h(BCLK-CS)
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (with 1 wait) Read Timing BCLK 18ns.max d(BCLK-ALE) h(BCLK-ALE) -2ns.min h(BCLK-CS)
Page 251
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Memory expansion Mode and Microprocessor Mode (with 2 wait) Vcc=5V Read Timing BCLK 18ns.max d(BCLK-ALE) h(BCLK-ALE) -2ns.min d(BCLK-CS)
Page 252
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Memory expansion Mode and Microprocessor Mode (with 3 wait) Vcc=5V Read Timing BCLK 18ns.max h(BCLK-ALE) d(BCLK-ALE) -2ns.min h(BCLK-CS)
Page 253
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (When accessing external memory area with 2 wait, and select multiplexed bus) Read Timing BCLK 18ns.max...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (When accessing external memory area with 3 wait, and select multiplexed bus) Read Timing BCLK 18ns.max...
Page 255
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (When accessing DRAM area with 1 wait) Read Timing BCLK tcyc d(BCLK-CAD)
Page 256
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Vcc=5V Memory expansion Mode and Microprocessor Mode (When accessing DRAM area with 1 wait) Write Timing BCLK tcyc d(BCLK-RAD)
Page 257
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Memory expansion Mode and Microprocessor Mode Vcc=5V (When accessing DRAM area with 2 wait) Read Timing BCLK tcyc d(BCLK-CAD)
Page 258
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Memory expansion Mode and Microprocessor Mode Vcc=5V (When accessing DRAM area with 2 wait) Write Timing BCLK tcyc d(BCLK-RAD)
Page 259
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) Memory expansion Mode and Microprocessor Mode Vcc=5V Refresh Timing (CAS before RAS refresh) BCLK tcyc d(BCLK-RAS) 18ns.max h(BCLK-RAS)
Page 260
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) = 5V c(TA) w(TAH) input w(TAL) c(UP) w(UPH) input w(UPL) input (Up/down input) During event counter mode input –UP) su(UP–T...
Page 261
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 5V) = 5V Memory Expansion Mode and Microprocessor Mode (Valid only with wait) BCLK (Separate bus) WR, WRL, WRH (Separate bus) (Multiplexed bus)
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Electrical characteristics (Vcc = 3V) = 3V Table 1.28.23. Electrical characteristics (referenced to V = 3V, V = 0V at Topr = 25 C, f(X...
Page 263
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Electrical characteristics (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Table 1.28.24. A-D conversion characteristics (referenced to V = AV = 3V, V = AV 0V at Topr = 25 C, f(X...
Page 264
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Timing requirements (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.26.
Page 265
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Timing requirements (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.28.
Page 266
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Timing requirements (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.33.
Page 267
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Switching characteristics (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.39.
Page 268
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Switching characteristics (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.40.
Page 269
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Switching characteristics (referenced to V = 3V, V = 0V at Topr = 25 C, CM15 = “1”...
Page 270
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Timing (Vcc = 3V) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER = 3V Switching characteristics (referenced to V = 3V, V = 0V at Topr = 25 C unless otherwise specified) Table 1.28.42.
Page 271
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Vcc=3V Memory expansion Mode and Microprocessor Mode (without wait) Read Timing BCLK d(BCLK-ALE) h(BCLK-ALE) 25ns.max -2ns.min h(BCLK-CS) d(BCLK-CS)
Page 272
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Vcc=3V Memory expansion Mode and Microprocessor Mode (with 1 wait) Read Timing BCLK 25ns.max d(BCLK-ALE) h(BCLK-ALE) -2ns.min h(BCLK-CS)
Page 273
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Vcc=3V Memory expansion Mode and Microprocessor Mode (with 2 wait) Read Timing BCLK 25ns.max d(BCLK-ALE) h(BCLK-ALE) -2ns.min h(BCLK-CS)
Page 274
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode (with 3 wait) Vcc=3V Read Timing BCLK 25ns.max d(BCLK-ALE) h(BCLK-ALE) -2ns.min h(BCLK-CS)
Page 275
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Vcc=3V Memory expansion Mode and Microprocessor Mode (When accessing external memory area with 2 wait, and select multiplexed bus) Read Timing BCLK d(BCLK-ALE)
Page 276
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Vcc=3V Memory expansion Mode and Microprocessor Mode (When accessing external memory area with 3 wait, and select multiplexed bus) Read Timing BCLK d(BCLK-ALE)
Page 277
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode Vcc=3V (When accessing DRAM area with 1 wait) Read Timing BCLK tcyc d(BCLK-CAD)
Page 278
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode Vcc=3V (When accessing DRAM area with 1 wait) Write Timing BCLK tcyc d(BCLK-RAD)
Page 279
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode Vcc=3V (When accessing DRAM area with 2 wait) Read Timing BCLK tcyc d(BCLK-CAD)
Page 280
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode Vcc=3V (When accessing DRAM area with 2 wait) Write Timing BCLK tcyc d(BCLK-RAD)
Page 281
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory expansion Mode and Microprocessor Mode Vcc=3V Refresh Timing (CAS before RAS refresh) BCLK tcyc d(BCLK-RAS) 25ns.max h(BCLK-RAS)
Page 282
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) = 3V c(TA) w(TAH) input w(TAL) c(UP) w(UPH) input w(UPL) input (Up/down input) During event counter mode input –UP) su(UP–T...
Page 283
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timing (Vcc = 3V) Memory Expansion Mode and Microprocessor Mode = 3V (Valid only with wait) BCLK (Separate bus) WR, WRL, WRH (Separate bus) (Multiplexed bus)
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Description (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Outline Performance Table 1.29.1 shows the outline performance of the M16C/80 (flash memory version). Table 1.29.1. Outline Performance of the M16C/80 (flash memory version) Item Performance Power supply voltage...
Page 285
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Description (Flash Memory Version) The following shows Mitsubishi plans to develop a line of M16C/80 products (flash memory version). (1) ROM capacity (2) Package 100P6S-A ...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Description (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Flash Memory The M16C/80 (flash memory version) contains the flash memory that can be rewritten with a single voltage of 5 V.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER CPU Rewrite Mode In CPU rewrite mode, the on-chip flash memory can be operated on (read, program, or erase) under control of the Central Processing Unit (CPU).
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Outline Performance (CPU Rewrite Mode) In the CPU rewrite mode, the CPU erases, programs and reads the internal flash memory as instructed by software commands.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Figure 1.30.2 shows a flowchart for setting/releasing the CPU rewrite mode. Figure 1.30.3 shows a flow- chart for shifting to the low speed mode.
Page 290
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Program in ROM Program in RAM Start Single-chip mode, memory expansion (Boot mode only) mode, or boot mode Set user ROM area select bit to “1”...
Page 291
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Program in ROM Program in RAM Start Transfer the program to be executed in the Set flash memory power supply-OFF bit to “1”...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Precautions on CPU Rewrite Mode Described below are the precautions to be observed when rewriting the flash memory in CPU rewrite mode.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Software Commands Table 1.30.1 lists the software commands available with the M16C/62A (flash memory version). After setting the CPU rewrite mode select bit to 1, write a software command to specify an erase or program operation.
Page 294
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Page Program Command (41 Page program allows for high-speed programming in units of 256 bytes. Page program operation starts when the command code “41 ”...
Page 295
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Block Erase Command (20 By writing the command code “20 ” in the first bus cycle and the confirmation command code “D0 ”...
Page 296
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Erase All Unlock Blocks Command (A7 By writing the command code “A7 ” in the first bus cycle and the confirmation command code “D0 ”...
Page 297
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Read Lock Bit Status Command (71 By writing the command code “71 ” in the first bus cycle and then the block address of a flash memory block in the second bus cycle that follows, the system reads out the status of the lock bit of the specified block on to the data (D6).
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Data Protect Function (Block Lock) Each block in Figure 1.29.3 has a nonvolatile lock bit to specify that the block be protected (locked) against erase/write.
Page 299
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Program status (SR4) The program status informs the operating status of auto write operation to the CPU. When a write error occurs, it is set to 1.
Page 300
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. CPU Rewrite Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Full Status Check By performing full status check, it is possible to know the execution results of erase and program operations.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Functions To Inhibit Rewriting Flash Memory (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Functions To Inhibit Rewriting Flash Memory Version To prevent the contents of the flash memory version from being read out or rewritten easily, the device incorporates a ROM code protect function for use in parallel I/O mode and an ID code check function for use in standard serial I/O mode.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Functions To Inhibit Rewriting Flash Memory (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER ID Code Check Function Use this function in standard serial I/O mode. When the contents of the flash memory are not blank, the ID code sent from the peripheral unit is compared with the ID code written in the flash memory to see if they match.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Parallel I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Parallel I/O Mode In this mode, the M16C/80 (flash memory version) operates in a manner similar to the flash memory M5M29FB/T800 from Mitsubishi.
Page 304
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Pin functions (Flash memory standard serial I/O mode) Name Description Power input Apply 4.2V to 5.5V to Vcc pin and 0 V to Vss pin.
Page 305
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Mode setting Signal Value CNVss RESET Vss >> Vcc /ANEX1/T /SDA /SRxD /ANEX0/CLK /TB4...
Page 306
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Mode setting Signal Value CNVss RESET Vss >> Vcc /TB4 /CTS /RTS /TB3 /CTS...
Page 307
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Mode setting Signal Value CNVss RESET Vss >> Vcc /CS3/A (MA12) /CS2/A /CS1/A /CS0/A...
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Standard serial I/O mode The standard serial I/O mode inputs and outputs the software commands, addresses and data needed to operate (read, program, erase, etc.) the internal flash memory.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Overview of standard serial I/O mode 1 (clock synchronized) In standard serial I/O mode 1, software commands, addresses and data are input and output between the MCU and peripheral units (serial programer, etc.) using 4-wire clock-synchronized serial I/O (UART1).
Page 310
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Software Commands Table 1.31.1 lists software commands. In the standard serial I/O mode 1, erase operations, programs and reading are controlled by transferring software commands via the RxD pin.
Page 311
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Page Read Command This command reads the specified page (256 bytes) in the flash memory sequentially one byte at a time.
Page 312
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clear Status Register Command This command clears the bits (SR3–SR5) which are set when the status register operation ends in error.
Page 313
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Block Erase Command This command erases the data in the specified block. Execute the block erase command as explained here following.
Page 314
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Erase All Unlocked Blocks Command This command erases the content of all blocks. Execute the erase all unlocked blocks command as explained here following.
Page 315
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Read Lock Bit Status Command This command reads the lock bit status of the specified block. Execute the read lock bit status com- mand as explained here following.
Page 316
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Lock Bit Disable Command This command disables the lock bit. The command code “75 ”...
Page 317
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Version Information Output Command This command outputs the version information of the control program stored in the boot area. Execute the version information output command as explained here following.
Page 318
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER ID Check This command checks the ID code. Execute the boot ID check command as explained here following. (1) Transfer the “F5 ”...
Page 319
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Read Check Data This command reads the check data that confirms that the write data, which was sent with the page program command, was successfully received.
Page 320
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Data Protection (Block Lock) Each of the blocks in Figure 1.31.20 have a nonvolatile lock bit that specifies protection (block lock) against erasing/writing.
Page 321
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Status Register (SRD) The status register indicates operating status of the flash memory and status such as whether an erase operation or a program ended successfully or in error.
Page 322
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Status Register 1 (SRD1) Status register 1 indicates the status of serial communications, results from ID checks and results from check sum comparisons.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 1 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Full Status Check Results from executed erase and program operations can be known by running a full status check. Figure 1.31.21 shows a flowchart of the full status check and explains how to remedy errors which occur.
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Overview of standard serial I/O mode 2 (clock asynchronized) In standard serial I/O mode 2, software commands, addresses and data are input and output between the MCU and peripheral units (serial programer, etc.) using 2-wire clock-asynchronized serial I/O (UART1).
Page 325
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER How frequency is identified When "00 " data is received 16 times from a peripheral unit at a baud rate of 9,600 bps, the value of the bit rate generator is set to match the operating frequency (2 - 20 MHz).
Page 326
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Software Commands Table 1.31.5 lists software commands. In the standard serial I/O mode 2, erase operations, programs and reading are controlled by transferring software commands via the RxD pin.
Page 327
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Page Read Command This command reads the specified page (256 bytes) in the flash memory sequentially one byte at a time.
Page 328
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Page Program Command This command writes the specified page (256 bytes) in the flash memory sequentially one byte at a time.
Page 329
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Erase All Unlocked Blocks Command This command erases the content of all blocks. Execute the erase all unlocked blocks command as explained here following.
Page 330
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Read Lock Bit Status Command This command reads the lock bit status of the specified block. Execute the read lock bit status com- mand as explained here following.
Page 331
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Lock Bit Disable Command This command disables the lock bit. The command code “75 ”...
Page 332
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Version Information Output Command This command outputs the version information of the control program stored in the boot area. Execute the version information output command as explained here following.
Page 333
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER ID Check This command checks the ID code. Execute the boot ID check command as explained here following. (1) Transfer the “F5 ”...
Page 334
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Read Check Data This command reads the check data that confirms that the write data, which was sent with the page program command, was successfully received.
Page 335
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Baud Rate 19200 This command changes baud rate to 19,200 bps. Execute it as follows. (1) Transfer the "B1 "...
Page 336
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. Appendix Standard Serial I/O Mode 2 (Flash Memory Version) SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Baud Rate 115200 This command changes baud rate to 115,200 bps. Execute it as follows. (1) Transfer the "B4 "...
Page 337
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 100P6S-A Plastic 100pin 14 20mm body QFP Weight(g) Lead Material EIAJ Package Code JEDEC Code QFP100-P-1420-0.65 – 1.58 Alloy 42 Recommended Mount Pad Dimension in Millimeters Symbol...
Page 338
Preliminary Specifications REV.D Mitsubishi Microcomputers M16C/80 group Specifications in this manual are tentative and subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 144P6Q-A Plastic 144pin 20 20mm body LQFP EIAJ Package Code JEDEC Code Weight(g) Lead Material LQFP144-P-2020-0.50 – 1.23 Cu Alloy Recommended Mount Pad Dimension in Millimeters Symbol...
cifications REV.D Mitsubishi Microcomputers M16C/80 group this manual are tentative and subject to change. Protect SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.1 Protect 2.1.1 Overview 'Protect' is a function that causes a value held in a register to be unchanged even when a program runs away.
Mitsubishi Microcomputers M16C/80 group ubject to change. Protect SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.1.2 Protect Operation The following explains the protect operation. Figure 2.1.2 shows the set-up procedure. (1) Setting “1” in the write-enable bit of system clock control registers 0 and 1 and main clock Operation division register (PRC0) causes system clock control register 0 and 1 and main clock division register to be in write-enabled state.
cifications REV.D Mitsubishi Microcomputers M16C/80 group this manual are tentative and subject to change. Protect SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (1) Clearing the protect (set to write-enabled state) Protect register [Address 000A PRCR Enables writing to system clock control registers 0 and 1 (addresses 0006 0007 and main clock devision register (address 000C 1 : Write-enabled...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2 Timer A 2.2.1 Overview The following is an overview for timer A, a 16-bit timer. (1) Mode Timer A operates in one of the four modes: (a) Timer mode In this mode, the internal count source is counted.
Page 344
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (2) Count source The internal count source can be selected from f1, f , and f . Clocks f , and f are derived by dividing the CPU's main clock by 1, 8, and 32 respectively.
Page 345
1 0 : One-shot timer mode TMOD1 1 1 : Pulse width modulation (PWM) mode This bit is invalid in M16C/80 series. – – Port output control is set by the function select registers A and B. Function varies with each operation mode...
Page 346
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Ai register (Note 1) Symbol Address When reset (b15) (b8) 0347 ,0346 Indeterminate b0b7 0349 ,0348 Indeterminate 034B ,034A...
Page 347
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Up/down flag (Note) Symbol Address When reset b6 b5 0344 Bit symbol Bit name Function TA0UD 0 : Down count Timer A0 up/down flag 1 : Up count TA1UD...
Page 348
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Trigger select register Symbol Address When reset TRGSR 0343 Bit symbol Bit name Function Timer A1 event/trigger b1 b0 TA1TGL 0 0 :...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.2 Operation of Timer A (timer mode) In timer mode, choose functions from those listed in Table 2.2.1. Operations of the circled items are described below.
Page 350
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting timer mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of timer mode Gate function select bit b4 b3...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.3 Operation of Timer A (timer mode, gate function selected) In timer mode, choose functions from those listed in Table 2.2.2. Operations of the circled items are described below.
Page 352
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting timer mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of timer mode Gate function select bit b4 b3...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.4 Operation of Timer A (timer mode, pulse output function selected) In timer mode, choose functions from those listed in Table 2.2.3. Operations of the circled items are described below.
Page 354
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting timer mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of timer mode Gate function select bit b4 b3...
Page 355
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting divide ratio Timer A0 register [Address 0347 , 0346 ] TA0 (b15) (b8) Timer A1 register [Address 0349...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.5 Operation of Timer A (event counter mode, reload type selected) In event counter mode, choose functions from those listed in Table 2.2.4. Operations of the circled items are described below.
Page 357
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of event counter mode Count polarity select bit...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.6 Operation of Timer A (event counter mode, free run type selected) In event counter mode, choose functions from those listed in Table 2.2.5. Operations of the circled items are described below.
Page 359
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of event counter mode Count polarity select bit...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.7 Operation of timer A (two-phase pulse signal process in event counter mode, normal mode selected) In processing two-phase pulse signals in event counter mode, choose functions from those listed in Table 2.2.6.
Page 361
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer Ai mode register (i= 2, 3) [Address 0358 , 0359 TAiMR (i= 2, 3) Selection of event counter mode 0 (Must always be “0”...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.8 Operation of timer A (two-phase pulse signal process in event counter mode, multiply-by-4 mode selected) In processing two-phase pulse signals in event counter mode, choose functions from those listed in Table 2.2.7.
Page 363
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer Ai mode register (i= 3, 4) [Address 0359 , 035A TAiMR (i= 3, 4) Selection of event counter mode 0 (Must always be “0”...
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.9 Operation of timer A (two-phase pulse signal process in event counter mode, free run type, multiply-by-4 mode and Z-phase input selected) In this mode, timer A3 counter can be set to "0"...
Page 365
inary Specifications REV.D Mitsubishi Microcomputers M16C/80 group fications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer A3 mode register [Address 0359 TA3MR Selection of event counter mode 0 (Must always be “0”...
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.10 Operation of Timer A (one-shot timer mode) In one-shot timer mode, choose functions from those listed in Table 2.2.10. Operations of the circled items are described below.
Page 367
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting one-shot timer mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A TAiMR (i=0 to 4) Selection of one-shot timer mode External trigger select bit When internal trigger is selected, this bit can be “1”...
Page 368
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Clearing timer Ai interrupt request bit (Please refer to the notes on the one-shot timer mode of Timer A.) Timer Ai interrupt control register [Addresses 006C , 008C...
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.11 Operation of Timer A (one-shot timer mode, external trigger selected) In one-shot timer mode, choose functions from those listed in Table 2.2.11. Operations of the circled items are described below.
Page 370
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting one-shot timer mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A 0 1 1 TAiMR (i=0 to 4) Selection of one-shot timer mode...
Page 371
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting event/trigger select bit Trigger select register One-shot start flag [Address 0343 [Address 0342 TRGSR ONSF Timer A1 event/trigger select bit...
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.12 Operation of Timer A (pulse width modulation mode, 16-bit PWM mode selected) In pulse width modulation mode, choose functions from those listed in Table 2.2.12. Operations of the circled items are described below.
Page 373
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting PWM mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A 0 1 1 TAiMR (i=0 to 4) Selection of PWM mode External trigger select bit...
Page 374
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting event/trigger select bit Trigger select register One-shot start flag [Address 0343 [Address 0342 TRGSR ONSF...
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.13 Operation of Timer A (pulse width modulation mode, 8-bit PWM mode selected) In pulse width modulation mode, choose functions from those listed in Table 2.2.13. Operations of the circled items are described below.
Page 376
ary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ations in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting PWM mode and functions Timer Ai mode register (i=0 to 4) [Address 0356 to 035A 1 1 0 TAiMR (i=0 to 4) Selection of PWM mode External trigger select bit...
Page 377
Specifications REV.D Mitsubishi Microcomputers M16C/80 group ns in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting event/trigger select bit Trigger select register One-shot start flag [Address 0343 [Address 0342 TRGSR ONSF Timer A1 event/trigger select bit...
minary Specifications REV.D Mitsubishi Microcomputers M16C/80 group cifications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.14 Precautions for Timer A (timer mode) (1) To clear reset, the count start flag is set to “0”. Set a value in the timer Ai register, then set the flag to “1”.
minary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ecifications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.15 Precautions for Timer A (event counter mode) (1) To clear reset, the count start flag is set to “0”. Set a value in the timer Ai register, then set the flag to “1”.
Page 380
minary Specifications REV.D Mitsubishi Microcomputers M16C/80 group cifications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (5) In the case of using as “Free-Run type”, the timer register contents may be unknown when counting begins.
Page 381
minary Specifications REV.D Mitsubishi Microcomputers M16C/80 group ecifications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.16 Precautions for Timer A (one-shot timer mode) (1) At reset, the count start flag is set to “0”. Set a value in the timer Ai register, then set the flag to “1”.
minary Specifications REV.D Mitsubishi Microcomputers M16C/80 group cifications in this manual are tentative and subject to change. Timer A SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.2.17 Precautions for Timer A (pulse width modulation mode) (1) To clear reset, the count start flag is set to “0”. Set a value in the timer Ai register, then set the flag to “1”.
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3 Timer B 2.3.1 Overview The following is an overview for timer B, a 16-bit timer. (1) Mode Timer B operates in one of three modes: (a) Timer mode The internal count source is counted.
Page 384
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (6) Input to the timer, and the function select register and the direction register To input an external signal to the timer, set the related function select register A to I/O port and the direction register to input.
Page 385
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Bi mode register Symbol Address When reset TBiMR(i = 0 to 5) 035B to 035D 00XX0000 031B to 031D 00XX0000 Bit symbol Function...
Page 386
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Timer Bi register (Note) Symbol Address When reset 0351 , 0350 Indeterminate 0353 , 0352 Indeterminate (b15) (b8) b0 b7 0355 , 0354 Indeterminate 0311...
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.2 Operation of Timer B (timer mode) In timer mode, choose functions from those listed in Table 2.3.1. Operations of the circled items are described below.
Page 388
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting timer mode and functions Timer Bi mode register (i=0 to 5) [Address 035B to 035D , 031B to 031D TBiMR (i=0 to 5) Selection of timer mode Invalid in timer mode Can be “0”...
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.3 Operation of Timer B (event counter mode) In event counter mode, choose functions from those listed in Table 2.3.2. Operations of the circled items are described below.
Page 390
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting event counter mode and functions Timer Bi mode register (i=0 to 5) [Address 035B to 035D , 031B to 031D TBiMR (i=0 to 5) Selection of event counter mode Count polarity select bit...
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.4 Operation of Timer B (pulse period measurement mode) In pulse period/pulse width measurement mode, choose functions from those listed in Table 2.3.3. Op- erations of the circled items are described below.
Page 392
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting pulse period / pulse width measurement mode and functions Timer Bi mode register (i=0 to 5) [Address 035B to 035D , 031B to 031D TBiMR (i=0 to 5)
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.5 Operation of Timer B (pulse width measurement mode) In pulse period/pulse width measurement mode, choose functions from those listed in Table 2.3.4. Op- erations of the circled items are described below.
Page 394
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting pulse period / pulse width measurement mode and functions Timer Bi mode register (i=0 to 5) [Address 035B to 035D , 031B to 031D TBiMR (i=0 to 5)
ications REV.D Mitsubishi Microcomputers M16C/80 group is manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.6 Precautions for Timer B (timer mode, event counter mode) (1) To clear reset, the count start flag is set to “0”. Set a value in the timer Bi register, then set the flag to “1”.
ions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Timer B SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.3.7 Precautions for Timer B (pulse period/pulse width measurement mode) (1) The timer Bi interrupt request bit goes to “1” when an effective edge of a measurement pulse is input or timer Bi is overflowed.
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.4 Clock-Synchronous Serial I/O 2.4.1 Overview Clock-synchronous serial I/O carries out 8-bit data communications in synchronization with the clock. The following is an overview of the clock-synchronous serial I/O. (1) Transmission/reception format 8-bit data (2) Transfer rate...
Page 398
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER _______ _______ _______ _______ • CTS/RTS functions disabled CTS/RTS pin is a programmable I/O port. _______ _______ _______ _______ • CTS function only enabled CTS/RTS pin performs the CTS function. _______ _______ _______ _______...
Page 399
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Following are some examples in which various functions (a) through (g) are selected: _______ • Transmission Operation WITH: CTS function, transmission at falling edge of transfer clock, LSB First, interrupt at instant transmission buffer is emptied;...
Page 400
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (8) Registers related to the serial I/O Figure 2.4.1 shows the memory map of serial I/O-related registers, and Figures 2.4.2 to 2.4.6 show serial I/O-related registers. UART2 receive/ACK interrupt control register (S2RIC) 006B UART3 receive/ACK interrupt control register (S3RIC)
Page 401
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Symbol Address When reset UARTi transmit buffer register (Note) U0TB 0363 , 0362 Indeterminate (b15) (b8) U1TB 036B , 036A Indeterminate U2TB 033B , 033A Indeterminate...
Page 402
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive mode register Symbol Address When reset UiMR(i=0,1) 0360 , 0368 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) Must be fixed to 001 b2 b1 b0 SMD0 Serial I/O mode select bit...
Page 403
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=0,1) 0364 , 036C Function Function Bit name (During clock synchronous...
Page 404
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=3,4) 032C , 02FC Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 405
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 1 Symbol Address When reset UiC1(i=0,1) 0365 036D Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) Transmit enable bit 0 : Transmission disabled...
Page 406
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UART transmit/receive control register 2 Symbol Address When reset UCON 0370 X0000000 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) U0IRS UART0 transmit 0 : Transmit buffer empty (Tl = 1)
Page 407
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi special mode register 2 Symbol Address When reset UiSMR2 (i=2 to 4) 0336 , 0326 , 02F6 Function Bit name symbol 0 : NACK/ACK interrupt IICM2 IIC mode select bit 2...
Page 408
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UART2 special mode register 3 Symbol Address When reset U2SMR3 0335 000XXXXX Bit name Function Bit symbol Nothing is assigned. These bits can neither be set nor reset. When read, their contents are indeterminate.
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.4.2 Operation of Serial I/O (transmission in clock-synchronous serial I/O mode) In transmitting data in clock-synchronous serial I/O mode, choose functions from those listed in Table 2.4.1.
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring (Note) Microcomputer Receiver side IC CLKi CTSi Port Note : Since T pin is N-channel open drain, this pin needs pull-up resistance. Example of operation (1) Transmission enabled (4) Transmission is complete (5) Transmit next data...
Page 411
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UART2 transmit/receive mode register Setting UARTi transmit/receive mode register (i=0 to 4) U2MR [Address 0338 UART0 transmit/receive mode register UART3 transmit/receive mode register U0MR [Address 0360 0 0 0 1 U3MR [Address 0328...
Page 412
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting function select register Function select register B1 Function select register A0 [Address 03B3 [Address 03B0 PSL1 Port P7 output peripheral function Port P6 output function select bit select bit...
Page 413
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page When CTSi input level = “L” Start transmission Checking the status of UARTi transmit /receive control register (i = 0 to 4) UART2 transmit/receive control register 1 U2C1 [Address 033D UART0 transmit/receive control register 1...
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.4.3 Operation of the Serial I/O (transmission in clock-synchronous serial I/O mode, transfer clock output from multiple pins function selected) In transmitting data in clock-synchronous serial I/O mode, choose functions from those listed in Table 2.4.2.
Page 415
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer CLKS Note: This applies when performing only transmission with an internal clock selected in the clock synchronous serial I/O mode. Example of operation (1) Transmission enabled (3) Transmission is complete...
Page 416
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting UART1 transmit/receive mode register UART1 transmit/receive mode register [Address 0368 U1MR Must be fixed to “001” Internal/external clock select bit 0 : Internal clock Invalid in clock synchronous I/O mode Invalid in clock synchronous I/O mode Invalid in clock synchronous I/O mode Sleep select bit...
Page 417
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UART1 bit rate generator UART1 bit rate generator [Address 0369 U1BRG (Note) Can be set to 00 to FF Note: Write to UART1 bit rate generator when transmission/reception is halted.
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.4.4 Operation of Serial I/O (reception in clock-synchronous serial I/O mode) In receiving data in clock-synchronous serial I/O mode, choose functions from those listed in Table 2.4.3. Operations of the circled items are described below.
Page 419
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Transmitter side IC CLKi RTSi Port Example of operation (1) Reception enabled (3) Reception is complete (2) Start reception (4) Read of reception data “1”...
Page 421
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UART transmit/receive control register 2 and UART2 transmit/receive control register 1 UARTi transmit/receive control register 1 (i=2 to 4) U2C1 [Address 033D UART3 transmit/receive control register 1 U3C1 [Address 032D...
Mitsubishi Microcomputers M16C/80 group subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.4.5 Precautions for Serial I/O (in clock-synchronous serial I/O mode) Transmission/reception _______ ________ (1) With an external clock selected, and choosing the RTS function, the output level of the RTSi pin goes to “L”...
Page 423
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Clock-Synchronous Serial I/O SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Transmission (1) With an external clock selected, perform the following set-up procedure with the CLKi pin input level = “H” if the CLK polarity select bit = “0” or with the CLKi pin input level = “L” if the CLK polarity select bit = “1”: 1.
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5 Clock-Asynchronous Serial I/O (UART) 2.5.1 Overview UART handles communications by means of character-by-character synchronization. The transmission side and the reception side are independent of each other, so full-duplex communication is possible. The following is an overview of the clock-asynchronous serial I/O.
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (2) Transfer rate The divide-by-16 frequency, resulting from division in the bit rate generator (BRG), becomes the trans- fer rate. The count source for the transfer rate register can be selected from f , and the input from the CLK pin.
Page 426
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (4) How to deal with an error When receiving data, read an error flag and reception data simultaneously to determine which error has occurred. If the data read is erroneous, initialize the error flag and the UARTi receive buffer register, then receive the data again.
Page 427
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (e) Bus collision detection function This function is to sample the output level of the TxD pin and the input level of the RxD pin; if their values are different, then an interrupt request occurs.
Page 428
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (8) Registers related to the serial I/O Figure 2.5.2 shows the memory map of serial I/O-related registers, and Figures 2.5.3 to 2.5.10 show UARTi-related registers. UART2 receive/ACK interrupt control register (S2RIC) 006B UART3 receive/ACK interrupt control register (S3RIC) 006D...
Page 429
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Symbol Address When reset UARTi transmit buffer register (Note) U0TB 0363 , 0362 Indeterminate (b15) (b8) U1TB 036B , 036A Indeterminate U2TB 033B , 033A Indeterminate...
Page 430
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive mode register Symbol Address When reset UiMR(i=0,1) 0360 , 0368 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) Must be fixed to 001 b2 b1 b0 SMD0...
Page 431
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=0,1) 0364 , 036C Function Function Bit name (During clock synchronous...
Page 432
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset UiC0(i=3,4) 032C , 02FC Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 433
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 1 Symbol Address When reset UiC1(i=0,1) 0365 036D Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) Transmit enable bit 0 : Transmission disabled...
Page 434
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UART transmit/receive control register 2 Symbol Address When reset UCON 0370 X0000000 Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode) U0IRS UART0 transmit 0 : Transmit buffer empty (Tl = 1)
Page 435
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi special mode register 2 Symbol Address When reset UiSMR2 (i=2 to 4) 0336 , 0326 , 02F6 Function Bit name symbol 0 : NACK/ACK interrupt IICM2 IIC mode select bit 2...
Page 436
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UART2 special mode register 3 Symbol Address When reset U2SMR3 0335 000XXXXX Bit name Function Bit symbol Nothing is assigned. These bits can neither be set nor reset. When read, their contents are indeterminate.
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5.2 Operation of Serial I/O (transmission in UART mode) In transmitting data in UART mode, choose functions from those listed in Table 2.5.4. Operations of the circled items are described below.
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring (Note) Microcomputer Receiver side IC CTSi Port Note: Since T pin is N-channel open drain, this pin needs pull-up resistance. Example of operation When confirming stop bit, stopped transfer clock once because CTS = “H”...
Page 440
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting function select register Function select register B1 Function select register A0 [Address 03B3 [Address 03B0 PSL1 Port P7 output peripheral function Port P6 output function select bit select bit...
Page 441
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page When CTSi input level = “L” Start transmission Checking the status of UARTi transmit /receive control register (i = 0 to 4) UART2 transmit/receive control register 1 U2C1 [Address 033D UART0 transmit/receive control register 1...
Mitsubishi Microcomputers M16C/80 group tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5.3 Operation of Serial I/O (reception in UART mode) In receiving data in UART mode, choose functions from those listed in Table 2.5.5. Operations of the circled items are described below.
Page 443
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Transmitter side IC RTSi Port Example of operation (4) Data is read (1) Reception enabled (3) Receiving is (2) Start reception completed BRGi's count...
Page 445
ns REV.D Mitsubishi Microcomputers M16C/80 group nual are tentative and subject to change. UART SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UART transmit/receive control register 2 and UART2 transmit/receive control register 1 UARTi transmit/receive control register 1 (i=2 to 4) U2C1 [Address 033D UART3 transmit/receive control register 1 U3C1 [Address 032D...
EV.D Mitsubishi Microcomputers M16C/80 group are tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5.4 Operation of Serial I/O (transmission used for SIM interface) In transmitting data in UARTi (i=2 to 4) mode (used for SIM interface), choose functions from those listed in Table 2.5.6.
Page 447
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring (Note1) Microcomputer SIM card Note1: TxDi pin is N-channel open drain and needs a pull-up resistance. Example of operation (when direct format) (1) Transmission enabled (3) Confirm stop bit (5) Dispose...
Page 449
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UARTi bit rate generator (i = 2 to 4) UARTi bit rate generator (i = 2 to 4) [Address 0339 , 0329 , 02F9 UiBRG (i = 2 to 4)
EV.D Mitsubishi Microcomputers M16C/80 group are tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5.5 Operation of Serial I/O (reception used for SIM interface) In receiving data in UARTi (i=2 to 4) mode (used for SIM interface), choose functions from those listed in Table 2.5.7.
Page 451
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring (Note) Microcomputer SIM card External clock Note1: TxDi pin is N-channel open drain and needs a pull-up resistance. Note2: i=2 to 4 Example of operation (when inversed format) (1) Reception enabled (3) Receiving is completed...
Page 453
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting function select register Function select register B1 Function select register A0 [Address 03B3 [Address 03B0 PSL1 Port P7 output peripheral function Port P6 output function select bit...
Page 454
EV.D Mitsubishi Microcomputers M16C/80 group are tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Start reception Checking completion of data reception UART2 transmit/receive control register 1 U2C1 [Address 033D UART3 transmit/receive control register 1 U3C1 [Address 032D UART4 transmit/receive control register 1 U4C1 [Address 02FD Receive complete flag 0 : No data present in receive buffer register...
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.5.6 Clock Signals in used for the SIM Interface In conforming to the SIM interface, the UART clock signal within the SIM card needs to conform to the UARTi (i=2 to 4) clock signal within the microprocessor.
Page 456
EV.D Mitsubishi Microcomputers M16C/80 group are tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Clock generator M30800MC CARD jOUT Timer Aj counter flip-flop kOUT SIM card Timer Ak counter flip-flop internal clock frequency division ratio External clock CLKi UART clock Bit rate generator...
Page 457
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 2.5.8. UARTi bit rate adjustment factor (i=2 to 4) UART2 bit UART2 bit SIM card SIM card rate rate Bit rate Bit rate internal clock internal clock generator...
Page 458
EV.D Mitsubishi Microcomputers M16C/80 group are tentative and subject to change. SIM interface SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 2.5.9. TimerAi register adjustment factor SIM card SIM card Bit rate Timer Ai Timer Aj Bit rate internal clock internal clock value value F(Hz) F(Hz)
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.6 Serial Interface Special Function 2.6.1 Overview _____ Serial interface special function can control communications on the serial bus using SSi input pins. The following is an overview of the serial interface special function.
Page 460
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Following are some examples in which various functions (a) through (c) are selected: • Transmission Operation WITH: outputting transmission data at falling edge of transfer clock, no clock delay, master mode .......................
Page 461
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (8) Registers related to the serial I/O Figure 2.6.1 shows the memory map of serial interface special function-related registers, and Figures 2.6.2 to 2.6.5 show serial interface special function-related registers.
Page 462
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Symbol Address When reset UARTi transmit buffer register (Note) U0TB 0363 , 0362 Indeterminate (b15) (b8) U1TB 036B , 036A Indeterminate U2TB 033B , 033A Indeterminate U3TB 032B...
Page 463
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive mode register Symbol Address When reset UiMR (i=2 to 4) 0338 , 0328 , 02F8 Function Function Bit name (During clock synchronous symbol (During UART mode)
Page 464
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi transmit/receive control register 1 Symbol Address When reset UiC1 (i=2 to 4) 033D , 032D , 02FD Function Function Bit name (During clock synchronous symbol (During UART mode) serial I/O mode)
Page 465
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER UARTi special mode register 3 (i=3,4) Symbol Address When reset U3SMR3 0325 00000000 U4SMR3 02F5 00000000 Bit name Function Bit symbol SS port function enable bit 0: SS function disable (Note 3) 1: SS function enable...
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.6.2 Operation of Serial Interface Special Function (transmission in master mode without delay) (Note) In transmitting data in serial interface special function master mode, choose functions from those listed in Table 2.6.1.
Page 467
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Receiver side IC Port CLKi Example of operation (1) Output "L" at the receiver side IC (4) Transmission is complete (2) Transmission enabled (5) Transmit next data (3) Start transmission Tc...
Page 468
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting UARTi transmit/receive mode register (i=3, 4) UART3 transmit/receive mode register U3MR [Address 0328 0 0 0 1 UART4 transmit/receive mode register U4MR [Address 02F8 Must be fixed to “001”...
Page 469
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UARTi transmit/receive control register 1 (i=3, 4) UART3 transmit/receive control register 1 U3C1 [Address 032D UART4 transmit/receive control register 1 U4C1 [Address 02FD UARTi transmit interrupt cause select bit...
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.6.3 Operation of Serial Interface Special Function (reception in master mode with clock delay) (Note) In receiving data in serial interface special function master mode, choose functions from those listed in Table 2.6.2.
Page 471
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Transmitter side IC Port CLKi Example of operation (1) Output "L" on the transmitter side IC (2) Reception enabled (4) Reception is complete (3) Start reception (5) Read of reception data...
Page 472
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting UARTi transmit/receive mode register (i=3, 4) UART3 transmit/receive mode register U3MR [Address 0328 0 0 0 1 UART4 transmit/receive mode register U4MR [Address 02F8 Must be fixed to “001”...
Page 473
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UARTi transmit/receive control register 1 (i=3, 4) UART3 transmit/receive control register 1 U3C1 [Address 032D UART4 transmit/receive control register 1 U4C1 [Address 02FD UARTi transmit interrupt cause select bit...
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.6.4 Operation of Serial Interface Special Function (transmission in slave mode without delay) (Note) In transmitting data in serial interface special function slave mode, choose functions from those listed in Table 2.6.3.
Page 475
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Receiver side IC Port CLKi Example of operation (1) Set SSi port to "L" with the output from the receiver side IC port (4) Transmission is complete (2) Transmission enabled (5) Transmit next data...
Page 476
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting UARTi transmit/receive mode register (i=3, 4) UART3 transmit/receive mode register U3MR [Address 0328 1 0 0 1 UART4 transmit/receive mode register U4MR [Address 02F8 Must be fixed to “001”...
Page 477
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UARTi transmit/receive control register 1 (i=3, 4) UART3 transmit/receive control register 1 U3C1 [Address 032D UART4 transmit/receive control register 1 U4C1 [Address 02FD UARTi transmit interrupt cause select bit...
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.6.5 Operation of Serial Interface Special Function (reception in slave mode with clock delay) (Note) In receiving data in serial interface special function slave mode, choose functions from those listed in Table 2.6.4.
Page 479
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example of wiring Microcomputer Transmistter side IC Port CLKi Example of operation (1) Set SSi port to "L" by the output from the transmitter side IC port (4) Reception is complete (2) Reception enabled (5) Read of reception data...
Page 480
Mitsubishi Microcomputers M16C/80 group subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting UARTi transmit/receive mode register (i=3, 4) UART3 transmit/receive mode register U3MR [Address 0328 1 0 0 1 UART4 transmit/receive mode register U4MR [Address 02F8 Must be fixed to “001”...
Page 481
EV.D Mitsubishi Microcomputers M16C/80 group re tentative and subject to change. Serial Interface Special Function SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting UARTi transmit/receive control register 1 (i=3, 4) UART3 transmit/receive control register 1 U3C1 [Address 032D UART4 transmit/receive control register 1 0 0 0 U4C1 [Address 02FD...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7 A-D Converter 2.7.1 Overview The A-D converter used in the M16C/80 group operates on a successive conversion basis. The following is an overview of the A-D converter. (1) Mode The A-D converter operates in one of five modes: (a) One-shot mode...
Page 483
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (4) Functions selection (a) Sample & Hold function Sample & Hold function samples input voltage when A-D conversion starts and carries out A-D conversion on the voltage sampled. When A-D conversion starts, input voltage is sampled for 3 cycles of the operation clock.
Page 484
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (5) Input to A-D converter and the relation between function select register and direction register To use the A-D converter, set the direction register of the relevant port to input. When pins ANEX0 and ANEX1 are used, set the corresponding port for I/O port with function select register A3 and select the input peripheral function disable with function select register B3.
Page 485
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D control register 0 (Note 1) Symbol Address When reset ADCON0 0396 00000XXX Bit symbol Bit name Function b2 b1 b0 0 0 0 : AN is selected Analog input pin select bit 0 0 1 : AN is selected...
Page 486
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D control register 1 (Note 1) Symbol Address When reset ADCON1 0397 Bit symbol Bit name Function When single sweep and repeat sweep A-D sweep pin mode 0 are selected select bit SCAN0 b1 b0...
Page 487
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER A-D control register 2 (Note) Symbol Address When reset ADCON2 0394 XXXXXXX0 0 0 0 Bit symbol Bit name Function 0 : Without sample and hold A-D conversion method 1 : With sample and hold select bit Reserved bit...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.2 Operation of A-D converter (one-shot mode) In one-shot mode, choose functions from those listed in Table 2.7.2. Operations of the circled items are described below. Figure 2.7.5 shows the operation timing, and Figure 2.7.6 shows the set-up procedure. Table 2.7.2.
Page 489
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 [Address 0396 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.3 Operation of A-D Converter (in one-shot mode, an external trigger selected) In one-shot mode, choose functions from those listed in Table 2.7.3. Operations of the circled items are described below.
Page 491
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 [Address 0396 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.4 Operation of A-D Converter (in one-shot mode, expanded analog input pin selected) In one-shot mode, choose functions from those listed in Table 2.7.4. Operations of the circled items are described below.
Page 493
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 [Address 0396 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.5 Operation of A-D Converter (in one-shot mode, external op-amp connection mode selected) In one-shot mode, choose functions from those listed in Table 2.7.5. Operations of the circled items are described below.
Page 495
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 [Address 0396 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.6 Operation of A-D Converter (in repeat mode) In repeat mode, choose functions from those listed in Table 2.7.6. Operations of the circled items are described below. Figure 2.7.13 shows timing chart, and Figure 2.7.14 shows the set-up procedure. Table 2.7.6.
Page 497
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 [Address 0396 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.7 Operation of A-D Converter (in single sweep mode) In single sweep mode, choose functions from those listed in Table 2.7.7. Operations of the circled items are described below. Figure 2.7.15 shows timing chart, and Figure 2.7.16 shows the set-up procedure. Table 2.7.7.
Page 499
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.8 Operation of A-D Converter (in repeat sweep mode 0) In repeat sweep 0 mode, choose functions from those listed in Table 2.7.8. Operations of the circled items are described below.
Page 501
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 and A-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 ADCON1...
Mitsubishi Microcomputers M16C/80 group o change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.9 Operation of A-D Converter (in repeat sweep mode 1) In repeat sweep 1 mode, choose functions from those listed in Table 2.7.9. Operations of the circled items are described below.
Page 503
Mitsubishi Microcomputers M16C/80 group t to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting Sample and hold A-D control register 2 [Address 0394 ADCON2 A-D conversion method select bit 1 : With sample and hold Setting A-D control register 0 andA-D control register 1 A-D control register 1 [Address 0397 A-D control register 0 ADCON1...
Mitsubishi Microcomputers M16C/80 group change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.10 Precautions for A-D Converter (1) Write to each bit (except bit 6) of A-D control register 0, to each bit of A-D control register 1, and to bit 0 of A-D control register 2 when A-D conversion is stopped (before a trigger occurs). In particular, when the Vref connection bit is changed from 0 to 1, start A-D conversion after an elapse of 1 µs or longer.
Mitsubishi Microcomputers M16C/80 group to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.11 Method of A-D Conversion (10-bit mode) (1) The A-D converter compares the reference voltage (Vref) generated internally based on the contents of the successive comparison register with the analog input voltage (V ) input from the analog input pin.
Page 506
Mitsubishi Microcomputers M16C/80 group change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 2.7.11. Variation of the successive comparison register and Vref while A-D conversion is in progress (10-bit mode) Successive approximation register change 0 0 0 0 0 0 0 0 0 A-D converter stopped 0 0 0 0 0 0 0 0 0 1st comparison...
Mitsubishi Microcomputers M16C/80 group to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.12 Method of A-D Conversion (8-bit mode) (1) In 8-bit mode, 8 higher-order bits of the 10-bit successive comparison register becomes A-D conversion result. Hence, if compared to a result obtained by using an 8-bit A-D converter, the voltage compared is different by 3 V /2048 (see what are underscored in Table 2.7.12), and differences in stepping points of output codes occur as shown in Figure 2.7.24.
Page 508
Mitsubishi Microcomputers M16C/80 group change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 2.7.13. Variation of the successive comparison register and Vref while A-D conversion is in progress (8-bit mode) change Successive approximation register 0 0 0 0 0 0 0 0 0 A-D converter stopped 0 0 0 0 0 0 0 0 0 –...
Mitsubishi Microcomputers M16C/80 group to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.13 Absolute Accuracy and Differential Non-Linearity Error • Absolute accuracy Absolute accuracy is the difference between output code based on the theoretical A-D conversion characteristics, and actual A-D conversion result. When measuring absolute accuracy, the voltage at the middle point of the width of analog input voltage (1-LSB width), that can meet the expectation of outputting an equal code based on the theoretical A-D conversion characteristics, is used as an ana- log input voltage.
Page 510
Mitsubishi Microcomputers M16C/80 group change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER • Differential non-linearity error Differential non-linearity error refers to the difference between 1-LSB width based on the theoretical A- D conversion characteristics (an analog input width that can meet the expectation of outputting an equal code) and an actually measured 1-LSB width (analog input voltage width that outputs an equal code).
Mitsubishi Microcomputers M16C/80 group to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.14 Internal Equivalent Circuit of Analog Input Figure 2.7.28 shows the internal equivalent circuit of analog input. Vcc Vss AVcc Parasitic ON resistor diode ON resistor approx. 0.6k Wiring resistor approx.
Mitsubishi Microcomputers M16C/80 group change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.7.15 Sensor’s Output Impedance under A-D Conversion (reference value) To carry out A-D conversion properly, charging the internal capacitor C shown in Figure 2.7.29 has to be completed within a specified period of time. With T as the specified time, time T is the time that switches SW2 and SW3 are connected to O in Figure 2.7.28.
Page 513
Mitsubishi Microcomputers M16C/80 group to change. A-D Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Tables 2.7.14. Relation between output impedance and precision (error) of A-D converter (10-bit mode) Reference value f(Xin) Cycle Sampling time Resolution (MHz) (pF) (LSB) (µs) (µs) (kΩ) (kΩ) (3 x cycle, Sample &...
Mitsubishi Microcomputers M16C/80 group to change. D-A Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.8 D-A Converter 2.8.1 Overview The D-A converter is based on the 8-bit R-2R technique. (1) Output voltage The D-A converter outputs voltage within a range from 0 V to V .
Mitsubishi Microcomputers M16C/80 group t to change. D-A Converter SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.8.2 D-A Converter Operation The following is the D-A converter operation. Figure 2.8.3 shows the set-up procedure. Operation (1) Writing a value to D-A register i starts D-A conversion. (2) Setting the D-Ai output enable bit to “1”...
Mitsubishi Microcomputers M16C/80 group ange. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.9 DMAC 2.9.1 Overview DMAC transfers one data item held in the source address to the destination address every time a transfer request is generated. The following is a DMAC overview. (1) Source address and destination address Both the register which indicates a source and the register which indicates a destination comprise of 24 bits, so that each can cover a 16M bytes space.
Page 517
Mitsubishi Microcomputers M16C/80 group change. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (7) Switching function (a) Switching between one-shot transfer and repeated transfer 'One-shot transfer' refers to a mode in which DMA is disabled after the transfer count register value changes from 0001 to 0000 .
Page 518
Mitsubishi Microcomputers M16C/80 group ange. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAi request cause select register (i = 0 to 3)(Note 1) Symbol Address When reset DMiSL 0378 to 037B 0X000000 Function Bit name Bit symbol DMA request cause b4 b3 b2 b1 b0 0 0 0 0 0 : Software trigger select bit DSEL0...
Page 519
Mitsubishi Microcomputers M16C/80 group change. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMA mode register 1 (CPU internal register) Symbol When reset DMD1 Bit name Function Bit symbol b1 b0 Channel 2 transfer MD20 0 0 : DMA inhibit mode select bit 0 1 : Single transfer 1 0 : Reserved MD21...
Page 520
Mitsubishi Microcomputers M16C/80 group ange. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DMAi memory address register (i = 0 to 3) Symbol When reset (CPU internal register) DMA0 XXXXXX DMA1 XXXXXX DMA2 (bank 1;A0) (Note 1) 000000 DMA3 (bank 1;A1) (Note 1) 000000 Transfer address Function...
Mitsubishi Microcomputers M16C/80 group change. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.9.2 Operation of DMAC (one-shot transfer mode) In one-shot transfer mode, choose functions from the items shown in Table 2.9.1. Operations of the circled items are described below. Figure 2.9.5 shows an example of operation and Figure 2.9.6 shows the set-up procedure.
Page 522
Mitsubishi Microcomputers M16C/80 group ange. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting DMAi request cause select register DMAi request cause select register (i=0 to 3) [Address 0378 to 037B 0 0 0 0 0 0 DMiSL (i=0 to 3) DMA request cause select bit b4b3b2b1 0 0 0 0 : Software trigger (Note) When changing DMA request cause select bit,...
Mitsubishi Microcomputers M16C/80 group change. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.9.3 Operation of DMAC (repeated transfer mode) In repeated transfer mode, choose functions from the items shown in Table 2.9.2. Operations of the circled items are described below. Figure 2.9.7 shows an example of operation and Figure 2.9.8 shows the set-up procedure.
Page 524
Mitsubishi Microcomputers M16C/80 group ange. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting DMAi request cause select register DMAi request cause select register (i=0 to 3) [Address 0378 to 037B 0 0 0 0 0 0 DMiSL (i=0 to 3) DMA request cause select bit b4b3b2b1 0 0 0 0 : Software trigger (Note) When changing DMA request cause select bit,...
Page 525
Mitsubishi Microcomputers M16C/80 group change. DMAC SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Precaution of DMAC (1) Do not clear the DMA request bit of the DMAi request cause select register. In M16C/80, when a DMA request is generated while the channel is disabled (Note), the DMA transfer is not executed and the DMA request bit is cleared automatically.
Mitsubishi Microcomputers M16C/80 group change. CRC Calculation Circuit SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.10 CRC Calculation Circuit 2.10.1 Overview Cyclic Redundancy Check (CRC) is a method that compares CRC code formed from transmission data by use of a polynomial generation with CRC check data so as to detect errors in transmission data. Using the CRC calculation circuit allows generation of CRC code.
Mitsubishi Microcomputers M16C/80 group bject to change. CRC Calculation Circuit SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.10.2 Operation of CRC Calculation Circuit The following describes the operation of the CRC calculation. Figure 2.10.3 shows an example of calcu- lation using the CRC calculation circuit. Operation (1) The CRC calculation circuit sets an initial value in the CRC data register.
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.11 X-Y Conversion 2.11.1 Overview X-Y conversions done with a coordinate system converter for 16 x 16 bit matrix data. The following is an overview of the X-Y conversion. (1) Mode Because the conversion mode is set separately for writing and reading, there are 4 modes total.
Page 529
Mitsubishi Microcomputers M16C/80 group t to change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (2) X-Y conversion related registers Figure 2.11.1 shows the memory map of X-Y conversion-related registers, and Figure 2.11.2 shows X-Y conversion-related registers. The Xi register is a write-only register, whereas the Yi register is a read-only register. Each pair of registers is assigned the same address.
Page 530
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER XY control register Symbol Address When reset 02E0 XXXXXX00 Bit symbol Bit name Function 0 : Data conversion XYC0 Read-mode set bit 1 : No data conversion 0 : No bit mapping conversion XYC1 Write-mode set bit 1 : Bit mapping conversion...
Mitsubishi Microcomputers M16C/80 group t to change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.11.2 Read data conversion mode In X-Y conversion, choose functions from those listed in Table 2.11.1. Operations of the circled items are described below. Figure 2.11.3 explains the operation, and Figure 2.11.4 shows the set-up procedure. Table 2.11.1.
Page 532
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting X-Y conversion mode X-Y control register [Address 02E0 Read-mode set bit 0 : Data conversion Write-mode set bit 0 : No bit mapping conversion Writing bit map data X0 register [Address 02C0 , 02C1...
Mitsubishi Microcomputers M16C/80 group t to change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.11.3 No conversion mode In X-Y conversion, choose functions from those listed in Table 2.11.2. Operations of the circled items are described below. Figure 2.11.5 explains the operation, and Figure 2.11.6 shows the set-up procedure. Table 2.11.2.
Page 534
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting X-Y conversion mode X-Y control register [Address 02E0 Read-mode set bit 1 : No data conversion Write-mode set bit 0 : No bit mapping conversion Writing bit map data X0 register [Address 02C0 , 02C1...
Mitsubishi Microcomputers M16C/80 group t to change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.11.4 Write data conversion mode In X-Y conversion, choose functions from those listed in Table 2.11.3. Operations of the circled items are described below. Figure 2.11.7 explains the operation, and Figure 2.11.8 shows the set-up procedure. Table 2.11.3.
Page 536
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting X-Y conversion mode X-Y control register [Address 02E0 Read-mode set bit 1 : No data conversion Write-mode set bit 1 : Bit mapping conversion Writing bit map data X0 register [Address 02C0 , 02C1...
Mitsubishi Microcomputers M16C/80 group t to change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.11.5 Read/Write data conversion mode In X-Y conversion, choose functions from those listed in Table 2.11.4. Operations of the circled items are described below. Figure 2.11.9 explains the operation, and Figure 2.11.10 shows the set-up procedure. Table 2.11.4.
Page 538
Mitsubishi Microcomputers M16C/80 group o change. X-Y Conversion SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Selecting X-Y conversion mode X-Y control register [Address 02E0 Read-mode set bit 0 : Data conversion Write-mode set bit 1 : Bit mapping conversion Writing bit map data X0 register [Address 02C0 , 02C1...
Mitsubishi Microcomputers M16C/80 group t to change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.12 DRAM Controller 2.12.1 Overview There is a built in DRAM controller to which it is possible to connect between 512 Kbytes and 8 Mbytes of DRAM. (1) DRAM space 512 Kbytes, 1Mbyte, 2 Mbytes, 4 Mbytes and 8 Mbytes of DRAM are connected to the address start- ing from 400000...
Page 540
Mitsubishi Microcomputers M16C/80 group o change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER DRAM control register b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset DRAMCONT 00040 Indeterminate (Note 4) Function Bit symbol Bit name 0 : Two wait Wait select bit (Note 1) 1 : One wait b3 b2 b1...
Mitsubishi Microcomputers M16C/80 group t to change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.12.2 Operation of DRAM controller In DRAM controller, choose functions from those listed in Table 2.12.2. Operations of the circled items are described below. Figure 2.12.3 shows a connecting example, and Figure 2.12.4 shows the set-up procedure.
Page 542
Mitsubishi Microcomputers M16C/80 group o change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting DRAM refresh interval DRAM refresh interval set register [Address 0041 ] REFCNT Refresh interval set bit Refresh interval = BCLK frequency x (refresh interval set bit + 1) x 32 Setting DRAM control register DRAM control register [Address 0040 ] DRAMCNT...
Mitsubishi Microcomputers M16C/80 group t to change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.12.3 Self-refresh shifting and disabling In self-refresh, choose functions from those listed in Table 2.12.2. Operations of the circled items selected when shifting to self-refresh or disabling self-refresh are described below.
Page 544
Mitsubishi Microcomputers M16C/80 group o change. DRAM Controller SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Shifting to self-refresh Select DRAM ignored DRAM control register [Address 0040 ] DRAMCNT Wait select bit 0 : Two waits DRAM space select bit 0 0 0 : DRAM ignored Setting DRAM space select bit and self-refresh DRAM control register [Address 0040 ] DRAMCNT...
Mitsubishi Microcomputers M16C/80 group ct to change. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.13 Watchdog Timer 2.13.1 Overview The watchdog timer can detect a runaway program using its 15-bit timer prescaler. The following is an overview of the watchdog timer. (1) Watchdog timer start procedure When reset, the watchdog timer is in stopped state.
Page 546
Mitsubishi Microcomputers M16C/80 group ange. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (5) Watchdog timer cycle The watchdog timer cycle varies depending on the BCLK and the frequency division ratio of the prescaler selected. Table 2.13.1 shows the watchdog timer cycle. Table 2.13.1.
Page 547
Mitsubishi Microcomputers M16C/80 group ct to change. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (6) Registers related to the watchdog timer Figure 2.13.1 shows the memory map of watchdog timer-related registers, and Figure 2.13.2 shows watchdog timer-related registers. System clock control register (CM0) 0006 ≈...
Page 548
Mitsubishi Microcomputers M16C/80 group ange. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Watchdog timer control register Symbol Address When reset 000F 000XXXXX Bit symbol Bit name Function High-order bit of watchdog timer Reserved bit Must always be set to “0” WDC7 Prescaler select bit 0 : Divided by 16 1 : Divided by 128...
Mitsubishi Microcomputers M16C/80 group ct to change. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.13.2 Operation of Watchdog Timer (Watchdog timer interrupt) The following is an operation of the watchdog timer using watchdog timer interrupt. Figure 2.13.3 shows the operation timing, and Figure 2.13.4 shows the set-up procedure. Operation (1) Writing to the watchdog timer start register initializes the watchdog timer to 7FFF causes it to start a down count.
Page 550
Mitsubishi Microcomputers M16C/80 group ange. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting watchdog timer control register Watchdog timer control register [Address 000F Reserved bit Must always be “0” Prescaler select bit 0 : Divided by 16 1 : Divided by 128 Setting watchdog timer start register Watchdog timer start register [Address 000E WDTS...
Mitsubishi Microcomputers M16C/80 group ct to change. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.13.3 Operation of Watchdog Timer (Reset) The following is an operation of the watchdog timer using reset. Figure 2.13.5 shows the operation timing, and Figure 2.13.6 shows the set-up procedure. Operation (1) Reset is selected when the watchdog timer function select bit is "1".
Page 552
Mitsubishi Microcomputers M16C/80 group ange. Watchdog Timer SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting system clock control register 0 System clock control register 0 [Address 0006 CM0 (Note) Watchdog timer function select bit 1: Reset Note: Set bit 0 of the protect register (address 0000A ) to "1"...
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.14 Address Match Interrupt 2.14.1 Overview The address match interrupt is used for correcting a ROM or for a simplified debugging-purpose monitor. The following is an overview of the address match interrupt. (1) Enabling/disabling the address match interrupt The address match interrupt enable bit can be used to enable and disable an address match interrupt.
Page 554
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (5) Registers related to the address match interrupt Figure 2.14.1 shows the memory map of address match interrupt-related registers, and Figure 2.14.2 shows address match interrupt-related registers. 0009 Address match interrupt enable register (AIER) 000A 000B...
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.14.2 Operation of Address Match Interrupt The following is an operation of address match interrupt. Figure 2.14.3 shows the set-up procedure of address match interrupt, and Figure 2.14.4 shows the overview of the address match interrupt handling routine.
Page 556
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Explanation: [1] Storing the register Address match interrupt routine Storing the contents of the registers holding the main program status to be kept. [2] Determining the interrupt address [1] Storing registers Determining which factor generated the interrupt.
Page 557
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Precaution of address match interrupt Do not set the following addresses to the address match interrupt register. 1. The address of the starting instruction in an interrupt routine. 2.
Page 558
Mitsubishi Microcomputers M16C/80 group change. Address Match Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Additional process ; Execute after the register reset instruction (popm instruction) fclr ; Select ISP (Unnecessary if the ISP has been selected) pushm R0 ; Store R0 register mov.w 6[SP],R0 ;...
Mitsubishi Microcomputers M16C/80 group subject to change. Key-Input Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.15 Key-Input Interrupt 2.15.1 Overview Key-input interrupt occurs when a falling edge is input to P10 through P10 . The following is an overview of the key-input interrupt: (1) Enabling/disabling the key-input interrupt The key-input interrupt can be enabled and disabled using the key-input interrupt register.
Page 560
Mitsubishi Microcomputers M16C/80 group to change. Key-Input Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupt control register Symbol Address When reset KUPIC 0093 XXXXX000 Bit symbol Bit name Function Interrupt priority level ILVL0 b2 b1 b0 select bit 0 0 0 : Level 0 (interrupt disabled) 0 0 1 : Level 1 0 1 0 : Level 2 ILVL1...
Page 561
Mitsubishi Microcomputers M16C/80 group subject to change. Key-Input Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register C Symbol Address When reset 03AF 0XXXXXX0 Bit name Function Bit symbol PSC_0 Port P7 peripheral subfunction 0 : CLK2 output (Note 1) select bit (Enabled when PS1_2 = 1 : V phase output 1 and PSL1_2 = 0) Nothing is assigned.
Mitsubishi Microcomputers M16C/80 group to change. Key-Input Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.15.2 Operation of Key-Input Interrupt The following is an operation of key-input interrupt. Figure 2.15.4 shows an example of a circuit that uses the key-input interrupt, Figure 2.15.5 shows an example of operation of key-input interrupt, and Figure 2.15.6 shows the setting procedure of key-input interrupt.
Page 563
Mitsubishi Microcomputers M16C/80 group subject to change. Key-Input Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting port P10 direction register Port P10 direction register [Address 03CA PD10 0 : Input mode (Functions as an input port) 1 : Output mode (Functions as an output port) Setting pull-up control register 3 Pull-up control register 3 [Address 03DB PUR3...
Mitsubishi Microcomputers M16C/80 group t to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.16 Power Control 2.16.1 Overview ‘The following is an overview of the power control. (1) Modes Power control is available in three modes. (a) Normal operation mode •...
Page 565
Mitsubishi Microcomputers M16C/80 group bject to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Transition of stop mode, wait mode Reset WAIT CPU operation stopped All oscillators stopped instruction CM10=“1” Medium-speed mode Stop mode Wait mode (Divided-by-8 mode) Interrupt Interrupt Note 1 CPU operation stopped WAIT Interrupt...
Page 566
Mitsubishi Microcomputers M16C/80 group t to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (3) Clearing stop mode and wait mode The stop mode and wait mode can be cleared by generating an interrupt request, or by resetting hardware. Set the priority level of the interrupt to be used for clearing, higher than both the processor interrupt priority level (IPL) and the interrupt priority set bit for exiting Stop/Wait state, and enable the interrupt enable flag (I flag).
Page 567
Mitsubishi Microcomputers M16C/80 group bject to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (5) Sequence of returning from stop mode Sequence of returning from stop mode is oscillation start-up time and interrupt sequence. When interrupt is generated in stop mode, CM10 becomes “0” and clearing stop mode. Starting oscillation and supplying BCLK execute the interrupt sequence as follow: In the interrupt sequence, the processor carries out the following in sequence given: (a) CPU gets the interrupt information (the interrupt number and interrupt request level) by read-...
Page 568
Mitsubishi Microcomputers M16C/80 group t to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER System clock control register 0 (Note 1) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset 0006 Bit symbol Function name b1 b0 Clock output function CM00 0 0 : I/O port P5 select bit (Note 2)
Page 569
Mitsubishi Microcomputers M16C/80 group bject to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Main clock division register (Note 1) Symbol Address When reset 000C XXX01000 Bit symbol Bit name Function b4 b3 b2 b1 b0 Main clock division select MCD0 1 0 0 1 0 : No division mode bit (Note 2) 0 0 0 1 0 : Division by 2 mode...
Mitsubishi Microcomputers M16C/80 group t to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.16.2 Stop Mode Set-Up Settings and operation for entering stop mode are described here. Operation (1) Enables the interrupt used for returning from stop mode. Set the interrupt priority level select bit higher than both the processor interrupt priority level (IPL) and the interrupt priority set bit for exiting Stop/Wait state.
Mitsubishi Microcomputers M16C/80 group bject to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.16.3 Wait Mode Set-Up Settings and operation for entering wait mode are described here. Operation (1) Enables the interrupt used for returning from wait mode. Set the interrupt priority level select bit higher than both the processor interrupt priority level (IPL) and the interrupt priority set bit for exiting Stop/Wait state.
Mitsubishi Microcomputers M16C/80 group t to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.16.4 Precautions in Power Control ____________ (1) When returning from stop mode by hardware reset, RESET pin must be set to “L” level until main clock oscillation is stabilized. (2) When switching to either wait mode or stop mode, instructions either from the WAIT instruc- tion or from the instruction that sets the all clock stop control bit to “1”...
Page 573
Mitsubishi Microcomputers M16C/80 group bject to change. Power Control SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (g) Ports P9 and P9 input peripheral function disable When ANEX and ANEX are used, select the input peripheral function disable with port P9 and P9 input peripheral function select bit of the function select register B3. When the input peripheral func- tion disable is selected, the port cannot be input even if the port direction register is set to input (the input result becomes undefined).
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 2.17 Programmable I/O Ports 2.17.1 Overview There are 87 programmable I/O ports for 100-pin version and 123 ports for 144-pin version, and one input-only port.
Page 575
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (6) Port P1 output select Port P1 can be set to either a CMOS port or an N-channel open drain with the port control register. In the N-channel open drain, the port P1 has no function that a complete open drain but keeps the CMOS port's N-channel always turned off.
Page 576
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (8) Examples of working on non-used pins Tables 2.17.2 and 2.17. 3 contain examples of working on non-used pins. There are shown here for mere examples.
Page 577
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (9) Registers related to the programmable I/O ports Figure 2.17.1 shows the memory map of programmable I/O ports-related registers, and Figures 2.17.2 to 2.17.12 show programmable I/O ports-related registers.
Page 578
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Port Pi direction register (Note 1,2, 3) Symbol Address When reset PDi (i = 0 to 15, 03E2 , 03E3 , 03E6 , 03E7 except 8, 11 and 14)
Page 579
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Port P11 direction register (Note) Symbol Address When reset b7 b6 b5 b4 b3 b2 b1 b0 PD11 03CB XXX00000 Bit symbol Bit name Function PD11_0...
Page 580
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Port Pi register (Note 1, 3) Symbol Address When reset Pi (i = 0 to 15, 03E0 , 03E1 , 03E4 , 03E5 Indeterminate b7 b6 b5 b4 b3 b2 b1 b0...
Page 581
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Port P11 register (Note) Symbol Address When reset b7 b6 b5 b4 b3 b2 b1 b0 03C9 Indeterminate Bit symbol Bit name Function P11_0 Port P11...
Page 582
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Pull-up control register 0 (Note) b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PUR0 03F0 Bit symbol Bit name Function PU00...
Page 583
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 100-pin version Pull-up control register 3 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PUR3 03DB Bit symbol Bit name Function PU30...
Page 584
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register A0 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset 03B0 0X000X00 Bit name Function Bit symbol PS0_0...
Page 585
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register A2 Symbol Address When reset 03B4 XXXXXX00 Bit name Function Bit symbol PS2_0 Port P8 function select bit 0 : I/O port 1 : Peripheral function output (PSL2_0 enabled)
Page 586
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register B0 Symbol Address When reset PSL0 03B2 XXX0XXXX Bit name Function Bit symbol Nothing is assigned. When write, set "0". When read, the content is indeterminate. 0 : RTS1 output PSL0_4 Port P6...
Page 587
REV.D Mitsubishi Microcomputers M16C/80 group l are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register B2 b7 b6 b5 b4 b3 b2 b1 b0 Symbol Address When reset PSL2 03B6 XXXXXXX0 Bit symbol Bit name Function PSL2_0...
Page 588
tions REV.D Mitsubishi Microcomputers M16C/80 group manual are tentative and subject to change. Programmable I/O Ports SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Function select register C Symbol Address When reset 03AF 0XXXXXX0 Bit name Function Bit symbol PSC_0 Port P7 peripheral subfunction 0 : CLK2 output (Note 1) select bit (Enabled when PS1_2 =...
Chapter 3 Examples of Peripheral functions Applications...
Page 590
Mitsubishi Microcomputers M16C/80 group ange. Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER This chapter presents applications in which peripheral functions built in the M16C/80 are used. They are shown here as examples. In practical use, make suitable changes and perform sufficient evaluation. For basic use, see Chapter 2 How to Use Peripheral Functions.
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.1 Long-Period Timers Overview In this process, Timer A0 and Timer A1 are connected to make a 16-bit timer with a 16-bit prescaler. Figure 3.1.1 shows the operation timing, Figure 3.1.2 shows the connection dia- gram, and Figures 3.1.3 and 3.1.4 show the set-up procedure.
Page 592
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Used for timer mode Timer A0 Timer A0 interrupt request bit Timer A1 interrupt request bit Timer A1 Used for event counter mode Figure 3.1.2. Connection diagram of long-period timers...
Page 593
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting timer A0 Selecting timer mode and functions Timer A0 mode register [Address 0356 TA0MR Selection of timer mode Gate function select bit b4 b3 0 0 : Gate function not available (TA0 pin is a normal port pin) 0 (Must always be “0”...
Page 594
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting trigger select register Trigger select register [Address 0343 TRGSR Timer A1 event/trigger select bit b1 b0 1 0 : TA0 overflow is selected Setting divide ratio (b15) (b8)
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.2 Variable-Period Variable-Duty PWM Output Overview In this process, Timer A0 and A1 are used to generate variable-period, variable-duty PWM out- put. Figure 3.2.1 shows the operation timing, Figure 3.2.2 shows the connection diagram, and Figures 3.2.3 and 3.2.4 show the set-up procedure.
Page 596
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER l = reload register content (1) Timer A0 start count FFFF (2) Timer A0 underflow 0000 n = reload register content Time (3) Timer A1 start count FFFF (4) Timer A1 stop count 0001 Set to “1”...
Page 597
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Setting timer A0 Selecting timer mode and functions Timer A0 mode register [Address 0356 TA0MR Selection of timer mode Gate function select bit b4 b3 0 0 : Gate function not available (TA0 pin is a normal port pin) 0 (Must always be “0”...
Page 598
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting trigger select register Trigger select register [Address 0343 TRGSR Timer A1 event/trigger select bit b1 b0 1 0 : TA0 overflow is selected Setting one-shot timer's time (b15) (b8)
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.3 Delayed One-Shot Output Overview The following are steps of outputting a pulse only once after a specified elapse since an external trigger is input. Figure 3.3.1 shows the operation timing, Figure 3.3.2 shows the connection dia- gram, and Figures 3.3.3 and 3.3.4 show the set-up procedure.
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.4 Buzzer Output The timer mode is used to make the buzzer ring. Figure 3.4.1 shows the operation timing, and Overview Figure 3.4.2 shows the set-up procedure. Use the following peripheral function: •...
Page 605
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Initialization of timer A1 Timer A1 mode register TA1MR [Address 0357 Selection of timer mode Gate function select bit b4 b3 0 0 : Gate function not available (TA0 pin is a normal port pin) 0 (Must always be “0”...
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.5 Solution for External Interrupt Pins Shortage Overview The following are solution for external interrupt pins shortage. Figure 3.5.1 shows the set-up procedure. Use the following peripheral function: •...
Page 607
Mitsubishi Microcomputers M16C/80 group ange. Timer A Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Initialization of timer A0 Timer A0 mode register TA0MR [Address 0356 Selection of event counter mode Count polarity select bit 0 : Counts external signal's falling edge Up/down switching cause select bit 0 : Up/down flag's content 0 (Must always be “0”...
Mitsubishi Microcomputers M16C/80 group ange. DMAC Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.6 Memory to Memory DMA Transfer Overview The following are steps for changing both source address and destination address to transfer data from memory to another. The DMA transfer utilizes the workings that assign a higher trans- fer priority to the DMA that has the highest priority if transfer requests simultaneously occur in two DMA channels.
Page 609
Mitsubishi Microcomputers M16C/80 group ange. DMAC Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Source area Destination area A0000 A000 content C0000 A001 content A002 content Temporary RAM A007F C007F A007F content Data transfer by DMA0 Data transfer by DMA1 Figure 3.6.2. Block diagram of memory to memory DMA transfer...
Page 610
Mitsubishi Microcomputers M16C/80 group ange. DMAC Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Initialization of DMA0 DMA0 request cause select register DM0SL [Address 0378 DMA request cause select bit 0 0 0 1 1 : Timer A0 Software DMA request bit 0 : Software trigger is not generated DMA request bit Must write "1"...
Page 611
Mitsubishi Microcomputers M16C/80 group ange. DMAC Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Setting DMA mode register DMA mode register 0 DMD0 [CPU internal memory ] Channel 0 transfer mode select bit 1 1 : Repeat transfer Channel 0 transfer unit select bit 0 : 8 bits Channel 0 transfer direction select bit...
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.7 Controlling Power Using Stop Mode Overview The following are steps for controlling power using stop mode. Figure 3.7.1 shows the operation timing, Figure 3.7.2 shows an example of circuit, and Figures 3.7.3 and 3.7.4 show the set-up procedure.
Page 613
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER I/O port / KI / KI / KI / KI Figure 3.7.2. Example of circuit of controling power using stop mode...
Page 614
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Main Initial condition Port P10 direction register Pull-up control register 3 [Address 03CA [Address 03DB PD10 PUR3 Key scan output port to P10 pulled high Key scan input port Port P10 register [Address 03C8 Key input interrupt control register...
Page 615
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Key-input interrupt Store the registers Key matrix scan Port P10 register [Address 03C8 Key scan data 1110, 1101, 1011, 0111 Decision of key-input data Port P10 register [Address 03C8 Key scan data Restore the registers REIT instruction...
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.8 Controling Power Using Wait Mode Overview The following are steps for controling power using wait mode. Figure 3.8.1 shows the operation timing, and Figures 3.8.2 to 3.8.4 show the set-up procedure. Use the following peripheral functions: •...
Page 617
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Main Initial condition Protect register [Address 000A PRCR Write-enabled System clock control register 0 [Address 0006 WAIT peripheral function clock stop bit drive capacity select bit COUT Port Xc select bit 1 : Functions as X oscillator COUT...
Page 618
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Canceling protect Protect register [Address 000A PRCR Enables writing to system clock control registers (address 0006 and 0007 Switching system clock System clock control register 0 [Address 0006 System clock select bit Be sure that the sub-clock oscillation has stabilized 1 : X...
Page 619
Mitsubishi Microcomputers M16C/80 group ange. Controlling Power Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER INT0 interrupt Timer B2 interrupt Store the registers Store the registers [F_WIT] = 0 Counting clock Restore the registers Restore the registers REIT instruction REIT instruction Figure 3.8.4. Set-up procedure of controlling power using wait mode (3)
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.9 How to enlarge figures using the X-Y converter Overview The following are steps for enlarging a 16 x 16 bit matrix figure twice its size, using the X-Y converter.
Page 621
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Start enlargement Rotate 90° to the left Setting X-Y control register X-Y control register [Address 02E0 Read-mode set bit 0: Data conversion Write-mode set bit 0: No bit mapping conversion Writing Xi register (i=0 to 15) Xi register [Address 02C0 to 02DE...
Page 622
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Rotate the buffer 90° to the the right. Setting X-Y control register X-Y control register [Address 02E0 Read-mode set bit 0: Data conversion Write-mode set bit 1: Bit mapping conversion Writing Xi register (i=0 to 15)
Page 623
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Save the rotated data in the buffer Read the converted (90˚ right-rotated) data from the Yi register and save it in the 32 x 16 bit buffer as shown below.
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 3.10 How to reduce figures using the X-Y converter Overview The following are steps for reducing a 32 x 32 bit matrix figure in half, using the X-Y converter. Figures 3.10.2 to 3.10.4 show the set-up procedure.
Page 625
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Start reducing Reduce the figure in half in the vertical direction This figure is reduced in half in the vertical direction by saving the 32 x 32 bit matrix data in the 32 x 16 bit buffer as shown below.
Page 626
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Rotate the data 90° to the left Setting X-Y control register X-Y control register [Address 02E0 Read-mode set bit 0: Data conversion Write-mode set bit 0: No bit mapping conversion Writing Xi register (i=0 to 15) Xi register [Address 02C0...
Page 627
Mitsubishi Microcomputers M16C/80 group ange. X-Y Converter Applications SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Continued from the previous page Rotate 90° to the right Setting X-Y control register X-Y control register [Address 02E0 Read-mode set bit 0: Data conversion Write-mode set bit 1: Bit mapping conversion Writing Xi register (i=0 to 15) Xi register [Address 02C0...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.1.2 Software Interrupts A software interrupt occurs when executing certain instructions. Software interrupts are non-maskable interrupts. • Undefined instruction interrupt An undefined instruction interrupt occurs when executing the UND instruction. •...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.1.3 Hardware Interrupts Hardware interrupts are classified into two types — special interrupts and peripheral I/O interrupts. (1) Special interrupts Special interrupts are nonmaskable interrupts. • Reset ____________ A reset occurs when the RESET pin is pulled low. ______ •...
Page 633
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (3) High-speed interrupts High-speed interrupts are interrupts in which the response is executed at 5 cycles and the return is 3 cycles. When a high-speed interrupt is received, the flag register (FLG) and program counter (PC) are saved to the save flag register (SVF) and save PC register (SVP) and the program is executed from the address shown in the vector register (VCT).
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.1.4 Interrupts and Interrupt Vector Tables If an interrupt request is accepted, a program branches to the interrupt routine set in the interrupt vector table. Set the first address of the interrupt routine in each vector table. Interrupt vector tables are available as follows: fixed vector table in which addresses are fixed, variable vector table in which addresses can be varied by the setting, high-speed interrupt vector register (VCT) and vector table dedicated for emulator.
Page 635
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER • Variable vector tables The addresses in the variable vector table can be modified, according to the user’s settings. Indicate the first address using the interrupt table register (INTB). The 256-byte area subsequent to the ad- dress the INTB indicates becomes the area for the variable vector tables.
Page 636
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER • Vector register (VCT) The vector register is vector table dedicated for high-speed interrupts. Set the vectors used for high- speed interrupts. As the vector register is located in CPU, use LDC instruction when setting. •...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.2 Interrupt Control Descriptions are given here regarding how to enable or disable maskable interrupts and how to set the priority to be accepted. What is described here does not apply to non-maskable interrupts. Enable or disable a non-maskable interrupt using the interrupt enable flag (I flag), interrupt priority level selection bit, or processor interrupt priority level (IPL).
Page 638
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Interrupt control register Symbol Address When reset ADIC 0073 XXXXX000 BCNiIC(i=2 to 4) 008F , 0071 , 0091 XXXXX000 DMiIC(i=0 to 3) 0068 , 0088 , 006A , 008A XXXXX000 KUPIC 0093 XXXXX000...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.2.1 Interrupt Enable Flag (I Flag) The interrupt enable flag (I flag) controls the enabling and disabling of maskable interrupts. Setting this flag to “1” enables all maskable interrupts; setting it to “0” disables all maskable interrupts. This flag is set to “0”...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.2.3 Interrupt Priority Level Select Bit and Processor Interrupt Priority Level (IPL) Set the interrupt priority level using the interrupt priority level select bit, which is one of the component bits of the interrupt control register.
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.2.4 Rewrite the interrupt control register When a instruction to rewrite the interrupt control register is executed but the interrupt is disabled, the interrupt request bit is not set sometimes even if the interrupt request for that register has been gener- ated.
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.3 Interrupt Sequence An interrupt sequence — what are performed over a period from the instant an interrupt is accepted to the instant the interrupt routine is executed — is described here. If an interrupt occurs during execution of an instruction, the processor determines its priority when the execution of the instruction is completed, and transfers control to the interrupt sequence from the next cycle.
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.3.1 Interrupt Response Time 'Interrupt response time' is the period between the instant an interrupt occurs and the instant the first instruction within the interrupt routine has been executed. This time comprises the period from the occurrence of an interrupt to the completion of the instruction under execution at that moment (a) and the time required for executing the interrupt sequence (b).
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 4.3.1. Time required for executing the interrupt sequence Interrupt Interrupt vector address 16 bits data bus 8 bits data bus Peripheral I/O Even address 14 cycles 16 cycles Odd address (Note 2) 16 cycles 16 cycles INT instruction...
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.3.3 Saving Registers In an interrupt sequence, only the contents of the flag register (FLG) and program counter (PC) are saved to the stack area. The order in which these contents are saved is as follows: First, the FLG register is saved to the stack area.
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.4 Returning from an Interrupt Routine As you execute the REIT instruction at the end of the interrupt routine, the contents of the flag register (FLG) and program counter (PC) that have been saved to the stack area immediately preceding the inter- rupt sequence are automatically restored.
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 4.7 Precautions for Interrupts (1) Reading addresses 000000 and 000002 • When maskable interrupt is occurred, CPU read the interrupt information (the interrupt number and interrupt request level) in the interrupt sequence from address 000000 .
Page 650
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Set the interrupt priority level to level 0 (Disable interrupt) Set the polarity select bit Clear the interrupt request bit to “0” Set the interrupt priority level to level 1 to 7 (Enable the accepting of INT interrupt request) ______ Figure 4.7.1.
Page 651
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example 2) Interrupt priority level is 1 or higher mov.b #0,TA0IC ;Change TA0 interrupt priority level to a smaller value ; 1st instruction ; 2nd instruction ; 3rd instruction Do not set address match interrupt during this period ;...
Page 652
Mitsubishi Microcomputers M16C/80 group ange. Interrupt SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Example 5) If rewriting the interrupt control register for interrupt B with the interrupt A routine and enabling multiple interrupts with interrupt C, the above processing is required at the end of the interrupt A and interrupt C routines.
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.1 Overview of External Buses Memory and I/O external expansion can be connected to microcomputer easily by using external buses. When memory expansion mode or microprocessor mode is selected for processor mode, some of the pins function as the address bus, the data bus, and as control signals and this makes the external buses be able to operate.
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.2 Data Access 5.2.1 Data Bus Width If the data bus width bits in all areas of the external data bus width control register are “0”, the data bus width becomes 8 bits, and P1 ) through P1 ) can be used as I/O ports (Figure 5.2.1).
Page 656
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.2.2 Chip Selects and Address Bus _______ _______ _______ Chip selects (P4 /CS3 through P4 /CS0) share A to A and A . Use bits 0 and 1 of the processor mode register 1 (address 0005 ) to set the external area mode, then select the chip select area and number of address outputs.
Page 657
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.2.3 Bus Types The M16C/80 Group has two types of buses: a separate bus where separate pins are used for address output and data input/output and a multiplexed bus where pins are time- multiplexed and switched be- tween address output and data input/output to save the number of pins used.
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.3 External Memory Area Mode Here follows the description of the external memory area mode. (1) Mode 0 • • • P4 to P4 to A _______ _______ (2) Mode 1 • • • P4 , P4 to P4 :CS2 to CS0...
Page 659
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.3.1 Mode 0 In mode 0, a maximum 16 Mbyte of memory space can be accessed in memory expansion and micropro- cessor modes. Programs and data can be located in any external area. Mode 0 (PM11, PM10 = 0, 0) Memory expansion Microprocessor...
Page 660
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.3.2 Mode 1 In mode 1, the external area can be split into four and used as chip select signals and can be connected with DRAM. Mode 1 (PM11, PM10 = 0, 1) Memory expansion Microprocessor mode...
Page 661
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.3.3 Mode 2 In mode 2, the external area can be split into three and used as chip select signals and can be connected with DRAM. Mode 2 (PM11, PM10 = 1, 0) Memory expansion Microprocessor mode...
Page 662
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.3.4 Mode 3 In mode 3, the external area can be split into three and used as chip select signals. Mode 3 (PM11, PM10 = 1, 1) Memory expansion Microprocessor mode mode...
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4 Connection Examples 5.4.1 16-bit Memory to 16-bit Width Data Bus Connection Example Figure 5.4.1 shows an example of connecting M5M51016BTP (16-bit SRAM) to a 16-bit data bus.In this diagram, when reset the microcomputer operates in single-chip mode.
Page 664
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.2 8-bit Memory to 16-bit Width Data Bus Connection Example Figure 5.4.2 shows an example of connecting two M5M5278DP (8-bit SRAM) to a 16-bit data bus.In this diagram, when reset the microcomputer operates in single-chip mode. Change the external area mode to mode 1 through mode 3, the external area 0 data bus width bit to 16-bit bus and the processor mode bit to memory expansion mode in a program.
Page 665
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Figure 5.4.3 shows how to connect two M5M28F101AFP (8-bit flash memory). In 16-bit bus mode, the ______ ______ ______ BHE/WRH pin functions as BHE after reset. When connecting 8-bit flash memory chips to the 16-bit bus, ______ ______ make sure the microcomputer’s WRL pin is connected to the WR pins on both flash memory chips, and...
Page 666
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.3 8-bit Memory to 8-bit Width Data Bus Connection Example Figure 5.4.4 shows an example of connecting two M5M5278DP (8-bit SRAM) to an 8-bit data bus.In this diagram, when reset the microcomputer operates in single-chip mode. Change the external area mode to mode 1 through mode 3 and the processor mode bit to memory expansion mode in a program.
Page 667
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.4 Two 8-bit and 16-Bit Memory to 16-Bit Width Data Bus Connection Example Figure 5.4.5 shows an example of connecting M5M28F102 (16-bit flash memory) and two M5M5278DP (8-bit SRAM) to a 16-bit data bus. In this diagram, when reset the microcomputer operates in micropro- cessor mode.
Page 668
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.5 8-bit Memory to 8-bit Width Data Bus and 16-Bit Memory to 16-Bit Width Data Bus Connection Example Figure 5.4.6 shows an example of connecting M5M28F102 (16-bit flash memory) and M5M5278DP (8-bit SRAM) to a 16-bit data bus and a 8-bit data bus respectively.
Page 669
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.6 Chip Selects and Address Bus When there are insufficient chip select signals, it is necessary to generate chip selects externally. Figure _______ 5.4.7 shows an example of a connection in which the CS1 area is divided into eight 128K byte areas when the external area mode is selected for mode 3.
Page 670
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.4.7 DRAM to 16-bit Width Data Bus Connection Example Figure 5.4.8 shows an example of connecting M5M465160A (64 M-bit DRAM) to a 16-bit data bus. In this diagram, when reset the microcomputer operates in single-chip mode. Change the R/W mode select bit (bit 2 at address 0004 ) to “1”, the external area mode to mode 0 through mode 2, the external area 2 data bus width bit to 16-bit bus and the processor mode bit to memory expansion mode in a program.
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.5 Connectable Memories 5.5.1 Operation Frequency and Access Time Connectable memories depend upon the BCLK frequency f(BCLK). f(BCLK) is contingent on the oscillator's frequency and on the settings in the main clock division register (bits 0 to 4 of address 000C The following are the conditional equations for the connections.
Page 672
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (b) Vcc = 3V • With the Wait option cleared ta(S) < 10 /f(BCLK) – 55(ns)* • With the Wait option selected ta(S) < m X10 /f(BCLK) – 55(ns)* (m=2, 3, and 4 when 1wait, 2 waits and 3 waits, respectively) * 55(ns) = td(BCLK –...
Page 673
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Access time 1000 Without wait With 1 wait With 2 waits With 3 waits OE access time 1000 Without wait With 1 wait With 2 waits With 3 waits Figure 5.5.1.
Page 674
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Data set up time 1000 Without wait With 1 wait With 2 waits With 3 waits Write pulse width 1000 Without wait With 1 wait With 2 waits With 3 waits Figure 5.5.2.
Page 675
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Access time 2000 1945 1800 Without wait With 1 wait With 2 waits 1600 With 3 waits 1445 1400 1278 1200 1000 OE access time 2000 1800 Without wait With 1 wait 1708 With 2 waits...
Page 676
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Data set up time 2000 1800 Without wait With 1 wait With 2 waits 1600 With 3 waits 1460 1400 1200 1000 Write pulse width 2500 Without wait With 1 wait With 2 waits 2000 With 3 waits...
Page 677
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.5.2 Connecting Low-Speed Memory To connect memory with long access time [ta(A)], either decrease the frequency of BCLK or set a soft- ________ ware wait. Using the RDY feature allows you to connect memory having the timing that precludes con- nection though you set software wait.
Page 678
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER In case of M30800MC Memory expansion mode (Mode 2) Memory expansion mode (Mode 2) When, When, PM12="1" PM12="0" PM04, PM05="00" PM04, PM05="00" WCR0, WCR1="00" WCR0, WCR1="00" WCR6, WCR7="11" WCR6, WCR7="11" 000000 000000 BCLK X 2...
Page 680
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER ________ (2) RDY function usage ________ To use the RDY function, set a software wait. ________ ________ The RDY function operates when the BCLK signal falls with the RDY pin at “L”; the bus does not vary for 1 BCLK, and the state at that moment is held.
Page 681
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 5.5.3 Connectable Memories Connectable memories and their maximum frequencies are given here; M16C/80 group maximum frequency is 20MHz(without the wait) for Vcc=5V, 10MHz(with the one wait) for Vcc=3V (1) Flash memories(Read only mode) (a) 3V without wait Maximum Model No.
Page 682
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (2) SRAM (a) 3V without wait Maximum Model No. frequency (MHz) M5M54R08AJ-15 8.06 M5M54R16AJ-15 M5M54R08AJ-12 8.19 M5M54R16AJ-12 M5M54R08AJ-10 8.33 M5M54R16AJ-150 (b) 3V with 1 wait Maximum Model No. frequency (MHz) 10.00 M5M54R08AJ-15 M5M54R16AJ-15...
Page 683
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER (3) DRAM (a) 3V with 1 wait Maximum Model No. frequency (MHz) M5M465800DJ,DTP-6,6S M5M465805DJ,DTP-6,6S 7.14 M5M467800DJ,DTP-6,6S M5M467805DJ,DTP-6,6S M5M465160DJ,DTP-6,6S M5M465165DJ,DTP-6,6S M5M465800DJ,DTP-5,5S M5M465805DJ,DTP-5,5S 7.35 M5M467800DJ,DTP-5,5S M5M467805DJ,DTP-5,5S M5M465160DJ,DTP-5,5S M5M465165DJ,DTP-5,5S (b) 3V with 2 waits Maximum Model No.
Page 684
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER __________ _________ 5.6 Releasing an External Bus (HOLD input and HLDA output) The Hold feature is to relinquish the address bus, the data bus, and the control bus on M16C/80 side in line with the Hold request from the bus master other than M16C/80 when the two or more bus masters share the address bus, the data bus, and the control bus.
Page 685
Mitsubishi Microcomputers M16C/80 group ange. External Buses SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER BCLK HOLD HLDA RD/WR Bus released (1) (2) (3) (4) (5)(6) (7) (1) An “L” level is input to the HOLD pin. (2) HOLD is detected. (3) The CPU releases the bus. (4) An “L”...
Page 688
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER The external ROM version is only for 144-pin version. There is no internal ROM in the external ROM version. Functions of the external ROM version differ from those of the mask ROM version in the following. Therefore, only the differences are described in this chap- ter: For the other functions, refer to chapters 1 to 5.
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 6.2 Pin Description Tables 6.2.1 to 6.2.3 show the pin description. Table 6.2.1. Pin Description (1) Pin name Signal name I/O type Function Power supply Supply 4.2 (2.7) to 5.5 V to the V pin.
Page 691
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER External ROM Table 6.2.2. Pin Description (2) Pin name Signal name I/O type Function to P4 I/O port P4 This is an 8-bit I/O port equivalent to P0. These pins output 8 high-order address bits (A –A ).
Page 692
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Table 6.2.3. Pin Description (3) Pin name Signal name I/O type Function to P11 I/O port P11 II/O This is an 5-bit I/O port equivalent to P6. to P12 I/O port P12 II/O This is an 8-bit I/O port equivalent to P6.
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER External ROM 6.3 Memory Map Figure 6.3.1 shows the memory map. Figures 6.3.2 to 6.3.5 show the SFR memory map. 00000016 SFR area For detail, see Figures 6.3.2 to 6.3.5 000400 Internal Ram area FFFE00 XXXXXX...
Page 694
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 0000 0060 0001 0061 0002 0062 0003 0063 Processor mode register 0 (PM0) 0004 0064 Processor mode register 1(PM1) 0065 0005 System clock control register 0 (CM0) 0006 0066 System clock control register 1 (CM1) 0007 0067...
Page 696
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 0340 Count start flag (TABSR) 0380 A-D register 0 (AD0) 0341 0381 Clock prescaler reset flag (CPSRF) 0342 0382 One-shot start flag (ONSF) A-D register 1 (AD1) 0343 0383 Trigger select register (TRGSR) 0344 Up-down flag (UDF)
Page 697
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER External ROM 03C0 Port P6 (P6) 03C1 Port P7 (P7) 03C2 Port P6 direction register (PD6) 03C3 Port P7 direction register (PD7) 03C4 Port P8 (P8) Port P9 (P9) 03C5 Port P8 direction register (PD8) 03C6 Port P9 direction register (PD9) 03C7...
Mitsubishi Microcomputers M16C/80 group ange. External ROM SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 6.4 Processor Mode The external ROM version is operated in microprocessor mode, so be sure to perform the following: • Connect CNV pin to V Figure 6.4.1 shows the processor mode register 0. Processor mode register 0 (Note 1) Symbol Address...
Mitsubishi Microcomputers M16C/80 group subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 1 Appendix 1 Check Sheet The following check sheet was created based on items which had been the source of problems in the past. We recommend you refer to the check sheet when troubleshooting. Are you making use of Technical News? For the latest copy of Technical News, contact an authorized dealer.
Page 700
Mitsubishi Microcomputers M16C/80 group subject to change. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 1 Does not an interrupt generate between the instruction writing is enabled in the protect register and the instruction writing in the port P9 direction register? Does not instruction DMA transfer occur between the instruction writing is enabled in the protect register and the instruction writing in the port P9 direction register starts? Is writing enabled in the protect register before writing in the function select register A3 (address 03B5...
Mitsubishi Microcomputers M16C/80 group ange. Appendix 3 SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 3 A practical example of connecting to the reset IC M62015 and M62016 are reset ICs compatible with the M16C's backup mode. Here follow these ICs' overview and characteristics together with an example of connecting to the M16C when Vcc = 3 V. •...
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 4 Appendix 4 Countermeasures against noise Countermeasures against noise are described below. The following countermeasures are generally effec- tive as countermeasures against noise, however, it is necessary not only to take measures as follows but to evaluate before actual use.
Page 705
Mitsubishi Microcomputers M16C/80 group ange. Appendix 4 SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 1.1.3 Wiring for clock input/output pins • Make the length of wiring which is connected to clock I/O pins as short as possible. • Make the length of wiring (within 20 mm) across the grounding lead of a capacitor which is connected to an oscillator and the V pin of a microcomputer as short as possible.
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 4 1.2 Connection of bypass capacitor across Vss line and VCC line Connect an approximately 0.1 µ F bypass capacitor across the Vss line and the Vcc line as follows: •...
Page 707
Mitsubishi Microcomputers M16C/80 group ange. Appendix 4 SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 1.4 Oscillator concerns Take care to prevent an oscillator that generates clocks for a microcomputer operation from being affected by other signals. 1.4.1 Keeping oscillator away from large current signal lines Install a microcomputer (and especially an oscillator) as far as possible from signal lines where a current larger than the tolerance of current value flows.
Mitsubishi Microcomputers M16C/80 group ange. SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER Appendix 4 1.4.3 Oscillator protection using Vss pattern As for a two-sided printed circuit board, print a V pattern on the underside (soldering side) of the position (on the component side) where an oscillator is mounted. Connect the V pattern to the microcomputer V pin with the shortest possible wiring.
Mitsubishi Microcomputers M16C/80 group ange. Appendix 4 SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER 1.6 Providing of watchdog timer function by software If a microcomputer runs away because of noise or others, it can be detected by a software watchdog timer and the microcomputer can be reset to normal operation. This is equal to or more effective than program runaway detection by a hardware watchdog timer.
Need help?
Do you have a question about the M16C/80 Series and is the answer not in the manual?
Questions and answers