Page 3
Reset operation must be executed immediately after power-on for devices having reset function. FIP and IEBus are trademarks of NEC Electronics Corporation. MS-DOS, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Page 4
NEC Electronics does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of NEC Electronics products listed in this document or any other liability arising from the use of such products. No license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of NEC Electronics or others.
Page 5
Regional Information Some information contained in this document may vary from country to country. Before using any NEC Electronics product in your application, pIease contact the NEC Electronics office in your country to obtain a list of authorized representatives and distributors. They will verify: •...
Page 6
Major Revisions in This Edition Page Description Throughout Addition of the following products to target products • µ PD780204A • µ PD780205A Deletion of the following package from target products • µ PD78P0208KL-T (100-pin ceramic WQFN) CHAPTER 1 OUTLINE p.29 •...
INTRODUCTION Readers This manual has been prepared for user engineers who wish to understand the functions of the µ PD780208 Subseries and design and develop its application systems and programs. Purpose This manual is intended to give users an understanding of the functions described in the Organization below.
Page 8
Related Documents The related documents indicated in this publication may include preliminary versions. However, preliminary versions are not marked as such. Documents Related to Devices Document Name Document No. µ PD780204, 780205, 780206, 780208 Data Sheet U10436E µ PD78P0208 Data Sheet U11295E µ...
Page 9
Document No. SEMICONDUCTOR SELECTION GUIDE - Products and Packages - X13769X Semiconductor Device Mount Manual Note Quality Grades on NEC Semiconductor Devices C11531E NEC Semiconductor Device Reliability/Quality Control System C10983E Guide to Prevent Damage for Semiconductor Devices by Electrostatic Discharge (ESD) C11892E Note See the “Semiconductor Device Mount Manual”...
Page 12
5.4.3 Divider ............................113 5.4.4 When subsystem clock is not used ..................113 Clock Generator Operations ..................... 114 5.5.1 Main system clock operations ....................115 5.5.2 Subsystem clock operations ....................116 Changing System Clock and CPU Clock Settings ............117 5.6.1 Time required for switchover between system clock and CPU clock ........
Page 14
15.7 Key Scan Flag and Key Scan Data .................. 314 15.7.1 Key scan flag ........................... 314 15.7.2 Key scan data .......................... 314 15.8 Light Leakage of VFD ......................315 15.9 Display Examples ....................... 317 15.9.1 Segment type (display mode 1: DSPM05 = 0) ..............318 15.9.2 Dot type (display mode 1: DSPM05 = 0) ................
Page 15
CHAPTER 20 INSTRUCTION SET ....................... 383 20.1 Conventions ........................384 20.1.1 Operand identifiers and description methods ................ 384 20.1.2 Description of “operation” column ..................385 20.1.3 Description of “flag operation” column ................... 385 20.2 Operation List ........................386 20.3 Instructions Listed by Addressing Type ................. 394 APPENDIX A DIFFERENCES BETWEEN µ...
Page 16
LIST OF FIGURES (1/6) Figure No. Title Page Pin I/O Circuits ..........................Memory Map ( µ PD780204 and µ PD780204A) ................Memory Map ( µ PD780205 and µ PD780205A) ................Memory Map ( µ PD780206) ......................Memory Map ( µ PD780208) ......................Memory Map ( µ...
Page 17
LIST OF FIGURES (2/6) Figure No. Title Page Block Diagram of 16-Bit Timer/Event Counter (Timer Mode) ............123 Block Diagram of 16-Bit Timer/Event Counter (PWM Mode) ............124 Block Diagram of 16-Bit Timer/Event Counter Output Controller ..........125 Format of Timer Clock Select Register 0 ..................128 Format of 16-Bit Timer Mode Control Register ................
Page 18
LIST OF FIGURES (3/6) Figure No. Title Page Watch Timer Block Diagram ......................170 Format of Timer Clock Select Register 2 ..................171 Format of Watch Timer Mode Control Register ................172 Watchdog Timer Block Diagram ..................... 176 Format of Timer Clock Select Register 2 ..................178 Format of Watchdog Timer Mode Register ..................
Page 19
LIST OF FIGURES (4/6) Figure No. Title Page 13-16 Data ..............................229 13-17 Acknowledge Signal ........................230 13-18 BUSY and READY Signals ......................231 13-19 RELT, CMDT, RELD, and CMDD Operations (Master) ..............236 13-20 RELD and CMDD Operations (Slave) .................... 236 13-21 ACKT Operation ..........................
Page 20
LIST OF FIGURES (5/6) Figure No. Title Page 15-1 VFD Controller Operation Timing in Display Mode 1 (DSPM05 = 0) ........... 300 15-2 VFD Controller/Driver Block Diagram .................... 302 15-3 Format of Display Mode Register 0 ....................305 15-4 Format of Display Mode Register 1 ....................307 15-5 Format of Display Mode Register 2 ....................
Page 21
LIST OF FIGURES (6/6) Figure No. Title Page 16-12 Interrupt Request Acknowledge Processing Algorithm ..............351 16-13 Interrupt Request Acknowledgment Timing (Minimum Time) ............352 16-14 Interrupt Request Acknowledgment Timing (Maximum Time) ............352 16-15 Multiple Interrupt Servicing Example ....................354 16-16 Interrupt Request Hold ........................
Page 22
LIST OF TABLES (1/2) Table No. Title Page Mask Options in Mask ROM Versions ................... Types of Pin I/O Circuits ......................... Internal ROM Capacity ........................Vector Table ............................ Special-Function Register List ......................Port Functions ..........................Port Configuration ........................... Port Mode Register and Output Latch Setting When Alternate Function Is Used ...... Comparison Between Mask Option of Mask ROM Version and µ...
Page 23
LIST OF TABLES (2/2) Table No. Title Page Interval Timer Interval Time ......................181 10-1 Clock Output Controller Configuration ................... 183 11-1 Buzzer Output Controller Configuration ..................186 12-1 A/D Converter Configuration ......................190 13-1 Differences Between Channels 0 and 1 ..................205 13-2 Modes of Serial Interface Channel 0 ....................
CHAPTER 1 OUTLINE 1.2 Applications Compact home stereo sets, cassette decks, tuners, CD players, VCRs, etc. 1.3 Ordering Information Part Number Package Internal ROM µ PD780204GF-xxx-3BA 100-pin plastic QFP (14 x 20) Mask ROM µ PD780204AGF-xxx-3BA 100-pin plastic QFP (14 x 20) Mask ROM µ...
Page 27
CHAPTER 1 OUTLINE ANI0 to ANI7: Analog input P110 to P117: Port 11 Analog power supply P120 to P127: Port 12 Analog reference voltage PCL: Programmable clock Analog ground RESET: Reset BUSY: Busy SB0, SB1: Serial bus BUZ: Buzzer clock SCK0, SCK1: Serial clock FIP0 to FIP52:...
Page 28
CHAPTER 1 OUTLINE (2) PROM programming mode • 100-pin plastic QFP (14 x 20) µ PD78P0208GF-3BA RESET Open Open Cautions 1. (L): Connect independently to V via a pull-down resistor. 2. (D): Connect via a driver. 3. V Connect to ground. 4.
CHAPTER 1 OUTLINE 1.6 78K/0 Series Lineup The 78K/0 Series product lineup is illustrated below. The part numbers in boxes indicate subseries names. Products in mass production Products under development Y subseries products are compatible with I C bus. Control µ...
Page 30
CHAPTER 1 OUTLINE The following lists the main functional differences between subseries products. • Non-Y subseries Function Timer 8-Bit 10-Bit 8-Bit Serial Interface External Capacity MIN. (Bytes) 8-Bit 16-Bit Watch WDT A/D Expansion Subseries Name Value µ √ Control PD78075B 32 K to 40 K 4 ch 1 ch 1 ch 1 ch 8 ch –...
CHAPTER 2 PIN FUNCTIONS 2.1 Pin Function List 2.1.1 Normal operating mode pins (1) Port pins (1/2) After Alternate Pin Name Function Reset Function Port 0. Input Input only Input INTP0/TI0 5-bit I/O port. Input/output can be specified in 1-bit units. Input INTP1 If used as an input port, use of an on-chip...
Page 35
CHAPTER 2 PIN FUNCTIONS (1) Port pins (2/2) After Alternate Pin Name Function Reset Function P70 to P74 Port 7. Input — N-ch open-drain 5-bit I/O port. LEDs can be driven directly. Input/output can be specified in 1-bit units. In mask ROM versions, use of an on-chip pull-up resistor can be specified in 1-bit units with the mask option.
Page 36
CHAPTER 2 PIN FUNCTIONS (2) Non-port pins (1/2) After Alternate Pin Name Function Reset Function External interrupt request inputs for which the valid edges (rising INTP0 Input Input P00/TI0 edge, falling edge, or both rising and falling edges) can be INTP1 specified.
CHAPTER 2 PIN FUNCTIONS 2.2 Description of Pin Functions 2.2.1 P00 to P04 (Port 0) These pins constitute a 5-bit I/O port. Besides serving as I/O port pins, they function as external interrupt request inputs, an external count clock input to the timer, a capture trigger signal input, and crystal resonator connection for subsystem clock oscillation.
Serial interface serial data I/O pins (b) SCK0 and SCK1 Serial interface serial clock I/O pins (c) SB0 and SB1 NEC Electronics standard serial bus interface I/O pins (d) BUSY Serial interface automatic transmit/receive busy input pin (e) STB Serial interface automatic transmit/receive strobe output pin Caution If port 2 is used as serial interface pins, the I/O and output latches must be set according to the function.
CHAPTER 2 PIN FUNCTIONS (2) Control mode P30 to P37 function as timer I/O, clock output, and buzzer output pins. (a) TI1 and TI2 Pins for external count clock input to the 8-bit timer/event counter. (b) TO0 to TO2 Timer output pins (c) PCL Clock output pin (d) BUZ...
CHAPTER 2 PIN FUNCTIONS 2.2.8 P100 to P107 (Port 10) These pins constitute an 8-bit I/O port. Besides serving as I/O port pins, they function as display outputs for the VFD controller/driver. Port 10 can drive LEDs directly. The following operating modes can be specified in 1-bit units. (1) Port mode P100 to P107 function as an 8-bit I/O port.
CHAPTER 2 PIN FUNCTIONS 2.2.12 V LOAD This is the pull-down resistor connection pin of the VFD controller/driver. 2.2.13 AV The A/D converter’s reference voltage should be input from this pin. 2.2.14 AV This pin supplies power for A/D converter operations. Always make this pin the same potential as the V pin even if the A/D converter is not used.
CHAPTER 2 PIN FUNCTIONS 2.3 Pin I/O Circuits and Recommended Connection of Unused Pins Table 2-1 shows the I/O circuit types of pins and the recommended connections of unused pins. Refer to Figure 2-1 for the configuration of the I/O circuit of each type. Table 2-1.
Page 44
CHAPTER 2 PIN FUNCTIONS Table 2-1. Types of Pin I/O Circuits (2/2) Pin Name Recommended Connection of Unused Pins Circuit Type µ PD78P0208 P30/TO0 Input: Independently connect to V or V via a resistor. Output: Leave open. P31/TO1 P32/TO2 P33/TI1 P34/TI2 P35/PCL P36/BUZ...
CHAPTER 3 CPU ARCHITECTURE 3.1 Memory Space Each product of the µ PD780208 Subseries accesses a memory space of 64 KB. Figures 3-1 to 3-5 show memory maps. Caution The initial values of the internal memory size switching register (IMS) in the µ PD780204A, 780205A, and 78P0208 are fixed to CFH, regardless of the internal memory capacity.
CHAPTER 3 CPU ARCHITECTURE 3.1.1 Internal program memory space The internal program memory space stores programs and table data. Normally, this space is addressed using the program counter (PC). Each product in the µ PD780208 Subseries contains internal ROM (or PROM) with the capacity shown below. Table 3-1.
CHAPTER 3 CPU ARCHITECTURE 3.1.2 Internal data memory space The µ PD780208 Subseries units incorporate the following RAMs. (1) Internal high-speed RAM Internal high-speed RAM is allocated to the 1024-byte area from FB00H to FEFFH of the µ PD780208 Subseries. Four banks of general-purpose registers, each bank consisting of eight 8-bit registers are allocated in the 32- byte area FEE0H to FEFFH.
CHAPTER 3 CPU ARCHITECTURE 3.1.4 Data memory addressing The method to specify the address of the instruction to be executed next or the address of a register or memory area to be manipulated when an instruction is executed is called addressing. The address of the instruction to be executed next is specified by the program counter (PC) (for details, refer to 3.3 Instruction Address Addressing).
CHAPTER 3 CPU ARCHITECTURE 3.2 Processor Registers The µ PD780208 Subseries units incorporate the following processor registers. 3.2.1 Control registers The control registers control the program sequence, statuses, and stack memory. The program counter (PC), program status word (PSW), and stack pointer (SP) are control registers. (1) Program counter (PC) The program counter is a 16-bit register which holds the address information of the next program to be executed.
CHAPTER 3 CPU ARCHITECTURE (d) Auxiliary carry flag (AC) If the operation result has a carry from bit 3 or a borrow at bit 3, this flag is set (1). It is reset (0) in all other cases. (e) In-service priority flag (ISP) This flag manages the priority of acknowledgeable maskable vectored interrupts.
CHAPTER 3 CPU ARCHITECTURE Figure 3-14. Data to Be Saved to Stack Memory Interrupt and BRK instruction CALL, CALLF, and PUSH rp instruction CALLT instructions SP – 3 SP – 2 SP – 2 SP – 3 PC7 to PC0 Lower SP –...
CHAPTER 3 CPU ARCHITECTURE 3.2.2 General-purpose registers General-purpose registers are mapped at particular addresses (FEE0H to FEFFH) of the data memory. They consist of 4 banks, each bank consisting of eight 8-bit registers (X, A, C, B, E, D, L, and H). Each register can be used as an 8-bit register, and two 8-bit registers can be used in pairs as a 16-bit register (AX, BC, DE, and HL).
CHAPTER 3 CPU ARCHITECTURE 3.2.3 Special-function registers (SFRs) Unlike a general-purpose register, each special-function register has a special function. The special-function registers are allocated in the FF00H to FFFFH area. Special-function registers can be manipulated, like general-purpose registers, with operation, transfer, and bit manipulation instructions.
CHAPTER 3 CPU ARCHITECTURE Table 3-3. Special-Function Register List (1/3) After Address Special-Function Register (SFR) Name Symbol Manipulatable Bit Unit Reset 1 Bit 8 Bits 16 Bits √ √ FF00H Port 0 – √ √ FF01H Port 1 – √ √...
Page 66
CHAPTER 3 CPU ARCHITECTURE Table 3-3. Special-Function Register List (2/3) After Address Special-Function Register (SFR) Name Symbol Manipulatable Reset Bit Unit 1 Bit 8 Bits 16 Bits √ √ FF60H Serial operating mode register 0 CSIM0 – √ √ FF61H Serial bus interface control register SBIC –...
Page 67
CHAPTER 3 CPU ARCHITECTURE Table 3-3. Special-Function Register List (3/3) After Address Special-Function Register (SFR) Name Symbol Manipulatable Reset Bit Unit 1 Bit 8 Bits 16 Bits √ Note FFF0H Internal memory size switching register – – √ Note FFF4H Internal expansion RAM size switching register –...
CHAPTER 3 CPU ARCHITECTURE 3.3 Instruction Address Addressing An instruction address is determined by program counter (PC) contents. The PC contents are normally incremented (+1 for each byte) automatically according to the number of bytes of the instruction to be fetched each time another instruction is executed.
CHAPTER 3 CPU ARCHITECTURE 3.3.2 Immediate addressing [Function] Immediate data in the instruction word is transferred to the program counter (PC) and branched. This function is carried out when the CALL !addr16 or BR !addr16 or CALLF !addr11 instruction is executed. CALL !addr16 and BR !addr16 instructions can branch to all the memory spaces.
CHAPTER 3 CPU ARCHITECTURE 3.3.3 Table indirect addressing [Function] Table contents (branch destination address) of the particular location to be addressed by bits 1 to 5 of the immediate data of an operation code are transferred to the program counter (PC) and branched. Table indirect addressing is carried out when the CALLT [addr5] instruction is executed.
CHAPTER 3 CPU ARCHITECTURE 3.3.4 Register addressing [Function] Register pair (AX) contents to be specified with an instruction word are transferred to the program counter (PC) and branched. This function is carried out when the BR AX instruction is executed. [Illustration] User’s Manual U11302EJ4V0UM...
CHAPTER 3 CPU ARCHITECTURE 3.4 Operand Address Addressing The following methods are available to specify the register and memory (addressing) which undergo manipulation during instruction execution. 3.4.1 Implied addressing [Function] The register which functions as an accumulator (A and AX) in the general-purpose register area is automatically (implicitly) addressed.
CHAPTER 3 CPU ARCHITECTURE 3.4.2 Register addressing [Function] A general-purpose register is accessed as an operand. The general-purpose register to be accessed is specified by register bank select flags (RBS0 and RBS1) and the register specification code (Rn, RPn) in the operation code. Register addressing is carried out when an instruction with the following operand format is executed.
CHAPTER 3 CPU ARCHITECTURE 3.4.3 Direct addressing [Function] The memory indicated by immediate data in an instruction word is directly addressed. [Operand format] Identifier Description addr16 Label or 16-bit immediate data [Description example] MOV A, !0FE00H; when setting !addr16 to FE00H Operation code Opcode [Illustration]...
CHAPTER 3 CPU ARCHITECTURE 3.4.4 Short direct addressing [Function] The memory to be manipulated in the fixed space is directly addressed with 8-bit data in an instruction word. The fixed space to which this addressing is applied to is the 256-byte space from FE20H to FF1FH. An internal high-speed RAM and special-function registers (SFRs) are mapped at FE20H to FEFFH and FF00H to FF1FH, respectively.
CHAPTER 3 CPU ARCHITECTURE 3.4.5 Special-function register (SFR) addressing [Function] A memory-mapped special-function register (SFR) is addressed with 8-bit immediate data in an instruction word. This addressing is applied to the 240-byte spaces FF00H to FFCFH and FFE0H to FFFFH. However, the SFRs mapped at FF00H to FF1FH can be accessed with short direct addressing.
CHAPTER 3 CPU ARCHITECTURE 3.4.6 Register indirect addressing [Function] The memory is addressed with the contents of the register pair specified as an operand. The register pair to be accessed is specified with the register bank select flag (RBS0 and RBS1) and the register pair specification code in the instruction code.
CHAPTER 3 CPU ARCHITECTURE 3.4.7 Based addressing [Function] 8-bit immediate data is added to the contents of the base register, that is, the HL register pair, and the sum is used to address the memory. The HL register pair to be accessed is in the register bank specified with the register bank select flags (RBS0 and RBS1).
CHAPTER 3 CPU ARCHITECTURE 3.4.8 Based indexed addressing [Function] The B or C register contents specified in an instruction word are added to the contents of the base register, that is, the HL register pair, and the sum is used to address the memory. The HL, B, and C registers to be accessed are registers in the register bank specified with the register bank select flag (RBS0 and RBS1).
CHAPTER 4 PORT FUNCTIONS 4.1 Port Functions The µ PD780208 Subseries units incorporate two input ports, 16 output ports, and 56 I/O ports. Figure 4-1 shows the port configuration. Every port is capable of 1-bit and 8-bit manipulations and can carry out various control operations.
CHAPTER 4 PORT FUNCTIONS Table 4-1. Port Functions (1/2) Pin Name Function Alternate Function Input only. INTP0/TI0 Port 0. 5-bit I/O port. Input/output can be specified in 1-bit units. INTP1 If used as an input port, on-chip pull-up resistors INTP2 can be used by software settings.
Page 82
CHAPTER 4 PORT FUNCTIONS Table 4-1. Port Functions (2/2) Alternate Pin Name Function Function P100 to P107 Port 10. FIP29 to FIP36 P-ch open-drain 8-bit high withstanding voltage I/O port. Input/output can be specified in 1-bit units. LEDs can be driven directly. In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option (can be specified as connected to V or V...
CHAPTER 4 PORT FUNCTIONS 4.2 Port Configuration A port consists of the following hardware. Table 4-2. Port Configuration Item Configuration Control registers Port mode register (PMm: m = 0, 1, 2, 3, 7, 10, 11, 12) Pull-up resistor option register (PUO) Ports Total: 74 (2 input, 16 output, 56 I/O) Pull-up resistors...
CHAPTER 4 PORT FUNCTIONS Figure 4-2. Block Diagram of P00 and P04 P00/INTP0/TI0, P04/XT1 Figure 4-3. Block Diagram of P01 to P03 PUO0 P-ch Selector PORT Output latch P01/INTP1, (P01 to P03) P02/INTP2, P03/INTP3 PM01 to PM03 PUO: Pull-up resistor option register Port mode register Port 0 read signal Port 0 write signal...
CHAPTER 4 PORT FUNCTIONS 4.2.2 Port 1 Port 1 is an 8-bit I/O port with an output latch. The P10 to P17 pins can be set to input mode/output mode in 1-bit units using port mode register 1 (PM1). When the P10 to P17 pins are used as input port pins, on-chip pull- up resistors can be connected to them in 8-bit units using the pull-up resistor option register (PUO).
CHAPTER 4 PORT FUNCTIONS 4.2.3 Port 2 Port 2 is an 8-bit I/O port with an output latch. The P20 to P27 pins can be set to input mode/output mode in 1-bit units using port mode register 2 (PM2). When the P20 to P27 pins are used as input port pins, on-chip pull- up resistors can be connected to them in 8-bit units using the pull-up resistor option register (PUO).
CHAPTER 4 PORT FUNCTIONS Figure 4-6. Block Diagram of P22 and P27 PUO2 P-ch Selector PORT Output latch P22/SCK1, (P22, P27) P27/SCK0 PM22, PM27 Alternate function PUO: Pull-up resistor option register Port mode register Port 2 read signal Port 2 write signal User’s Manual U11302EJ4V0UM...
CHAPTER 4 PORT FUNCTIONS 4.2.4 Port 3 Port 3 is an 8-bit I/O port with an output latch. The P30 to P37 pins can be set to input mode/output mode in 1-bit units using port mode register 3 (PM3). When the P30 to P37 pins are used as input port pins, on-chip pull- up resistors can be connected to them in 8-bit units using the pull-up resistor option register (PUO).
CHAPTER 4 PORT FUNCTIONS 4.2.5 Port 7 Port 7 is a 5-bit I/O port with an output latch. The P70 to P74 pins can be set to input mode/output mode in 1- bit units using port mode register 7 (PM7). In mask ROM versions, use of pull-up resistors can be specified in 1- bit units with the mask option.
CHAPTER 4 PORT FUNCTIONS 4.2.6 Port 8 Port 8 is an 8-bit output-only port. In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option. Pull-down resistor connection to V or V can be specified in 4-bit units. The LOAD µ...
CHAPTER 4 PORT FUNCTIONS 4.2.7 Port 9 Port 9 is an 8-bit output-only port. In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option. Pull-down resistor connection to V or V can be specified in 4-bit units. The LOAD µ...
CHAPTER 4 PORT FUNCTIONS 4.2.8 Port 10 Port 10 is an 8-bit I/O port with an output latch. The P100 to P107 pins can be set to input mode/output mode in 1-bit units using port mode register 10 (PM10). In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option.
CHAPTER 4 PORT FUNCTIONS 4.2.9 Port 11 Port 11 is an 8-bit I/O port with an output latch. The P110 to P117 pins can be set to input mode/output mode in 1-bit units using port mode register 11 (PM11). In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option.
CHAPTER 4 PORT FUNCTIONS 4.2.10 Port 12 Port 12 is an 8-bit I/O port with an output latch. The P120 to P127 pins can be set to input mode/output mode in 1-bit units using port mode register 12 (PM12). In mask ROM versions, use of pull-down resistors can be specified in 1-bit units with the mask option.
CHAPTER 4 PORT FUNCTIONS 4.3 Port Function Control Registers The following two types of registers control the ports. • Port mode registers (PM0, PM1, PM2, PM3, PM7, PM10, PM11, PM12) • Pull-up resistor option register (PUO) (1) Port mode registers (PM0, PM1, PM2, PM3, PM7, PM10, PM11, PM12) These registers are used to set port input/output in 1-bit units.
CHAPTER 4 PORT FUNCTIONS (2) Pull-up resistor option register (PUO) The PUO register enables or disables the on-chip pull-up resistor for each port pin. To enable the on-chip pull- up resistor of a port pin, the pin must be in the input mode and the corresponding bit in the PUO register must be set to 1.
CHAPTER 4 PORT FUNCTIONS 4.4 Port Function Operations Port operations differ depending on whether the input or output mode is set, as shown below. 4.4.1 Writing to I/O port (1) Output mode A value is written to the output latch by a transfer instruction, and the output latch contents are output from the pin.
CHAPTER 4 PORT FUNCTIONS 4.5 Selection of Mask Option The following mask option is provided in mask ROM versions. The µ PD78P0208 has no mask option. Table 4-4. Comparison Between Mask Option of Mask ROM Version and µ PD78P0208 µ PD78P0208 Pin Name Mask Option of Mask ROM Version Can incorporate pull-down resistors in...
CHAPTER 5 CLOCK GENERATOR 5.1 Clock Generator Functions The clock generator generates the clock to be supplied to the CPU and peripheral hardware. The following two types of system clock oscillators are available. (1) Main system clock oscillator This circuit oscillates at frequencies of 1 to 5.0 MHz. Oscillation can be stopped by executing the STOP instruction or setting the processor clock control register (PCC).
CHAPTER 5 CLOCK GENERATOR 5.3 Clock Generator Control Registers The clock generator is controlled by the following three registers. • Processor clock control register (PCC) • Display mode register 0 (DSPM0) • Display mode register 1 (DSPM1) (1) Processor clock control register (PCC) PCC sets CPU clock selection, the ratio of division, main system clock oscillator operation/stop, and subsystem clock oscillator internal feedback resistor enable/disable.
CHAPTER 5 CLOCK GENERATOR Figure 5-3. Format of Processor Clock Control Register Symbol <7> <6> <5> <4> Address After reset Note 1 PCC2 PCC1 PCC0 FFFBH CPU clock (f ) selection PCC2 PCC1 PCC0 Setting prohibited Other than above CPU clock status Main system clock Subsystem clock Subsystem clock feedback resistor selection...
CHAPTER 5 CLOCK GENERATOR The fastest instruction of the µ PD780208 Subseries is executed in two CPU clocks. Therefore, the relationship between the CPU clock (f ) and minimum instruction execution time is as shown in Table 5-2. Table 5-2. Relationship Between CPU Clock and Minimum Instruction Execution Time CPU Clock (f Minimum Instruction Execution Time: 2/f 0.4 µ...
CHAPTER 5 CLOCK GENERATOR Figure 5-4. Format of Display Mode Register 0 (1/2) Symbol Address After reset DSPM0 DSPM06 DSPM05 SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 F F A 0 H 0 0 H R/W SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 Display segment (display mode 1) Display output total (display mode 2) Note Note...
Page 106
CHAPTER 5 CLOCK GENERATOR Figure 5-4. Format of Display Mode Register 0 (2/2) Symbol Address After reset Note 1 DSPM0 DSPM06 DSPM05 SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 F F A 0 H 0 0 H R/W DSPM05 Display mode setting Display mode 1 (segment/character type) Display mode 2 (type in which a segment spans two or more grids) Note 2...
Page 107
CHAPTER 5 CLOCK GENERATOR (3) Display mode register 1 (DSPM1) Register to set display operation/stop. DSPM1 is set with an 8-bit memory manipulation instruction. RESET input sets DSPM1 to 00H. Remark In addition to setting display operation/stop, DSPM1 can also set the display digits/number of display patterns, cut width of the VFD output, and display cycle.
CHAPTER 5 CLOCK GENERATOR 5.4 System Clock Oscillator 5.4.1 Main system clock oscillator The main system clock oscillator oscillates with a crystal resonator or a ceramic resonator (standard: 5.0 MHz) connected to the X1 and X2 pins. External clocks can be input to the main system clock oscillator. In this case, input a clock signal to the X1 pin and its inverted signal to the X2 pin.
CHAPTER 5 CLOCK GENERATOR 5.4.2 Subsystem clock oscillator The subsystem clock oscillator oscillates with a crystal resonator (standard: 32.768 kHz) connected to the XT1 and XT2 pins. External clocks can be input to the subsystem clock oscillator. In this case, input a clock signal to the XT1 pin and its inverted signal to the XT2 pin.
CHAPTER 5 CLOCK GENERATOR Figure 5-8. Examples of Incorrect Resonator Connection (1/2) (a) Too long wiring of connected circuit (b) Crossed signal lines PORTn (n = 0 to 3, 7 to 12) (c) High alternating current close to (d) Current flowing through ground line signal lines of oscillator (potentials at points A, B, and C change)
Page 112
CHAPTER 5 CLOCK GENERATOR Figure 5-8. Examples of Incorrect Resonator Connection (2/2) (e) Signal fetched Remark When using a subsystem clock, replace X1 and X2 with XT1 and XT2, respectively. Further, insert resistors in series on the side of XT2. Cautions 2.
CHAPTER 5 CLOCK GENERATOR 5.4.3 Divider The divider divides the main system clock oscillator output (f ) and generates various clocks. 5.4.4 When subsystem clock is not used If it is not necessary to use the subsystem clock for low power consumption operations and clock operations, connect the XT1 and XT2 pins as follows.
CHAPTER 5 CLOCK GENERATOR 5.5 Clock Generator Operations The clock generator generates the following various types of clocks and controls the CPU operating mode including the standby mode. • Main system clock f • Subsystem clock f • CPU clock f •...
CHAPTER 5 CLOCK GENERATOR 5.5.1 Main system clock operations During operation with the main system clock (when bit 5 (CLS) of the processor clock control register (PCC) is set to 0), the following operations are carried out via PCC settings. (a) Because the operation guaranteed instruction execution speed depends on the power supply voltage, the minimum instruction execution time can be changed by setting bits 0 to 2 (PCC0 to PCC2) of PCC.
CHAPTER 5 CLOCK GENERATOR Figure 5-9. Main System Clock Stop Function (2/2) (c) Operation when CSS is set after setting MCC during main system clock operation Main system clock oscillation Subsystem clock oscillation CPU clock 5.5.2 Subsystem clock operations During operation with the subsystem clock (when bit 5 (CLS) of the processor clock control register (PCC) is set to 1), the following operations are carried out.
CHAPTER 5 CLOCK GENERATOR 5.6 Changing System Clock and CPU Clock Settings 5.6.1 Time required for switchover between system clock and CPU clock The system clock and CPU clock can be switched over by using bits 0 to 2 (PCC0 to PCC2) and bit 4 (CSS) of the processor clock control register (PCC).
CHAPTER 5 CLOCK GENERATOR 5.6.2 System clock and CPU clock switching procedure This section describes the procedure for switching between the system clock and CPU clock. Figure 5-10. System Clock and CPU Clock Switching RESET Interrupt request signal System clock CPU clock Minimum Maximum speed...
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.1 Outline of Timers Incorporated in µ PD780208 Subseries This chapter explains the 16-bit timer/event counter. First of all, the timers incorporated in the µ PD780208 Subseries and other related parts are outlined below. (1) 16-bit timer/event counter (TM0) The TM0 can be used for an interval timer, PWM output, pulse width measurement (infrared remote control receive function), external event counter or square-wave output of any frequency.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (1) Interval timer TM0 generates interrupt requests at the preset time interval. Table 6-2. 16-Bit Timer/Event Counter Interval Time Minimum Interval Time Maximum Interval Time Resolution 2 x TI0 input cycle x TI0 input cycle TI0 input edge cycle 2 x 1/f (400 ns)
Page 126
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (1) 16-bit compare register (CR00) CR00 is a 16-bit register whose value is constantly compared with the 16-bit timer register (TM0) count value, and an interrupt request (INTTM0) is generated if they match. It can also be used as the register that holds the interval time when TM0 is set to interval timer operation, and as the register that sets the pulse width when TM0 is set to PWM output operation.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.4 16-Bit Timer/Event Counter Control Registers The following six registers are used to control the 16-bit timer/event counter. • Timer clock select register 0 (TCL0) • 16-bit timer mode control register (TMC0) • 16-bit timer output control register (TOC0) •...
Page 129
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (2) 16-bit timer mode control register (TMC0) This register sets the 16-bit timer operating mode, the 16-bit timer register clear mode and output timing, and detects an overflow. TMC0 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets TMC0 to 00H.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (3) 16-bit timer output control register (TOC0) This register controls the operation of the 16-bit timer/event counter output controller. It sets/resets the R-S type flip-flop (LV0), sets the active level in PWM mode, and enables/disables inversion in modes other than PWM mode and data output mode.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (4) Port mode register 3 (PM3) This register sets port 3 input/output in 1-bit units. When using the P30/TO0 pin for timer output, set PM30 and the output latch of P30 to 0. PM3 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets PM3 to FFH.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (5) External interrupt mode register (INTM0) This register is used to set the INTP0 to INTP2 and TI0 valid edges. INTM0 is set with an 8-bit memory manipulation instruction. RESET input sets INTM0 to 00H. Remarks 1.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (6) Sampling clock select register (SCS) This register sets the clock to be used for sampling the valid edge input to INTP0. When remote controlled reception is carried out using INTP0, digital noise is eliminated using the sampling clock. SCS is set with an 8-bit memory manipulation instruction.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.5 16-Bit Timer/Event Counter Operations 6.5.1 Interval timer operations By setting bits 2 and 3 (TMC02 and TMC03) of the 16-bit timer mode control register (TMC0) to 1, 1, the 16-bit timer/event counter operates as an interval timer. Interrupt requests are generated repeatedly using the count value set in the 16-bit compare register (CR00) beforehand as the interval.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.5.2 PWM output operations By setting bits 1 to 3 (TMC01 to TMC03) of the 16-bit timer mode control register (TMC0) to 1, 0, 0, the 16-bit timer/ event counter operates as PWM output. Pulses with a duty determined by the value set in the 16-bit compare register (CR00) beforehand are output from the TO0/P30 pin.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER Figure 6-13 shows an example in which PWM output is converted to an analog voltage and used in a voltage synthesizer type TV tuner. Figure 6-13. TV Tuner Application Circuit Example +110 V µ PD780205 22 kΩ...
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (2) Pulse width measurement by means of restart When input of a valid edge to the TI0/P00 pin is detected, the count value of the 16-bit timer register (TM0) is taken into the 16-bit capture register (CR01), and then the pulse width of the signal input to the TI0/P00 pin is measured by clearing TM0 and restarting the count.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.5.5 Square-wave output operation The 16-bit timer/event counter outputs a square-wave of any frequency with the value preset to the 16-bit compare register (CR00) as the interval. The TO0/P30 pin output status is reversed at intervals of the count value preset to CR00 by setting bit 0 (TOE0) and bit 1 (TOC01) of the 16-bit timer output control register (TOC0) to 1.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER 6.6 16-Bit Timer/Event Counter Operating Precautions (1) Timer start errors An error of up to one clock may occur in the time required for a match signal to be generated after timer start. This is because the 16-bit timer register (TM0) is started asynchronously to the count pulse. Figure 6-20.
CHAPTER 6 16-BIT TIMER/EVENT COUNTER (4) Capture register data retention timing If the valid edge of the TI0/P00 pin is input during 16-bit capture register (CR01) read, CR01 holds the data without carrying out the capture operation. However, the interrupt request signal (INTTM0) is generated upon detection of the valid edge.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 7.1 8-Bit Timer/Event Counter Functions The following two modes are available for the 8-bit timer/event counter incorporated in the µ PD780208 Subseries. • 8-bit timer/event counter mode: Two-channel 8-bit timer/event counter with each channel used separately •...
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (1) 8-bit interval timer Interrupt requests are generated at the preset time intervals. Table 7-1. 8-Bit Timer/Event Counter Interval Time Minimum Interval Time Maximum Interval Time Resolution (102.4 µ s) 2 x 1/f (400 ns) x 1/f 2 x 1/f (400 ns)
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (2) External event counter The number of pulses of an externally input signal can be measured. (3) Square-wave output A square wave with any selected frequency can be output. Table 7-2. 8-Bit Timer/Event Counter Square-Wave Output Ranges Minimum Pulse Width Maximum Pulse Width Resolution...
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 7.1.2 16-bit timer/event counter mode (1) 16-bit interval timer Interrupt requests can be generated at the preset time intervals. Table 7-3. Interval Time When 8-Bit Timer/Event Counter Is Used as 16-Bit Timer/Event Counter Minimum Interval Time Maximum Interval Time Resolution 2 x 1/f...
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (2) External event counter The number of pulses of an externally input signal can be measured. (3) Square-wave output A square wave with any selected frequency can be output. Table 7-4. Square-Wave Output Ranges When 8-Bit Timer/Event Counter Is Used as 16-Bit Timer/Event Counter Minimum Pulse Width Maximum Pulse Width...
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (1) 8-bit compare registers (CR10, CR20) These are 8-bit registers used to compare the value set to CR10 with the 8-bit timer register 1 (TM1) count value, and the value set to CR20 with the 8-bit timer register 2 (TM2) count value, and, if they match, generate an interrupt request (INTTM1 and INTTM2, respectively).
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (2) 8-bit timer mode control register (TMC1) This register enables/stops operation of 8-bit timer registers 1 and 2 and sets the operating mode of 8- bit timer registers 1 and 2. TMC1 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets TMC1 to 00H.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (3) 8-bit timer output control register (TOC1) This register controls operation of 8-bit timer/event counter output controllers 1 and 2. It sets/resets the R-S flip-flops (LV1 and LV2) and enables/disables inversion and 8-bit timer output of 8- bit timer registers 1 and 2.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (4) Port mode register 3 (PM3) This register sets port 3 input/output in 1-bit units. When using the P31/TO1 and P32/TO2 pins for timer output, set PM31, PM32, and the output latches of P31 and P32 to 0. PM3 is set with a 1-bit or 8-bit memory manipulation instruction.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 7.4 8-Bit Timer/Event Counter Operations 7.4.1 8-bit timer/event counter mode (1) Interval timer operations The 8-bit timer/event counter operates as an interval timer that generates interrupt requests repeatedly at intervals of the count value preset to the 8-bit compare registers (CR10 and CR20). When the count values of 8-bit timer registers 1 and 2 (TM1 and TM2) match the values set to CR10 and CR20, counting continues with the TM1 and TM2 values cleared to 0 and interrupt request signals (INTTM1 and INTTM2) are generated.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (2) External event counter operation The external event counter counts the number of external clock pulses input to the TI1/P33 and TI2/P34 pins using 8-bit timer registers 1 and 2 (TM1 and TM2). TM1 and TM2 are incremented each time the valid edge specified by timer clock select register 1 (TCL1) is input.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (3) Square-wave output operation The 8-bit timer/event counter outputs a square wave of any frequency with the value preset to the 8-bit compare register (CR10, CR20) as the interval. The TO1/P31 or TO2/P32 pin output status is reversed at intervals of the count value preset to CR10 or CR20 by setting bit 0 (TOE1) or bit 4 (TOE2) of the 8-bit timer output control register (TOC1) to 1.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 7.4.2 16-bit timer/event counter mode When bit 2 (TMC12) of the 8-bit timer mode control register (TMC1) is set to 1, the 16-bit timer/event counter mode is set. In this mode, the count clock is selected using bits 0 to 3 (TCL10 to TCL13) of the timer clock select register (TCL1). The overflow signal of 8-bit timer/event counter 1 (TM1) is used as the count clock of 8-bit timer/event counter 2 (TM2).
CHAPTER 7 8-BIT TIMER/EVENT COUNTER Caution Even if the 16-bit timer/event counter mode is used, when the TM1 count value matches the CR10 value, an interrupt request (INTTM1) is generated and the F/F of 8-bit timer/event counter output controller 1 is inverted. Thus, when using the 8-bit timer/event counter as a 16-bit interval timer, set the mask flag TMMK1 to 1 to disable INTTM1 acknowledgment.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (2) External event counter operations The external event counter counts the number of external clock pulses input to the TI1/P33 pin by using the two channels of 8-bit timer registers 1 and 2 (TM1 and TM2). TM1 is incremented each time the valid edge specified by timer clock select register 1 (TCL1) is input.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (3) Square-wave output operation Square-wave signals can be generated at the user-specified frequency. The frequency or pulse interval is determined by the value preset in the 8-bit compare registers (CR10 and CR20). To set a count value, set the value of the higher 8 bits to CR20, and the value of the lower 8 bits to CR10.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER 7.5 8-Bit Timer/Event Counter Operating Precautions (1) Timer start error An error of up to one clock may occur in the time required for a match signal to be generated after timer start. This is because 8-bit timer registers 1 and 2 (TM1 and TM2) are started asynchronously to the count pulse.
CHAPTER 7 8-BIT TIMER/EVENT COUNTER (3) Operation after compare register change during timer count operation If the values after the 8-bit compare registers (CR10 and CR20) are changed are smaller than those of the 8-bit timer registers (TM1 and TM2), TM1 and TM2 continue counting, overflow and then restart counting from 0.
CHAPTER 8 WATCH TIMER 8.1 Watch Timer Functions The watch timer has the following functions. • Watch timer • Interval timer The watch timer and the interval timer can be used simultaneously. (1) Watch timer When the 32.768 kHz subsystem clock is used, a flag (WTIF) is set at 0.5-second or 0.25-second intervals. In addition, when the 4.19 MHz (standard: 4.194304 MHz) main system clock is used, a flag (WTIF) is set at 0.5-second or 1-second intervals.
CHAPTER 8 WATCH TIMER 8.2 Watch Timer Configuration The watch timer consists of the following hardware. Table 8-2. Watch Timer Configuration Item Configuration Counter 5 bits x 1 Control registers Timer clock select register 2 (TCL2) Watch timer mode control register (TMC2) 8.3 Watch Timer Control Registers The following two registers are used to control the watch timer.
CHAPTER 8 WATCH TIMER (2) Watch timer mode control register (TMC2) This register sets the watch timer operating mode, watch flag set time and prescaler interval time and enables/disables prescaler and 5-bit counter operations. TMC2 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets TMC2 to 00H.
CHAPTER 8 WATCH TIMER 8.4 Watch Timer Operations 8.4.1 Watch timer operation When the 32.768 kHz subsystem clock is used, the timer operates as a watch timer with a 0.5-second or 0.25- second interval. In addition, when the 4.19 MHz main system clock is used, the timer can operate as a watch timer with a 0.5-second or 1-second interval.
CHAPTER 9 WATCHDOG TIMER 9.1 Watchdog Timer Functions The watchdog timer has the following functions. • Watchdog timer • Interval timer Caution Select the watchdog timer mode or the interval timer mode using the watchdog timer mode register (WDTM) (the watchdog timer and interval timer cannot be used at the same time). (1) Watchdog timer mode This mode detects an inadvertent program loop.
CHAPTER 9 WATCHDOG TIMER 9.3 Watchdog Timer Control Registers The following two registers are used to control the watchdog timer. • Timer clock select register 2 (TCL2) • Watchdog timer mode register (WDTM) (1) Timer clock select register 2 (TCL2) This register sets the watchdog timer count clock.
CHAPTER 9 WATCHDOG TIMER (2) Watchdog timer mode register (WDTM) This register sets the watchdog timer operating mode and enables/disables counting. WDTM is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets WDTM to 00H. Figure 9-3. Format of Watchdog Timer Mode Register Symbol <7>...
CHAPTER 9 WATCHDOG TIMER 9.4 Watchdog Timer Operations 9.4.1 Watchdog timer operation When bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 1, the watchdog timer operates to detect an inadvertent program loop. The watchdog timer count clock (program loop detection time interval) can be selected using bits 0 to 2 (TCL20 to TCL22) of timer clock select register 2 (TCL2).
CHAPTER 9 WATCHDOG TIMER 9.4.2 Interval timer operation The watchdog timer operates as an interval timer that generates interrupt requests repeatedly at intervals of the preset count value when bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is cleared to 0. The count clock (interval time) can be selected by bits 0 to 2 (TCL20 to TCL22) of timer clock select register 2 (TCL2).
CHAPTER 10 CLOCK OUTPUT CONTROLLER 10.1 Clock Output Controller Functions The clock output controller is used for carrier output during remote controlled transmission and clock output for supply to a peripheral LSI. The clock selected by timer clock select register 0 (TCL0) is output from the PCL/ P35 pin.
CHAPTER 10 CLOCK OUTPUT CONTROLLER (2) Port mode register 3 (PM3) This register sets port 3 input/output in 1-bit units. When using the P35/PCL pin for clock output, set PM35 and the output latch of P35 to 0. PM3 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets PM3 to FFH.
CHAPTER 11 BUZZER OUTPUT CONTROLLER 11.1 Buzzer Output Controller Functions The buzzer output controller outputs a 1.2 kHz, 2.4 kHz, or 4.9 kHz frequency square-wave. The buzzer frequency selected by timer clock select register 2 (TCL2) is output from the BUZ/P36 pin. Follow the procedure below to output the buzzer frequency.
CHAPTER 11 BUZZER OUTPUT CONTROLLER 11.3 Buzzer Output Function Control Registers The following two registers are used to control the buzzer output function. • Timer clock select register 2 (TCL2) • Port mode register 3 (PM3) (1) Timer clock select register 2 (TCL2) This register sets the buzzer output frequency.
CHAPTER 11 BUZZER OUTPUT CONTROLLER (2) Port mode register 3 (PM3) This register sets port 3 input/output in 1-bit units. When using the P36/BUZ pin for buzzer output, set PM36 and the output latch of P36 to 0. PM3 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets PM3 to FFH.
CHAPTER 12 A/D CONVERTER 12.1 A/D Converter Functions The A/D converter converts an analog input into a digital value. It consists of 8 channels (ANI0 to ANI7) with an 8-bit resolution. The conversion method is based on successive approximation and the conversion result is held in the 8-bit A/D conversion result register (ADCR).
CHAPTER 12 A/D CONVERTER Figure 12-1. A/D Converter Block Diagram Internal bus A/D converter input select register ADIS3 ADIS2 ADIS1 ADIS0 Series resistor string ANI0/P10 ANI1/P11 Sample & hold circuit Voltage ANI2/P12 comparator ANI3/P13 ANI4/P14 ANI5/P15 ANI6/P16 Successive approximation ANI7/P17 register (SAR) ADM1 to ADM3 Falling edge...
Page 192
CHAPTER 12 A/D CONVERTER (1) Successive approximation register (SAR) This register compares the analog input voltage value to the voltage tap (compare voltage) value applied from the series resistor string and holds the result from the most significant bit (MSB). When up to the least significant bit (LSB) is held (end of A/D conversion), the SAR contents are transferred to the A/D conversion result register (ADCR).
Page 193
CHAPTER 12 A/D CONVERTER (7) AV This pin inputs the A/D converter reference voltage. It converts signals input to ANI0 to ANI7 into digital signals according to the voltage applied between and AV Caution A series resistor string of approximately 10 kΩ is connected between the AV pin and the AV pin.
CHAPTER 12 A/D CONVERTER 12.3 A/D Converter Control Registers The following two registers are used to control the A/D converter. • A/D converter mode register (ADM) • A/D converter input select register (ADIS) (1) A/D converter mode register (ADM) This register sets the analog input channel for A/D conversion, conversion time, conversion start/stop, and external trigger.
CHAPTER 12 A/D CONVERTER (2) A/D converter input select register (ADIS) This register determines whether the ANI0/P10 to ANI7/P17 pins should be used for analog input channels or ports. The pins that are not selected for analog input pins can be used as I/O port pins. ADIS is set with an 8-bit memory manipulation instruction.
CHAPTER 12 A/D CONVERTER 12.4 A/D Converter Operations 12.4.1 Basic operations of A/D converter [1] Set the number of analog input channels using the A/D converter input select register (ADIS). [2] From among the analog input channels set by ADIS, select the channel for A/D conversion using the A/ D converter mode register (ADM).
CHAPTER 12 A/D CONVERTER Figure 12-4. Basic Operation of A/D Converter Conversion time Sampling time A/D converter Sampling A/D conversion operation Conversion defined result Conversion ADCR result INTAD A/D conversion operations are performed continuously until bit 7 (CS) of ADM is reset (0) by software. If a write to ADM is performed during an A/D conversion operation, the conversion operation is initialized, and if CS is set (1), conversion starts again from the beginning.
CHAPTER 12 A/D CONVERTER 12.4.2 Input voltage and conversion results The relationship between the analog input voltage input to the analog input pins (ANI0 to ANI7) and the A/ D conversion result (the value stored in the A/D conversion result register (ADCR)) is shown by the following expression.
CHAPTER 12 A/D CONVERTER 12.4.3 A/D converter operating mode Select one analog input channel from among ANI0 to ANI7 using the A/D converter input select register (ADIS) and A/D converter mode register (ADM) and start A/D conversion. A/D conversion can be started in the following two ways. •...
CHAPTER 12 A/D CONVERTER (2) A/D conversion by software start When bit 6 (TRG) and bit 7 (CS) of the A/D converter mode register (ADM) are set to 0 and 1, respectively, A/D conversion starts on the voltage applied to the analog input pins specified by bits 1 to 3 (ADM1 to ADM3) of ADM.
CHAPTER 12 A/D CONVERTER 12.5 A/D Converter Precautions (1) Power consumption in standby mode The A/D converter operates on the main system clock. Therefore, its operation stops in STOP mode or in HALT mode with the subsystem clock. As a current still flows in the AV pin at this time, this current must be cut in order to minimize the overall system power consumption.
CHAPTER 12 A/D CONVERTER (2) Input range of ANI0 to ANI7 The input voltages of ANI0 to ANI7 should be within the specification range. In particular, if a voltage greater than or equal to AV or less than or equal to AV is input (even if within the absolute maximum rating range), the conversion value for that channel will be undefined, and the conversion values of the other channels may also be affected.
CHAPTER 12 A/D CONVERTER (6) Interrupt request flag (ADIF) The interrupt request flag (ADIF) is not cleared even if the A/D converter mode register (ADM) is changed. Therefore, if an analog input pin is changed during A/D conversion, the A/D conversion result for the analog input before changing and ADIF may be set immediately before rewriting ADM.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 The µ PD780208 Subseries incorporates two clocked serial interface channels. The differences between channels 0 and 1 are as follows (refer to CHAPTER 14 SERIAL INTERFACE CHANNEL 1 for details of serial interface channel 1). Table 13-1.
• High-speed serial interface complying with the NEC Electronics standard bus format. • Address, command, and data information sent on the serial bus • The wakeup function for handshake and acknowledge and busy signal output function can also be used.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 13.2 Configuration of Serial Interface Channel 0 Serial interface channel 0 consists of the following hardware. Table 13-3. Configuration of Serial Interface Channel 0 Item Configuration Registers Serial I/O shift register 0 (SIO0) Slave address register (SVA) Control registers Timer clock select register 3 (TCL3) Serial operating mode register 0 (CSIM0) Serial bus interface control register (SBIC)
Page 209
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (1) Serial I/O shift register 0 (SIO0) This is an 8-bit register used to carry out parallel/serial conversion and serial transmission/reception (shift operations) in synchronization with the serial clock. SIO0 is set with an 8-bit memory manipulation instruction. When bit 7 (CSIE0) of serial operating mode register 0 (CSIM0) is 1, writing data to SIO0 starts serial operation.
Page 210
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (6) Interrupt request signal generator This circuit controls interrupt request signal generation. It generates an interrupt request signal in the following cases. • In the 3-wire serial I/O mode and 2-wire serial I/O mode This circuit generates an interrupt request signal every eight serial clocks.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 13.3 Control Registers of Serial Interface Channel 0 The following four registers are used to control serial interface channel 0. • Timer clock select register 3 (TCL3) • Serial operating mode register 0 (CSIM0) •...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (3) Serial bus interface control register (SBIC) This register sets the serial bus interface operation and displays statuses. SBIC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SBIC to 00H. Figure 13-4.
Page 215
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Figure 13-4. Format of Serial Bus Interface Control Register (2/2) R/W ACKE Acknowledge signal output control Acknowledge signal automatic output disabled (output with ACKT enabled) Before completion The acknowledge signal is output in synchronization with the 9th clock of transfer falling edge of SCK0 (automatically output when ACKE = 1).
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (4) Interrupt timing specification register (SINT) This register sets the bus release interrupt and address mask functions and displays the SCK0 pin level status. SINT is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SINT to 00H.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 13.4 Operations of Serial Interface Channel 0 The following four operating modes are available for serial interface channel 0. • Operation stop mode • 3-wire serial I/O mode • SBI mode • 2-wire serial I/O mode 13.4.1 Operation stop mode Serial transfer is not carried out in the operation stop mode.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 13.4.2 3-wire serial I/O mode operation The 3-wire serial I/O mode is used for connection of peripheral ICs and display controllers that incorporate a clocked serial interface. Communication is carried out using three lines: a serial clock (SCK0), serial output (SO0), and serial input (SI0).
Page 219
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Symbol <7> <6> <5> 4 Address After reset CSIM CSIM CSIM CSIM CSIM CSIM0 COI WUP Note 1 CSIE0 FF60H CSIM CSIM Serial interface channel 0 clock selection × Input clock to SCK0 pin from off-chip 8-bit timer register 2 (TM2) output Clock specified with bits 0 to 3 of timer clock select register 3 (TCL3) CSIM CSIM CSIM...
Page 220
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (b) Serial bus interface control register (SBIC) SBIC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SBIC to 00H. Symbol <7> <6> <5> <4> <3> <2> <1> <0> Address After reset SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT FF61H...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (2) Communication operation The 3-wire serial I/O mode is used for data transmission/reception in 8-bit units. Data transmission/ reception is carried out bit by bit in synchronization with the serial clock. Shift operations of serial I/O shift register 0 (SIO0) are carried out at the falling edge of the serial clock (SCK0).
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (3) Signals Figure 13-7 shows the RELT and CMDT operations. Figure 13-7. RELT and CMDT Operations SO0 latch RELT CMDT (4) MSB/LSB switching as the start bit In the 3-wire serial I/O mode, transfer can be selected to start from the MSB or LSB. Figure 13-8 shows the configuration of serial I/O shift register 0 (SIO0) and the internal bus.
(CSIIF0) is set. 13.4.3 SBI mode operation SBI (Serial Bus Interface) is a high-speed serial interface that complies with the NEC Electronics serial bus format. SBI is a single-master high-speed serial bus with a format in which a bus configuration function has been added to the clocked serial I/O method so that it can carry out communication with two or more devices using two signal lines.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Figure 13-9. Example of Serial Bus Configuration with SBI Serial clock SCK0 SCK0 Slave CPU Master CPU Serial data bus SB0 (SB1) SB0 (SB1) Address 1 SCK0 Slave CPU SB0 (SB1) Address 2 SCK0 Slave IC SB0 (SB1) Address N...
Page 225
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (1) SBI functions With the conventional serial I/O method, when a serial bus is configured by connecting two or more devices, many ports and wiring are necessary to distinguish chip select signals and command/data and to judge the busy state because only a data transfer function is available.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (2) SBI definition The SBI serial data format is defined as follows. Serial data to be transferred with SBI is distinguished into three types, “address”, “command”, and “data”. Figure 13-10 shows the address, command, and data transfer timing. Figure 13-10.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (a) Bus release signal (REL) The bus release signal is identified when the SB0 (SB1) line has changed from low level to high level while the SCK0 line is high level (without serial clock output). This signal is output by the master device.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (c) Address An address is 8-bit data which the master device outputs to the slave device connected to the bus line in order to select a particular slave device. Figure 13-13. Address SCK0 SB0 (SB1) Address Bus release signal...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (d) Command and data The master device transmits commands to, and transmits/receives data to/from the slave device selected by address transmission. Figure 13-15. Commands SCK0 SB0 (SB1) Command Command signal Figure 13-16. Data SCK0 SB0 (SB1) Data 8-bit data following a command signal is defined as “command”...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (e) Acknowledge signal (ACK) The acknowledge signal is used to check serial data reception between the transmitter and receiver. Figure 13-17. Acknowledge Signal [When output in synchronization with 11th clock of SCK0] SCK0 SB0 (SB1) [When output in synchronization with 9th clock of SCK0] SCK0 SB0 (SB1)
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (f) Busy signal (BUSY) and ready signal (READY) The BUSY signal is used to report to the master device that the slave device is not ready for data transmission/reception. The READY signal is used to report to the master device that the slave device is ready for data transmission/reception.
Page 232
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (a) Serial operating mode register 0 (CSIM0) CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM0 to 00H. Symbol <7> <6> <5> 4 Address After reset CSIM CSIM CSIM CSIM CSIM...
Page 233
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (b) Serial bus interface control register (SBIC) SBIC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SBIC to 00H. Symbol <7> <6> <5> <4> <3> <2> <1> <0> Address After reset Note SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT...
Page 234
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (continued) ACKE Acknowledge signal output control Acknowledge signal automatic output disabled (output with ACKT enabled) Before completion The acknowledge signal is output in synchronization with the 9th clock of transfer falling edge of SCK0 (automatically output when ACKE = 1). After completion The acknowledge signal is output in synchronization with the falling edge of SCK0 of transfer...
Page 235
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (c) Interrupt timing specification register (SINT) SINT is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SINT to 00H. Symbol <6> <5> <4> Address After reset Note 1 SINT SIC SVAM FF63H SVAM SVA bit to be used as slave address...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (4) Signals Figures 13-19 to 13-24 show the signals and operations of the flags of the serial bus interface control register (SBIC) in SBI. Table 13-4 lists the signals in SBI. Figure 13-19. RELT, CMDT, RELD, and CMDD Operations (Master) Slave address write to SIO0 (transfer start instruction) SIO0...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Figure 13-21. ACKT Operation SCK0 ACK signal is output for SB0/SB1 a period of one clock just after setting ACKT When set during this period Caution Do not set ACKT before termination of transfer. User’s Manual U11302EJ4V0UM...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Figure 13-22. ACKE Operations (a) When ACKE = 1 upon completion of transfer SCK0 ACK signal is output SB0/SB1 at 9th clock ACKE When ACKE = 1 at this point (b) When set after completion of transfer SCK0 SB0/SB1 ACK signal is output for...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 Figure 13-23. ACKD Operations (a) When ACK signal is output at 9th clock of SCK0 Transfer start instruction SIO0 Transfer start SCK0 SB0/SB1 ACKD (b) When ACK signal is output after 9th clock of SCK0 Transfer start instruction SIO0...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (5) Pin configuration The serial clock pin SCK0 and serial data bus pin SB0 (SB1) have the following configurations. (a) SCK0: Serial clock I/O pin [1] Master: CMOS and push-pull output [2] Slave: Schmitt input (b) SB0 (SB1): Serial data I/O alternate-function pin Both master and slave devices have an N-ch open-drain output and a Schmitt input.
Page 243
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (6) Address match detection method In the SBI mode, the master transmits a slave address to select a specific slave device. A match of the addresses can be automatically detected by hardware. CSIIF0 is set only when the slave address transmitted by the master matches the address set to SVA when the wakeup function specification bit (WUP) = 1.
Page 248
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (9) Transfer start Serial transfer is started by setting transfer data to serial I/O shift register 0 (SIO0) when the following two conditions are satisfied. • Serial interface channel 0 operation control bit (CSIE0) = 1 •...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (d) For the pin that is to be used for data I/O, be sure to set as follows before serial transfer of the 1st byte after RESET input. [1] Set the P25 and P26 output latches to 1. [2] Set bit 0 (RELT) of the serial bus interface control register (SBIC) to 1.
Page 250
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (a) Serial operating mode register 0 (CSIM0) CSIM0 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM0 to 00H. Symbol <7> <6> <5> 4 Address After reset CSIM CSIM CSIM CSIM CSIM...
Page 251
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (b) Serial bus interface control register (SBIC) SBIC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SBIC to 00H. Symbol <7> <6> <5> <4> <3> <2> <1> <0> Address After reset SBIC BSYE ACKD ACKE ACKT CMDD RELD CMDT RELT FF61H...
Page 252
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (c) Interrupt timing specification register (SINT) SINT is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets SINT to 00H. Symbol <6> <5> <4> Address After reset Note 1 SINT SIC SVAM FF63H SVAM SVA bit to be used as slave address...
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (2) Communication operation The 2-wire serial I/O mode is used for data transmission/reception in 8-bit units. Data transmission/ reception is carried out bit by bit in synchronization with the serial clock. Shift operations of serial I/O shift register 0 (SIO0) are carried out in synchronization with the falling edge of the serial clock (SCK0).
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 (3) Signals Figure 13-32 shows the RELT and CMDT operations. Figure 13-32. RELT and CMDT Operations SO0 latch RELT CMDT (4) Transfer start Serial transfer is started by setting transfer data to serial I/O shift register 0 (SIO0) when the following two conditions are satisfied.
CHAPTER 13 SERIAL INTERFACE CHANNEL 0 13.4.5 SCK0/P27 pin output manipulation Because the SCK0/P27 pin incorporates an output latch, static output is also possible by software in addition to normal serial clock output. P27 output latch manipulation enables any value of SCK0 to be set by software (SI0/SB0 and SO0/SB1 pins to be controlled with bit 0 (RELT) and bit 1 (CMDT) of the serial bus interface control register (SBIC)).
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.1 Functions of Serial Interface Channel 1 Serial interface channel 1 has the following three modes. Table 14-1. Modes of Serial Interface Channel 1 Operation Mode Pins Used Features Usage Operation stop – • Used when serial transfer is not carried out. –...
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.2 Configuration of Serial Interface Channel 1 Serial interface channel 1 consists of the following hardware. Table 14-2. Configuration of Serial Interface Channel 1 Item Configuration Registers Serial I/O shift register 1 (SIO1) Automatic data transmit/receive address pointer (ADTP) Control registers Timer clock select register 3 (TCL3) Serial operating mode register 1 (CSIM1)
Page 259
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (1) Serial I/O shift register 1 (SIO1) This is an 8-bit register used to carry out parallel/serial conversion and serial transmission/reception (shift operations) in synchronization with the serial clock. SIO1 is set with an 8-bit memory manipulation instruction. When bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) is 1, writing data to SIO1 starts serial operation.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.3 Control Registers of Serial Interface Channel 1 The following four registers are used to control serial interface channel 1. • Timer clock select register 3 (TCL3) • Serial operating mode register 1 (CSIM1) •...
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (1) Timer clock select register 3 (TCL3) This register sets the serial clock of serial interface channel 1. TCL3 is set with an 8-bit memory manipulation instruction. RESET input sets TCL3 to 88H. Remark Besides setting the serial clock of serial interface channel 1, TCL3 sets the serial clock of serial interface channel 0.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (2) Serial operating mode register 1 (CSIM1) This register sets the serial interface channel 1 serial clock, operating mode, operation enable/stop, and automatic transmit/receive operation enable/stop. CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM1 to 00H.
Page 263
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (3) Automatic data transmit/receive control register (ADTC) This register sets automatic receive enable/disable, the operating mode, strobe output enable/disable, busy input enable/disable, error check enable/disable, and displays automatic transmit/receive execution and error detection. ADTC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ADTC to 00H.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (4) Automatic data transmit/receive interval specification register (ADTI) This register sets the automatic transmit/receive function data transfer interval. ADTI is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ADTI to 00H. Figure 14-5.
Page 266
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Notes 1. The interval is dependent only on CPU processing. 2. The data transfer interval includes an error. The data transfer minimum and maximum intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if the minimum calculated by the following expression is smaller than 2/f , the minimum interval time is 2/f...
Page 267
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-5. Format of Automatic Data Transmit/Receive Interval Specification Register (2/2) Symbol Address After reset ADTI ADTI7 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH Data transfer interval specification (f = 5.0 MHz operation) ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 Minimum Note Maximum...
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.4 Operations of Serial Interface Channel 1 The following three operating modes are available for serial interface channel 1. • Operation stop mode • 3-wire serial I/O mode • 3-wire serial I/O mode with automatic transmit/receive function 14.4.1 Operation stop mode Serial transfer is not carried out in the operation stop mode.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.4.2 3-wire serial I/O mode operation The 3-wire serial I/O mode is used for connection of peripheral ICs and display controllers that incorporate a clocked serial interface. Communication is carried out using three lines: a serial clock (SCK1), serial output (SO1), and serial input (SI1).
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (2) Communication operation The 3-wire serial I/O mode is used for data transmission/reception in 8-bit units. Data transmission/ reception is carried out bit by bit in synchronization with the serial clock. Shift operations of serial I/O shift register 1 (SIO1) are carried out at the falling edge of the serial clock (SCK1).
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (3) MSB/LSB switching as the start bit In the 3-wire serial I/O mode, transfer can be selected to start from the MSB or LSB. Figure 14-7 shows the configuration of serial I/O shift register 1 (SIO1) and the internal bus. As shown in the figure, the MSB/LSB can be read/written in reverse form.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 14.4.3 3-wire serial I/O mode operation with automatic transmit/receive function This 3-wire serial I/O mode is used for transmission/reception of up to 64-byte data without using software. Once transfer is started, the set number of bytes of the data prestored in the RAM can be transmitted, and the set number of bytes of data can be received and stored in the RAM.
Page 273
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (a) Serial operating mode register 1 (CSIM1) CSIM1 is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets CSIM1 to 00H. Symbol <7> 6 <5> 4 Address After reset CSIM CSIM CSIM1 DIR ATE CSIE1...
Page 274
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (b) Automatic data transmit/receive control register (ADTC) ADTC is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ADTC to 00H. Symbol <7> <6> <5> <4> <3> <2> <1> <0> Address After reset Note 1 ADTC...
Page 275
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (c) Automatic data transmit/receive interval specification register (ADTI) This register sets the data transfer interval of the automatic transmit/receive function. ADTI is set with a 1-bit or 8-bit memory manipulation instruction. RESET input sets ADTI to 00H. Symbol Address After reset...
Page 276
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Notes 1. The interval is dependent only on CPU processing. 2. The data transfer interval includes an error. The data transfer minimum and maximum intervals are found from the following expressions (n: Value set in ADTI0 to ADTI4). However, if the minimum calculated by the following expression is smaller than 2/f , the minimum interval time is 2/f...
Page 277
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Symbol Address After reset ADTI ADTI7 ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 FF6BH Data transfer interval specification (f = 5.0 MHz operation) ADTI4 ADTI3 ADTI2 ADTI1 ADTI0 Minimum Note Maximum Note 446.4 µ s + 0.5/f 449.6 µ...
Page 278
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (2) Automatic transmit/receive data setting (a) Transmit data setting [1] Write transmit data from the least significant address of buffer RAM, FAC0H (up to FAFFH). The transmit data should be in the order from higher address to lower address. [2] Set the automatic data transmit/receive address pointer (ADTP) to the value obtained by subtracting 1 from the number of transmit data bytes.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (3) Communication operation (a) Basic transmission/reception mode This transmission/reception mode is the same as the 3-wire serial I/O mode in which the specified number of data are transmitted/received in 8-bit units. Serial transfer is started when any data is written to serial I/O shift register 1 (SIO1) while bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) is set to 1.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-9. Basic Transmission/Reception Mode Flowchart Start Write transmit data in buffer RAM Set ADTP to the value (pointer value) obtained by subtracting 1 from the number of transmit data bytes Software execution Set the transmission/reception operation interval time in ADTI Write any data to SIO1 (Start trigger)
Page 281
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 In 6-byte transmission/reception (ARLD = 0, RE = 1) in basic transmission/reception mode, buffer RAM operates as follows. (i) Before transmission/reception (refer to Figure 14-10 (a)) After arbitrary data has been written to serial I/O shift register 1 (SIO1) (start trigger: this data is not transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1.
Page 282
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-10. Buffer RAM Operation in 6-Byte Transmission/Reception (in Basic Transmission/Reception Mode) (2/2) (b) 4th byte transmission/reception point FAFFH FAC5H Receive data 1 (R1) Receive data 4 (R4) SIO1 Receive data 2 (R2) Receive data 3 (R3) ADTP Transmit data 4 (T4) —1...
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (b) Basic transmission mode In this mode, the specified number of 8-bit unit data are transmitted. Serial transfer is started when any data is written to serial I/O shift register 1 (SIO1) while bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) is set to 1.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-12. Basic Transmission Mode Flowchart Start Write transmit data in buffer RAM Set ADTP to the value (pointer value) obtained by subtracting 1 from the number of transmit data bytes Software execution Set the transmission/reception operation interval time in ADTI Write any data to SIO1 (Start trigger)
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 In 6-byte transmission (ARLD = 0, RE = 0) in basic transmission mode, buffer RAM operates as follows. (i) Before transmission (refer to Figure 14-13 (a)) After arbitrary data has been written to serial I/O shift register 1 (SIO1) (start trigger: this data is not transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1.
Page 286
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-13. Buffer RAM Operation in 6-Byte Transmission (in Basic Transmission Mode) (2/2) (b) 4th byte transmission point FAFFH FAC5H Transmit data 1 (T1) SIO1 Transmit data 2 (T2) Transmit data 3 (T3) ADTP Transmit data 4 (T4) —1 Transmit data 5 (T5)
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (c) Repeat transmission mode In this mode, data stored in the buffer RAM is transmitted repeatedly. Serial transfer is started by writing any data to serial I/O shift register 1 (SIO1) while bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) is set to 1.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-15. Repeat Transmission Mode Flowchart Start Write transmit data in buffer RAM Set ADTP to the value (pointer value) obtained by subtracting 1 from the number of transmit data bytes Software execution Set the transmission/reception operation interval time in ADTI Write any data to SIO1 (Start trigger)
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 When data of 6 bytes are transmitted in repeat transmission mode (ARLD = 1, RE = 0), the buffer RAM operates as follows. (i) Before transmission (refer to Figure 14-16 (a)) After arbitrary data has been written to serial I/O shift register 1 (SIO1) (start trigger: this data is not transferred), transmit data 1 (T1) is transferred from the buffer RAM to SIO1.
Page 290
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 Figure 14-16. Buffer RAM Operation in 6-Byte Transmission (in Repeat Transmission Mode) (2/2) (b) Upon completion of transmission of 6 bytes FAFFH FAC5H Transmit data 1 (T1) SIO1 Transmit data 2 (T2) Transmit data 3 (T3) ADTP Transmit data 4 (T4) Transmit data 5 (T5)
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (d) Automatic transmission/reception suspension and restart Automatic transmission/reception can be temporarily suspended by resetting bit 7 (CSIE1) of serial operating mode register 1 (CSIM1) to 0. If 8-bit data transfer is in progress, the transmission/reception is not suspended if bit 7 (CSIE1) is reset to 0.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (4) Synchronization control Busy control and strobe control are used to synchronize transmission/reception data between the master device and slave device. By using these functions, a bit slippage in data being transmitted/received can be detected. (a) Busy control option Busy control is used to allow a slave device to output a busy signal to the master device, so that the master device puts serial transmission/reception into a wait state while the busy signal is active.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (b) Busy & strobe control option Strobe control is used to synchronize data transmission/reception between the master device and a slave device. The master device outputs a strobe signal from the STB/P23 pin on completion of transmission/reception of 8-bit data.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (c) Bit slippage detection function with busy signal During automatic transmission/reception, bit slippage may take place in the serial clock of the slave device due to the noise carried on the serial clock signal output by the master device. Unless the strobe control option is used at this time, the bit slippage affects transmission of the next byte.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (5) Automatic transmit/receive interval When the automatic transmit/receive function is used, one byte is transmitted/received and then the buffer RAM is read/written; therefore an interval is inserted before the next transmission/reception. When the automatic transmit/receive function is performed using an internal clock, since the read/write operations from/to the buffer RAM are done in parallel with CPU processing, the interval depends on the CPU processing at the timing of the serial clock’s eighth rising-edge and the value set in the automatic data transmit/receive interval specification register (ADTI).
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (a) When automatic transmit/receive function is performed using an internal clock The internal clock operation is selected when bit 1 (CSIM11) of serial operating mode register 1 (CSIM1) is set to 1. In this case, the interval is determined as follows by CPU processing. When bit 7 (ADTI7) of the automatic data transmit/receive interval specification register (ADTI) is set to 0, the interval is determined by CPU processing.
CHAPTER 14 SERIAL INTERFACE CHANNEL 1 (b) When automatic transmit/receive function is performed using an external clock The external clock operation is selected when bit 1 (CSIM11) of serial operating mode register 1 (CSIM1) is cleared to 0. When the automatic transmit/receive function is performed using an external clock, the clock must be selected so that the interval is longer than the values shown below.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.1 VFD Controller/Driver Functions The functions of the VFD controller/driver incorporated in the µ PD780208 Subseries are as follows. (1) Automatically outputs the segment signals (DMA operation) and digit signals by automatically reading data displayed. (2) Controls 9- to 40-segment and 2- to 16-digit VFDs (vacuum fluorescent display) using display mode registers 0, 1, and 2 (DSPM0 to DSPM2).
CHAPTER 15 VFD CONTROLLER/DRIVER There are 53 display output pins. Of these, 40 pins, FIP13 to FIP52, have alternate port functions. These pins are used as port pins when display stop is set using bits 4 to 7 (DIGS0 to DIGS3) of display mode register 1 (DSPM1). Even when display is enabled, display output pins not used for outputting digit signals and segment signals can be used as port pins.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.3 VFD Controller/Driver Control Registers 15.3.1 Control registers There are three registers for controlling the VFD controller/driver. • Display mode register 0 (DSPM0) • Display mode register 1 (DSPM1) • Display mode register 2 (DSPM2) (1) Display mode register 0 (DSPM0) (see Figure 15-3) This register sets the following and displays the display timing/key scan state.
Page 304
CHAPTER 15 VFD CONTROLLER/DRIVER (3) Display mode register 2 (DSPM2) (see Figure 15-5) DSPM2 is the register that holds the number of mask bits in the display data storage area when display mode 2 (DSPM05 = 1) is selected by display mode register 0 (DSPM0). By using this register to mask the part of the display data that does not need to be rewritten, the software workload is reduced.
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-3. Format of Display Mode Register 0 (1/2) Symbol Address After reset DSPM0 DSPM06 DSPM05 SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 F F A 0 H 0 0 H R/W SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 Display segment (display mode 1) Display output total (display mode 2) Note Note...
Page 306
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-3. Format of Display Mode Register 0 (2/2) Symbol Address After reset Note 1 DSPM0 DSPM06 DSPM05 SEGS4 SEGS3 SEGS2 SEGS1 SEGS0 F F A 0 H 0 0 H R/W DSPM05 Display mode setting Display mode 1 (Segment/character type) Display mode 2 (Type in which a segment spans over two or more grids.) Note 2...
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-4. Format of Display Mode Register 1 Symbol Address After reset DSPM1 DIGS3 DIGS2 DIGS1 DIGS0 DIMS3 DIMS2 DIMS1 DIMS0 F F A 1 H 0 0 H DIMS0 Display mode cycle setting is 1 display cycle. (1 display cycle = 204.8 µ s: when operated at 5.0 MHz) 1024/f is 1 display cycle.
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-5. Format of Display Mode Register 2 (1/2) Symbol Address After reset DSPM2 USEG5 USEG4 USEG3 USEG2 USEG1 USEG0 F F A 2 H 0 0 H USEG5 USEG4 USEG3 USEG2 USEG1 USEG0 Number of mask bits to be written None User’s Manual U11302EJ4V0UM...
Page 309
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-5. Format of Display Mode Register 2 (2/2) Symbol Address After reset DSPM2 USEG5 USEG4 USEG3 USEG2 USEG1 USEG0 F F A 2 H 0 0 H USEG5 USEG4 USEG3 USEG2 USEG1 USEG0 Number of mask bits to be written Other than the above Setting prohibited User’s Manual U11302EJ4V0UM...
CHAPTER 15 VFD CONTROLLER/DRIVER 15.3.2 One-display period and cut width The digit signal is equally cut at the beginning and end of the display period by the cut width set by bits 1 to 3 (DIMS1 to DIMS3) of display mode register 1 (DSPM1). Figure 15-6.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.4 Selecting Display Mode The number of segments and digits displayed by the VFD controller/driver depends on the display mode set. Figure 15-8. Selection of Display Mode Number of digits selected Caution When the total number of digits and segments together exceeds 53, the digits have priority. User’s Manual U11302EJ4V0UM...
CHAPTER 15 VFD CONTROLLER/DRIVER 15.5 Display Mode and Display Output The on-chip VFD controller/driver assigns pins FIP0 to FIP52/P127 to digit signals and segment signals (in this order). The number assigned is specified by display mode registers 0 and 1 (DSPM0 and DSPM1). The remaining pins are assigned as general-purpose ports.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.6 Display Data Memory The display data memory is the area for storing the segment data to be displayed. This memory is mapped at addresses FA30H to FA7FH. To display data on the VFD, the VFD controller reads the data stored in this memory regardless of the type of operations performed by the CPU (DMA operations).
CHAPTER 15 VFD CONTROLLER/DRIVER 15.7 Key Scan Flag and Key Scan Data 15.7.1 Key scan flag The key scan flag (KSF) is set to 1 during the key scan timing and reset automatically to 0 during the display timing. KSF is mapped at bit 7 of display mode register 0 (DSPM0) and can be tested one bit at a time. It cannot be written.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.8 Light Leakage of VFD Light may leak when a VFD is driven using the µ PD780208 Subseries. Two possible causes are as follows. (1) Light leakage due to a short blanking time Figure 15-11 shows the signal waveforms when only the first digit of two digits to be displayed is lit. As shown in this figure, when the blanking time is short, the T1 signal rises before the segment signal disappears, resulting in light leakage.
Page 316
CHAPTER 15 VFD CONTROLLER/DRIVER Depending on the duty cycle of the spike noise voltage for the whole display period, the ease with which light leaks due to C varies. The fewer the number of digits displayed, the easier it is for light to leak. Lowering the luminance of the display is also effective.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.9 Display Examples The µ PD780208 Subseries has a VFD controller/driver that enables the following three types of VFD display. Display types can be switched by setting bit 5 (DSPM05) of display mode register 0 (DSPM0). •...
CHAPTER 15 VFD CONTROLLER/DRIVER 15.9.1 Segment type (display mode 1: DSPM05 = 0) Figure 15-14 shows the display data memory configuration and data reading order when the device controls a 10-segment x 11-digit VFD display. As “segment type” (display mode 1) is selected, the display data memory stores segment data. Figure 15-14.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.9.2 Dot type (display mode 1: DSPM05 = 0) Figure 15-16 shows the display data memory configuration and data reading order when the device controls a 35-segment (5 x 7 dots) x 16-digit VFD display. As “dot type” (display mode 1) is selected, the display data memory stores segment data. Figure 15-16.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.9.3 Display type in which a segment spans two or more grids (display mode 2: DSPM05 = 1) In display mode 2, all of the display output data are stored in the display data memory. Figure 15-18 shows the display data RAM configuration and data reading order in a 23-segment x 5-grid display. Figure 15-18.
CHAPTER 15 VFD CONTROLLER/DRIVER The light timing of each segment is discussed next. In display example (3) in 15.9, a segment spans two grids (that is, 2G and 3G, 4G and 5G). Therefore, these segments will be lit at the timing from T0 to T6 as shown in Figure 15-20.
CHAPTER 15 VFD CONTROLLER/DRIVER 15.10 Calculating Total Power Dissipation The total power dissipation of the µ PD780208 Subseries is the sum of the values of the following three parts. Design your application set so that the sum is lower than the total power dissipation P stipulated in Figure 15-22.
Page 327
CHAPTER 15 VFD CONTROLLER/DRIVER By placing the above conditions in calculations <1> to <3>, the total dissipation can be worked out. <1> CPU power dissipation: 5.5 V × 21.6 mA = 118.8 mW <2> Output pin power dissipation: Total current value of each grid ) ×...
CHAPTER 15 VFD CONTROLLER/DRIVER Figure 15-23 shows a display example and display data for “segment type”. Figure 15-23. Relationship Between Display Data Memory Contents and Segment Outputs in 10-Segment x 11-Digit Display Mode Display data memory FA7AH FA79H FA78H FA77H FA76H FA75H FA74H...
CHAPTER 15 VFD CONTROLLER/DRIVER 15.10.2 Dot type (display mode 1: DSPM05 = 0) The calculation method for the total power dissipation in the case of the display example in Figure 15-24 is described below. Example Assume the following conditions: = 5 V ±10%, 5.0 MHz oscillation Supply current (I ) = 21.6 mA Display output: 16 grids ×...
Page 330
CHAPTER 15 VFD CONTROLLER/DRIVER <3> Pull-down resistor power dissipation: – V No. of grids LOAD × × Digit width (1 – Cut width) = Grid Pull-down resistor value No. of grids + 1 (5.5 V – 2 V – (–35 V)) 16 grids ×...
CHAPTER 15 VFD CONTROLLER/DRIVER 15.10.3 Display type in which a segment spans two or more grids (display mode 2: DSPM05 = 1) The calculation method for the total power dissipation in the case of the display example in Figure 15-26 is described below.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.1 Interrupt Function Types The following three types of interrupt functions are used. (1) Non-maskable interrupt This interrupt is acknowledged unconditionally (that is, even in the interrupt disabled state). It does not undergo interrupt priority control and is given top priority over all other interrupt requests. A standby release signal is generated.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.2 Interrupt Sources and Configuration A total of 15 interrupt sources are provided including non-maskable, maskable, and software interrupts (see Table 16-1). Table 16-1. Interrupt Source List Interrupt Default Interrupt Source Internal/ Vector Basic Note 1 Type Priority...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.3 Interrupt Function Control Registers The following six types of registers are used to control the interrupt functions. • Interrupt request flag register (IF0L, IF0H) • Interrupt mask flag register (MK0L, MK0H) • Priority specification flag register (PR0L, PR0H) •...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (1) Interrupt request flag registers (IF0L, IF0H) The interrupt request flag is set to 1 when the corresponding interrupt request is generated or an instruction is executed. It is cleared to 0 when an instruction is executed upon acknowledgment of an interrupt request or upon application of RESET.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (2) Interrupt mask flag registers (MK0L, MK0H) The interrupt mask flag is used to enable/disable the corresponding maskable interrupt servicing and to set standby clear enable/disable. MK0L and MK0H are set with a 1-bit or 8-bit memory manipulation instruction. If MK0L and MK0H are used as a 16-bit register MK0, use a 16-bit memory manipulation instruction for setting.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (3) Priority specification flag registers (PR0L, PR0H) The priority specification flag is used to set the corresponding maskable interrupt priority order. PR0L and PR0H are set with a 1-bit or 8-bit memory manipulation instruction. If PR0L and PR0H are used as a 16-bit register PR0, use a 16-bit memory manipulation instruction for setting.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (4) External interrupt mode register (INTM0) This register sets the valid edge for INTP0 to INTP2 and TI0. INTM0 is set with an 8-bit memory manipulation instruction. RESET input clears INTM0 to 00H. Remarks 1. INTP0 is also used for TI0/P00. 2.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (5) Sampling clock select register (SCS) This register is used to set the clock used to sample the valid edge input to INTP0. When remote controlled data reception is carried out using INTP0, digital noise is eliminated using the sampling clock. SCS is set with an 8-bit memory manipulation instruction.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS The noise eliminator sets the interrupt request flag (PIF0) to 1 if the input level of the sampled INTP0 is active twice in succession. Figure 16-7 shows the noise eliminator I/O timing. Figure 16-7. Noise Eliminator I/O Timing (When Rising Edge Is Detected) (a) When input is less than the sampling cycle (t Sampling clock INTP0...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (6) Program status word (PSW) The program status word is a register used to hold the instruction execution result and the current status for interrupt requests. The IE flag used to set maskable interrupt enable/disable and the ISP flag used to control multiple interrupt servicing are mapped to the PSW.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.4 Interrupt Servicing Operations 16.4.1 Non-maskable interrupt request acknowledgment operation A non-maskable interrupt request is unconditionally acknowledged even if in an interrupt request acknowledgment disabled state. It does not undergo interrupt priority control and has highest priority over all other interrupts. If a non-maskable interrupt request is acknowledged, the contents of program status word (PSW) and program counter (PC) are saved in the stacks in that order.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS Figure 16-11. Non-Maskable Interrupt Request Acknowledgment Operation If a new non-maskable interrupt request is generated during non-maskable interrupt servicing program execution Main routine Execution of NMI request <1> NMI request <1> NMI request <2> held pending NMI request <2>...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.4.2 Maskable interrupt request acknowledgment operation A maskable interrupt request becomes acknowledgeable when an interrupt request flag is set to 1 and the mask (MK) flag of the interrupt request is cleared to 0. A vectored interrupt request is acknowledged in the interrupt enabled state (with IE flag set to 1).
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.4.4 Multiple interrupt servicing Multiple interrupt servicing occurs when an interrupt request is acknowledged during execution of another interrupt. Multiple interrupt servicing does not occur unless the interrupt request acknowledgment enabled state is selected (IE = 1) (except non-maskable interrupts).
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS Figure 16-15. Multiple Interrupt Servicing Example (1/2) Example 1. Two interrupts are generated Main processing INTxx INTyy INTzz servicing servicing servicing IE = 0 IE = 0 IE = 0 INTyy INTzz INTxx (PR = 0) (PR = 0) (PR = 1) RETI...
Page 355
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS Figure 16-15. Multiple Interrupt Servicing Example (2/2) Example 3. Multiple interrupt servicing is not generated because interrupts are not enabled Main processing INTxx INTyy servicing servicing IE = 0 INTyy INTxx (PR = 0) (PR = 0) RETI IE = 0...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.4.5 Interrupt request hold Some instructions hold an interrupt request, if any, pending until the completion of execution of the next instruction. These instructions (that hold an interrupt request pending) are listed below. • MOV PSW, #byte •...
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS 16.5 Test Functions The internal test input flag (WTIF) is set to 1 and a standby release signal is generated when the watch timer overflows. Unlike the interrupt function, this function does not perform vector processing. The basic configuration is shown in Figure 16-17.
CHAPTER 16 INTERRUPT AND TEST FUNCTIONS (1) Interrupt request flag register (IF0H) This register indicates whether a watch timer overflow is detected or not. IF0H is set with a 1-bit or 8-bit memory manipulation instruction. RESET input clears IF0H to 00H. Figure 16-18.
CHAPTER 17 STANDBY FUNCTION 17.1 Standby Function and Configuration 17.1.1 Standby function The standby function is used to decrease the power consumption of the system. The following two modes are available. (1) HALT mode HALT instruction execution sets the HALT mode. In the HALT mode, the CPU operation clock stops. The system clock oscillator continues oscillation.
CHAPTER 17 STANDBY FUNCTION 17.1.2 Standby function control register The wait time after the STOP mode is released by an interrupt request until the oscillation stabilizes is controlled by the oscillation stabilization time select register (OSTS). OSTS is set with an 8-bit memory manipulation instruction. RESET input sets OSTS to 04H.
CHAPTER 17 STANDBY FUNCTION 17.2 Standby Function Operations 17.2.1 HALT mode (1) HALT mode set and operating status The HALT mode is set by executing the HALT instruction. It can be set during main system clock or the subsystem clock operation. The operating status in the HALT mode is described below.
CHAPTER 17 STANDBY FUNCTION (2) HALT mode release The HALT mode can be released by the following four sources. (a) Release by unmasked interrupt request When an unmasked interrupt request is generated, the HALT mode is released. If interrupt request acknowledgment is enabled, vectored interrupt servicing is carried out.
CHAPTER 17 STANDBY FUNCTION (d) Release by RESET input When a RESET signal is input, the HALT mode is released. As is the case with a normal reset operation, the program is executed after branch to the reset vector address. Figure 17-3.
CHAPTER 17 STANDBY FUNCTION 17.2.2 STOP mode (1) STOP mode set and operating status The STOP mode is set by executing the STOP instruction. It can be set only during main system clock operation. Cautions 1. When the STOP mode is set, the X2 pin is internally connected to V via a pull-up resistor to suppress the leakage at the crystal oscillator.
CHAPTER 17 STANDBY FUNCTION (2) STOP mode release The STOP mode can be released by the following three sources. (a) Release by unmasked interrupt request When an unmasked interrupt request is generated, the STOP mode is released. If interrupt request acknowledgment is enabled after the lapse of oscillation stabilization time, vectored interrupt servicing is carried out.
CHAPTER 17 STANDBY FUNCTION (c) Release by RESET input When a RESET signal is input, the STOP mode is released. After the lapse of oscillation stabilization time, a reset operation is carried out. Figure 17-5. STOP Mode Release by RESET Input Wait STOP : 26.2 ms)
CHAPTER 18 RESET FUNCTION 18.1 Reset Function The following two operations are available to generate a reset signal. (1) External reset input via RESET pin (2) Internal reset by watchdog timer program loop time detection External reset and internal reset have no functional differences. In both cases, program execution starts at addresses 0000H and 0001H by RESET input.
CHAPTER 18 RESET FUNCTION Figure 18-2. Timing of Reset by RESET Input Oscillation Reset period Normal operation stabilization Normal operation (oscillation stop) (reset processing) time wait RESET Internal reset signal Delay Delay Hi-Z Port pin Figure 18-3. Timing of Reset due to Watchdog Timer Overflow Oscillation Reset period Normal operation...
CHAPTER 18 RESET FUNCTION Table 18-1. Hardware Status After Reset (1/2) Hardware Status After Reset Note 1 Program counter (PC) The contents of reset vector tables (0000H and 0001H) are set. Stack pointer (SP) Undefined Program status word (PSW) Note 2 Data memory Undefined Note 2...
Page 370
CHAPTER 18 RESET FUNCTION Table 18-1. Hardware Status After Reset (2/2) Hardware Status After Reset Watch timer Clock select register (TCL2) Watchdog timer Mode register (WDTM) Serial interface Clock select register (TCL3) Shift registers (SIO0, SIO1) Undefined Mode registers (CSIM0, CSIM1) Serial bus interface control register (SBIC) Slave address register (SVA) Undefined...
CHAPTER 19 µ PD78P0208 The µ PD78P0208 is a product integrating a one-time programmable ROM (one-time PROM). Table 19- 1 shows the differences between the µ PD78P0208 and the mask ROM versions ( µ PD780204, 780204A, 780205, 780205A, 780206, and 780208). Table 19-1.
CHAPTER 19 µ PD78P0208 19.1 Internal Memory Size Switching Register The internal memory capacity of the µ PD78P0208 can be selected by using the internal memory size switching register (IMS). The same memory map as that of the mask ROM version with a different internal memory capacity is possible by setting IMS.
CHAPTER 19 µ PD78P0208 19.2 Internal Expansion RAM Size Switching Register By setting the internal expansion RAM size swtiching register (IXS), the µ PD78P0208 can have the same memory map as used in mask ROM versions that have a different internal expansion RAM capacity. For the mask ROM versions, IXS does not need to be set.
CHAPTER 19 µ PD78P0208 19.3 PROM Programming The µ PD78P0208 incorporates a 60 KB PROM as program memory. When programming, the PROM programming mode is set by means of the V pin and the RESET pin. For the connection of unused pins, refer to 1.5 Pin Configuration (Top View) (2) PROM programming mode.
Page 376
CHAPTER 19 µ PD78P0208 (4) Page data latch mode Setting CE to H, PGM to H, and OE to L at the start of the page write mode sets the page data latch mode. In this mode, 1-page 4-byte data is latched in the internal address/data latch circuit. (5) Page write mode After a 1-page 4-byte address and data are latched by the page data latch mode, a page write is executed by applying a 0.1 ms program pulse (active-low) to the PGM pin while CE = H and OE = H.
CHAPTER 19 µ PD78P0208 Figure 19-4. Page Program Mode Timing Page data latch Page program Program verify A2 to A16 A0, A1 D0 to D7 Data input Data output + 1.5 User’s Manual U11302EJ4V0UM...
CHAPTER 19 µ PD78P0208 Figure 19-5. Byte Program Mode Flowchart Start Address = G = 6.5 V, V = 12.5 V X = 0 X = X + 1 X = 10? 0.1 ms program pulse Address = Address + 1 Fail Verify Pass...
CHAPTER 19 µ PD78P0208 Figure 19-6. Byte Program Mode Timing Program Program verify A0 to A16 D0 to D7 Data input Data output + 1.5 Cautions 1. Ensure that V is applied before V and removed after V 2. Ensure that V does not exceed +13.5 V including overshoot.
CHAPTER 19 µ PD78P0208 19.3.3 PROM read procedure PROM contents can be read onto the external data bus (D0 to D7) using the following procedure. (1) Fix the RESET pin low, and supply +5 V to the V pin. Unused pins are handled as shown in 1.5 Pin Configuration (Top View) (2) PROM programming mode.
19.4 Screening of One-Time PROM Version A one-time PROM device ( µ PD78P0208GF-3BA) cannot be fully tested by NEC Electronics before shipment due to the nature of PROM. After the necessary data has been written, it is recommended to implement a screening process, that is, the written contents should be verified after the device has been stored under the following high-temperature conditions.
CHAPTER 20 INSTRUCTION SET This chapter describes the instruction set for the µ PD780208 Subseries. For details of the operations and mnemonics (instruction codes) of each instruction, refer to the 78K/0 Series Instructions User’s Manual (U12326E). User’s Manual U11302EJ4V0UM...
CHAPTER 20 INSTRUCTION SET 20.1 Conventions 20.1.1 Operand identifiers and description methods Operands are described in the “Operand” column of each instruction in accordance with the description method of the instruction operand identifier (refer to the assembler specifications for details). When there are two or more description methods, select one of them.
CHAPTER 20 INSTRUCTION SET 20.1.2 Description of “operation” column A register; 8-bit accumulator X register B register C register D register E register H register L register AX register pair; 16-bit accumulator BC register pair DE register pair HL register pair Program counter Stack pointer PSW:...
CHAPTER 20 INSTRUCTION SET 20.2 Operation List Clocks Flag Instruc- Mnemonic Operands Bytes Operation tion Z AC CY Note 1 Note 2 Group r ← byte r, #byte – 8-bit data (saddr) ← byte saddr, #byte transfer sfr ← byte sfr, #byte –...
Page 387
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group rp ← word MOVW rp, #word – 16-bit (saddrp) ← word data saddrp, #word transfer sfrp ← word sfrp, #word –...
Page 388
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group A, CY ← A–byte × × × 8-bit A, #byte – operation (saddr), CY ← (saddr)–byte × × × saddr, #byte Note 3 A, CY ←...
Page 389
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group A ← A × 8-bit A, #byte – byte operation (saddr) ← (saddr) × saddr, #byte byte Note 3 A ← A ×...
Page 390
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group AX, CY ← AX+word × × × 16-bit ADDW AX, #word – operation AX, CY ← AX–word × × × SUBW AX, #word –...
Page 391
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group CY ← CY × AND1 CY, saddr.bit (saddr.bit) CY ← CY × manipu- CY, sfr.bit – sfr.bit lation CY ← CY ×...
Page 392
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group (SP–1) ← (PC+3) , (SP–2) ← (PC+3) Call CALL !addr16 – return PC ← addr16, SP ← SP–2 (SP–1) ← (PC+2) , (SP–2) ←...
Page 393
CHAPTER 20 INSTRUCTION SET Instruc- Mnemonic Operands Bytes Operation Clocks Flag tion Z AC CY Note 1 Note 2 Group PC ← PC+3+jdisp8 if (saddr.bit) = 1 saddr.bit, $addr16 Condi- PC ← PC+4+jdisp8 if sfr.bit = 1 tional sfr.bit, $addr16 –...
APPENDIX A DIFFERENCES BETWEEN µ PD78044H, 780228, AND 780208 SUBSERIES Table A-1 shows the major differences between the µ PD78044H, 780228, and 780208 Subseries. Table A-1. Major Differences Between µ PD78044H, 780228, and 780208 Subseries µ PD78044H Subseries µ PD780228 Subseries µ...
APPENDIX B DEVELOPMENT TOOLS The following development tools are available for the development of systems which employ the µ PD780208 Subseries. Figure B-1 shows the configuration of the development tools. • Support for PC98-NX series Unless otherwise specified, products supported by IBM PC/AT compatible machines can be used for PC98- NX series computers.
APPENDIX B DEVELOPMENT TOOLS B.1 Software Package SP78K0 This package contains various software tools for 78K/0 Series development. Software package The following tools are included. RA78K0, CC78K0, ID78K0-NS, SM78K0, and various device files Part Number: µ S××××SP78K0 Remark ×××× in the part number differs depending on the OS used. µ...
APPENDIX B DEVELOPMENT TOOLS Remark ×××× in the part number differs depending on the host machine and OS used. µ S××××RA78K0 µ S××××CC78K0 ×××× Host Machine Supply Medium AB13 PC-9800 series, Windows (Japanese version) 3.5-inch 2HD FD BB13 IBM PC/AT and compatibles Windows (English version) AB17 Windows (Japanese version)
APPENDIX B DEVELOPMENT TOOLS B.4 PROM Programming Tools B.4.1 Hardware PG-1500 This PROM programmer allows users to encode the PROM in single-chip microcontrollers PROM programmer stand-alone or using a host machine. This requires connection of the accompanying board and separately-sold PROM programmer adapter to the PROM programmer. Besides internal PROMs, general discrete PROM devices whose capacities range from 256 Kb to 4 Mb can be programmed.
APPENDIX B DEVELOPMENT TOOLS B.5 Debugging Tools (Hardware) B.5.1 When using in-circuit emulator IE-78K0-NS, IE-78K0-NS-A The in-circuit emulator serves to debug hardware and software when developing IE-78K0-NS application systems using a 78K/0 Series product. It can be used with an integrated In-circuit emulator debugger (ID78K0-NS).
APPENDIX B DEVELOPMENT TOOLS B.5.2 When using in-circuit emulator IE-78001-R-A This is an in-circuit emulator for debugging the hardware and software when an IE-78001-R-A application system using the 78K/0 Series is developed. It can be used with an In-circuit emulator integrated debugger (ID78K0).
APPENDIX B DEVELOPMENT TOOLS B.6 Debugging Tools (Software) SM78K0 This is a system simulator for the 78K/0 Series. The SM78K0 is Windows-based System simulator software. It is used to perform debugging at the C source level or assembler level while simulating the operation of the target system on a host machine.
APPENDIX B DEVELOPMENT TOOLS B.7 Embedded Software The RX78K0 is a real-time OS conforming to the µ ITRON specifications. RX78K0 Real-time OS A tool (configurator) for generating the nucleus of the RX78K0 and multiple information tables is supplied. Used in combination with an assembler package (RA78K0) and device file (DF780208) (both sold separately).
Table B-1. Method for Upgrading from Former In-Circuit Emulator for 78K/0 Series to IE-78001-R-A Note In-Circuit Emulator Owned In-Circuit Emulator Cabinet System-Up Board to Be Purchased IE-78000-R Required IE-78001-R-BK IE-78000-R-A Not required Note For upgrading a cabinet, send your in-circuit emulator to NEC Electronics. User’s Manual U11302EJ4V0UM...
APPENDIX B DEVELOPMENT TOOLS B.10 Notes on Target System Design The following shows the conditions when connecting the emulation probe to the conversion adapter. Follow the configuration below and consider the shape of parts to be mounted on the target system when designing a system. Among the products described in this appendix, the NP-100GF-TQ and NP-H100GF-TQ are products of Naito Densei Machida Mfg.
APPENDIX B DEVELOPMENT TOOLS Figure B-5. Connection Conditions of Target System (When NP-100GF-TQ Is Used) Emulation board IE-780208-NS-EM1 Emulation probe NP-100GF-TQ Conversion adapter 11 mm TGF-100RBP 27.5 mm Pin 1 21 mm 40 mm 34 mm Target system Figure B-6. Connection Conditions of Target System (When NP-H100GF-TQ Is Used) Emulation board IE-780208-NS-EM1 Emulation probe...
APPENDIX D REVISION HISTORY Here is the revision history of this manual. The “Applied to:” column indicates the chapters of each edition in which the revision was applied. (1/2) Edition Revisions from Previous Edition Applied to: • The following products are already developed: µ PD780204GF-×××-3BA, Second Throughout µ...
Page 418
APPENDIX D REVISION HISTORY (2/2) Edition Revisions from Previous Edition Applied to: Third Correction of Cautions when the STOP mode is set CHAPTER 17 STANDBY FUNCTION µ Addition of APPENDIX A DIFFERENCES AMONG PD78044H, 780228, AND APPENDIX A 780208 SUBSERIES DIFFERENCES AMONG µ...