HD404814FS Renesas Electronics Corporation., HD404814FS Datasheet

no-image

HD404814FS

Manufacturer Part Number
HD404814FS
Description
Manufacturer
Renesas Electronics Corporation.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
HD404814FS
Manufacturer:
HITACHI/日立
Quantity:
20 000

Related parts for HD404814FS

HD404814FS Summary of contents

Page 1

...

Page 2

Cautions Keep safety first in your circuit designs! 1. Renesas Technology Corporation puts the maximum effort into making semiconductor products better and more reliable, but there is always the possibility that trouble may occur with them. Trouble with semiconductors may ...

Page 3

HD404818 Series 4-Bit Single-Chip Microcomputer Description 4-bit single-chip HMCS400 series microcomputers provide high program productivity. It incorporates a large size memory, LCD controller/driver, voltage comparator, and 32-kHz watch oscillator ...

Page 4

HD404818 Series Subroutine stack levels, including interrupts Instruction cycle time MHz for HD404812/HD404814/HD404816/HD404818/HD4074818) OSC 800 kHz for HD40L4812/HD40L4814/HD40L4816/HD40L4818/HD407L4818) OSC Four low-power dissipation modes Standby mode Stop mode Watch ...

Page 5

... HD40L4814 HD40L4816 HD40L4818 ZTAT Standard HD4074818 (4.0 to 5.5 V) Low-voltage HD407L4818 HD407L4818FS operation (3.0 to 5.5 V) Clock Model Name ROM (Word) Frequency HD404812FS 2,048 4 HD404812H HD404812TF HD404814FS 4,096 HD404814H HD404814TF HD404816FS 6,144 HD404816H HD404816TF HD404818FS 8,192 HD404818H HD404818TF HD40L4812FS 2,048 0.8 HD40L4812H HD40L4812TF HD40L4814FS 4,096 HD40L4814H ...

Page 6

HD404818 Series Pin Arrangement ref 11 COMP0 COMP1/D ...

Page 7

Pin Description Pin Number FP-80B FP-80A, TFP-80 Pin Name ...

Page 8

HD404818 Series Pin Number FP-80B FP-80A, TFP-80 Pin Name 61 59 SEG29 62 60 SEG30 63 61 SEG31 64 62 SEG32 65 63 COM1 66 64 COM2 67 65 COM3 68 66 COM4 Note: ...

Page 9

Pin Functions Power Supply V : Apply the V power supply voltage to this pin GND: Connect to ground. TEST: For test purposes only. Connect RESET: MCU reset pin. Refer to the Reset section for ...

Page 10

HD404818 Series LCD Driver/Controller Power supply pins for the LCD driver. Since the LCD driving resistors are provided internally lines should be connected to these pins. The voltage on each ...

Page 11

Block Diagram INT 0 External INT 1 interrupt control circuit Timer A Timer B TIMO Timer C SI Serial SO interface SCK VC ref Compa- COMP 0 rator COMP COM1 COM2 COM3 LCD ...

Page 12

HD404818 Series Memory Map ROM Memory Map The ROM is described in the following paragraphs with the ROM memory map in figure 1. 0 Vector address 15 16 Zero-page subroutine (64 words Pattern (4096 words) 4095 4096 Program ...

Page 13

RAM Memory Map The MCU also contains a 1,184-digit interrupt control bits and special function registers are mapped on the RAM memory space. The RAM memory map (figure 2) is described in the following paragraphs. Interrupt Control Bits Area ($000 ...

Page 14

HD404818 Series 0 RAM-mapped registers 63 64 Memory registers (MR) LCD display area (32 digits) 80 112 Data (144 digits) Data (464 digits (bank (bank 1) Not used 959 960 Stack (64 digits) ...

Page 15

Bit 3 IM0 0 (IM of INT ) (IF of INT ) 0 IFTA IMTA 1 (IM of timer A) (IF of timer A) IFTC IMTC 2 (IF of timer C) (IM of timer C) 3 Not used Not used ...

Page 16

HD404818 Series Memory registers Stack area 64 MR (0) $040 960 Level 16 MR (1) Level 15 65 $041 66 MR (2) $042 Level 14 MR (3) Level 13 67 $043 MR (4) Level 12 68 $044 69 $045 Level ...

Page 17

Functional Description Registers and Flags The MCU provides ten registers and two flags for CPU operations. They are illustrated in figure 5 and described in the following paragraphs. Accumulator Initial value: Undefined, R/W B register Initial value: Undefined, R/W V ...

Page 18

HD404818 Series V Register (V): The V register, available for RAM address expansion, selects the bank of locations $100– $2CF on the RAM address (464 digits) depending on its value. Therefore, when accessing locations $100– $2CF on the RAM address, ...

Page 19

Reset Setting the RESET pin high resets the MCU. At power-on or when cancelling the stop mode for the oscillator, apply the reset input for at least t instruction cycles of reset input are required for the MCU reset. Table ...

Page 20

HD404818 Series Table 1 Initial Values after MCU Reset (cont) Items LCD LCD control register (LCR) LCD mode register (LMR) Bit register Low speed on flag (LSON) Watchdog timer on flag (WDON) Direct transfer on flag (DTON) 0 Miscellaneous (MIS) ...

Page 21

Interrupts Six interrupt sources are available on the MCU: external requests (INT B, and C), and the serial interface. For each source, an interrupt request flag (IF), interrupt mask (IM), and interrupt vector addresses are provided to control and maintain ...

Page 22

HD404818 Series $ 000 000,2 IF0 $ 000,3 IM0 $ 001,0 IF1 $ 001,1 IM1 $ 001,2 IFTA $ 001,3 IMTA $ 002,0 IFTB $ 002,1 IMTB $ 002,2 IFTC $ 002,3 IMTC $ 003,0 IFS $ 003,1 ...

Page 23

Table 3 Interrupt Conditions Interrupt Source INT Interrupt Control Bit IM0 IF0 1 IM1 IF1 * IMTA IFTA * IMTB IFTB * IFTC IMTC * IMS IFS * Note: *Don’t care. Figure 7 shows the interrupt processing ...

Page 24

HD404818 Series Power on No RESET = 1 ? Yes Reset MCU Figure 8 Interrupt Processing Flowchart 22 Yes Interrupt request ? No No Accept interrupt Execute instruction PC (PC Stack Stack Stack Yes PC $0002 Yes PC ...

Page 25

Interrupt Enable Flag (IE: $000, Bit 0): The interrupt enable flag enables/disables interrupt requests (table 4 reset by an interrupt and set by the RTNI instruction. Table 4 Interrupt Enable Flag IE Interrupt Enabled/Disabled 0 Disabled 1 Enabled ...

Page 26

HD404818 Series Table 7 Timer A Interrupt Request Flag IFTA Interrupt Request Yes Timer A Interrupt Mask (IMTA: $001, Bit 3): The timer A interrupt mask prevents an interrupt request from being generated by the timer A ...

Page 27

Timer C Interrupt Mask (IMTC: $002, Bit 3): The timer C interrupt mask prevents the interrupt from being generated by the timer C interrupt request flag (table 12). Table 12 Timer C Interrupt Mask IMTC Interrupt Request 0 Enabled 1 ...

Page 28

HD404818 Series Operating Modes The MCU has five operating modes that are specified by how the clock is used. The functions available in each mode are listed in table 15, and operations are shown in table 16. Transitions between operating ...

Page 29

Table 16 Operations in Low-Power Dissipation Modes Function Stop Mode CPU Reset RAM Retained Timer A Reset Timer B Reset Timer C Reset Serial interface Reset LCD Reset 1 I/O Reset* Notes: OP indicates operating. 1. Output pins are at ...

Page 30

HD404818 Series Standby mode f : Operating OSC SBY (standby Operating X ø : Stopped CPU Interrupt : f ø CLK cyc ø Timers PER cyc Serial, INT , INT ...

Page 31

SBY instruction. If the interrupt enable flag is 1, that interrupt is then processed the interrupt request is left pending and normal instruction execution continues. A flowchart of operation in standby ...

Page 32

HD404818 Series Stop Mode: The MCU enters stop mode if the STOP instruction is executed in active mode when TMA3 = 0. In this mode, the system oscillator stops, which stops all MCU functions as well. Stop mode is terminated ...

Page 33

Active mode Interrupt strobe INT 0 Interrupt request generation (During the transition from watch mode to active mode only) T: Interrupt frame length t : Oscillation stabilization period RC Subactive Mode: The CPU operates with a clock generated by the ...

Page 34

HD404818 Series MIS: $00C MIS2 MIS1 MIS0 t RC Refer to table 20 Direct Transfer: By controlling the DTON, the MCU can be placed directly from subactive to active mode. The detailed procedure is as follows: Set the DTON flag ...

Page 35

The low-power mode operation sequence is shown in figure 17. With the IE flag cleared and an interrupt flag set together with its interrupt mask cleared STOP/SBY instruction is executed, the instruction is cancelled (regarded as an NOP) ...

Page 36

HD404818 Series Low-power mode operation cycle IF: Interrupt request flag IM: Interrupt mask IE: Interrupt enable flag PC: Program counter CA: Carry flag ST: Status flag Figure 16 MCU Operating Sequence (MCU operation cycle) 34 MCU operation cycle Yes IF ...

Page 37

Low-power mode operation cycle and Yes Hardware NOP execution PC next Iocation MCU operation cycle For specific IF and IM, see figure 10, MCU Operating Flowchart Figure 17 MCU Operating Sequence (low-power mode ...

Page 38

HD404818 Series When the MCU is in watch mode or subactive mode, if the high level period before the falling edge of INT is shorter than the interrupt frame, INT 0 falling edge of INT is shorter than the interrupt ...

Page 39

Internal Oscillator Circuit Figure 20 shows the block diagram of the internal oscillator circuit. A ceramic oscillator can be connected to OSC and OSC . A 32.768-kHz crystal oscillator can be connected to X1 and X2. External clock 1 2 ...

Page 40

HD404818 Series Table 18 Examples of Oscillator Circuits Circuit Configuration External clock operation Oscillator Open Ceramic oscillator Ceramic GND Crystal oscillator Crystal GND 38 OSC 1 OSC OSC OSC ...

Page 41

Table 18 Examples of Oscillator Circuits (cont) Circuit Configuration Crystal oscillator Crystal GND Notes: 1. The circuit parameters above are recommended by the crystal or ceramic oscillator manufacturer. The circuit parameters are affected by the crystal or ceramic oscillator and ...

Page 42

HD404818 Series Input/Output The MCU provides 26 I/O pins and 4 input-only pins including 10 high-current pins (15 mA max.). Twenty-six I/O pins contain programmable pull-up MOS. When each I/O pin is used as an input, the data control register ...

Page 43

Table 19 I/O Pin Circuit Types I/O Pins Circuit I/O common pins V CC (wint pull-up MOS) V Input control signal Output pins V CC (with pull-up MOS) V Input pins V CC Input control signal Input ...

Page 44

HD404818 Series D Port: Consists of ten 1-bit I/O ports and four input ports. Pins D max.). The sum of the current for all D-port pins 100 mA. D port can be set/reset by the SED/RED and ...

Page 45

MPX Comparator Mode register Figure 22 Configuration of D12 and D13 HD404818 Series Pin + – VC ref 43 ...

Page 46

HD404818 Series SMR (serial mode register) ADR: $005 PMRA (port mode register A) ADR: $004 PMRB (port mode register B) ADR: $012 SMR Port select Bit 3 0 ...

Page 47

Table 20 Input/Output by Program Control PMRB Bit 3 0 DCR 0 PDR 0 1 PMOS (A) — — NMOS (B) — — Pull-up MOS — — Notes: — indicates off status. 1. Combine the values of the above mode ...

Page 48

HD404818 Series V CC Pull-up MOS Figure 24 Configuration of the Input/Output Buffer PMOS (A) NMOS (B) Input control signal PMRB3 DCR PDR Input data ...

Page 49

Timers The MCU provides prescalers S and W (each with a different input clock source), and three timer/ counters (timers A, B, and C). Figures 25, 26 and 27 show their diagrams. Prescaler S: The input to prescaler S is ...

Page 50

HD404818 Series 32.768-kHz 1/4 1/2 oscillator 2 f SUB 1/2 t subcyc ø System PER clock Figure 25 Timer A Block Diagram subcyc Prescaler W (PSW) f SUB Selector Clock Selector 3 Prescaler S (PSS) Timer A ...

Page 51

Timer B Operation: Timer mode register B (TMB: $009) selects the auto-reload function, input clock source, and prescaler divide ratio for timer B. When an external event input is used as an input clock signal as INT to timer B, ...

Page 52

HD404818 Series according to the value of timer load register not selected, timer C goes to $00. The timer C interrupt request flag (IFTC: $002, bit 2) will be set as this overflow is output. Timer ...

Page 53

T (TCR + 1) TMC3 = 0 T 256 T TMC3 = 1 T (256 – TCR) T: Input clock period to counter (see table 23) TCR: The value of the timer load register Note: When TCR = $FF, this ...

Page 54

HD404818 Series Registers for Timers Timer Mode Register A (TMA: $008): Timer mode register 4-bit write-only register which controls the timer A operation as table 21 shows. Timer mode register A is initialized MCU ...

Page 55

The division ratio must not be modified during time base mode operation, otherwise an overflow cycle error will occur. Timer Mode Register C (TMC: $00D): Timer mode register 4-bit write-only register which selects the auto-reload function, ...

Page 56

HD404818 Series Table 23 Timer Mode Register C TMC3 Auto-Reload Function Yes TMC2 TMC1 TMC0 ...

Page 57

Table 24 PWM Output Following Update of Timer load Register PWM Output Timer load Register is Updated during Mode High PWM Output Timer load Free running register updated to value N Timer load Reload register updated to value N T ...

Page 58

HD404818 Series Serial Interface The serial interface transmits/receives 8-bit data serially. It consists of the serial data register, the serial mode register, port mode register A, the octal counter, and the selector (figure 29). Pin R0 transmit clock signal are ...

Page 59

Selection and Change of the Operation Mode: Table 25 shows the serial interface operation modes which are determined by a combination of the value in the port mode register and in the serial mode register. Initialize the serial interface by ...

Page 60

HD404818 Series Transmit clock wait state (Octal counter = 000) Figure 30 Serial Interface Operation States Example of Transmit Clock Error Detection: The serial interface malfunctions when the transmit clock is disturbed by external noise. In this case, transmit clock ...

Page 61

Transmission finished (IFS 1) Disable interrupt IFS 0 Write to SMR Yes IFS = Normal end Figure 31 Transmit Clock Error Detection HD404818 Series Transmit clock error processing 59 ...

Page 62

HD404818 Series Registers for Serial Interface Serial Mode Register (SMR: $005): The 4-bit write-only serial mode register controls the R0 prescaler divide ratio, and transmit clock source (table 26, figure 32). A write signal to the serial mode register controls ...

Page 63

PMRA: $004 PMRA3 PMRA2 PMRA1 PMRA0 Figure 32 Configurations and Functions of the Mode Registers Transmit clock 1 Serial output LSB data Serial input data latch timing Figure 33 Serial Interface I/O Timing SMR: $005 SMR3 SMR2 SMR1 SMR0 Transmit ...

Page 64

HD404818 Series LCD Controller/Driver The MCU contains four common signal pins, the controller, and the driver. The controller and the driver drive 32 segment signal pins. The controller consists of display data RAM, the LCD control register (LCR), and the ...

Page 65

Bit 3 Bit 2 Bit 1 80 SEG1 SEG1 SEG1 81 SEG2 SEG2 SEG2 SEG3 SEG3 SEG3 82 83 SEG4 SEG4 SEG4 84 SEG5 SEG5 SEG5 85 SEG6 SEG6 SEG6 86 SEG7 SEG7 SEG7 87 SEG8 SEG8 SEG8 88 SEG9 ...

Page 66

HD404818 Series Table 27 LCD Control Register LCR Watch Mode/ Subactive Mode BIT 2 Display 0 Off 1 On Note: With the LCD in watch mode, use the divider output of the 32-kHz oscillator as an LCD clock and set ...

Page 67

Table 29 LCD Frame Frequency LMR Static Bit 3 Bit 2 Instruction 0 0 cycle time CL0 10 s 512 512 Hz LMR 1/2 Duty Cycle Bit 3 Bit 2 Instruction 0 0 cycle time CL0 10 ...

Page 68

HD404818 Series Large LCD Panel Driving and Driving Voltage (V dividing resistance by attaching external resistors in parallel with the internal dividing resistors (figure 37). Since the liquid crystal display board matrix configuration, the path of the ...

Page 69

GND GND CC LCD Figure 37 Examples of LCD Connections ...

Page 70

HD404818 Series Pin Description in PROM Mode The HD4074818 and HD407L4818 are ZTAT mode, the MCU does not operate and the HD4074818 and HD407L4818 can program the on-chip PROM. Pin Number MCU Mode PROM Mode FP- FP-80A 80B TFP-80 Pin ...

Page 71

MCU Mode PROM Mode Pin Number FP- FP-80A 80B TFP-80 Pin Name I/O Pin Name 55 53 SEG23 SEG24 SEG25 SEG26 SEG27 SEG28 O 61 ...

Page 72

HD404818 Series Programmable ROM Operation The MCU on-chip PROM is programmed in PROM mode. PROM mode is set by pulling TEST low, and RESET high, as shown in figure 38. In PROM mode, the MCU does not operate. ...

Page 73

Table 31 PROM Programmers and Socket Adapters PROM Programmer Manufacturer Type Name DATA I/O 121B 29B AVAL Corp. PKW-1000 Figure 38 PROM Mode Dunction Diagram Socket Adapter Manufacturer Type Name Hitachi HS460ESF01H HS460ESH01H HS461EST01H Hitachi HS460ESF01H ...

Page 74

HD404818 Series Addressing Modes RAM Addressing Modes As shown in figure 39, the MCU has three RAM addressing modes: register indirect addressing, direct addressing, and memory register addressing. Register Indirect Addressing Mode: The W register, X register, and Y register ...

Page 75

The P instruction has no effect on the program counter. Instruction 1st word Opcode Figure 39 RAM Addressing Modes W register X register RAM address ...

Page 76

HD404818 Series Instruction 1st word [JMPL] [BRL] Opcode [CALL] Program counter Program counter Program counter Opcode [TBR] Program counter ...

Page 77

BR AAA AAA NOP BR AAA BR BBB BBB NOP Figure 41 Page Boundary between BR Instruction and Branch Destination HD404818 Series 256 (n – 255 256n 256n + 254 256n + 255 256 ( ...

Page 78

HD404818 Series Instruction Opcode [P] 0 Referred ROM address RA 13 ROM data RO 9 Accumulator, B register ROM data RO 9 Output registers R1 register ...

Page 79

Absolute Maximum Ratings HD404812, HD404814, HD404816, HD404818, and HD4074818 Absolute Maximum Ratings Item Supply voltage Programming voltage Pin voltage Total permissible input current Total permissible output current Maximum input current Maximum output current Operating temperature Storage temperature Notes: Permanent damage ...

Page 80

HD404818 Series HD40L4812, HD40L4814, HD40L4816, HD40L4818, and HD407L4818 Absolute Maximum Ratings Item Supply voltage Programming voltage Pin voltage Total permissible input current Total permissible output current Maximum input current Maximum output current Operating temperature Storage temperature Notes: Permanent damage may ...

Page 81

Electrical Characteristics for Standard-Voltage HD404812, HD404814, HD404816, HD404818, and HD4074818 Electrical Characteristics DC Characteristics (HD404812, HD404814, HD404816, HD404818 5.5 V; GND = – +75 C, unless otherwise specified) a Item ...

Page 82

HD404818 Series Item Symbol Pin Current I V WTC1 CC dissipation in watch mode (1) Current I V WTC2 CC dissipation in watch mode (2) Current I V STOP CC dissipation in stop mode Notes: 1. Excluding output buffer current. ...

Page 83

Input/Output Characteristics for Standard Pins (HD404812, HD404814, HD404816, HD404818 HD4074818 5.5 V; GND = specified) Item Symbol Pin Input high V D – ...

Page 84

HD404818 Series Input/Output Characteristics for High-Current Pins (HD404812, HD404814, HD404816, HD404818 HD4074818 specified) Item Symbol Pin Input high V D – voltage Input low V D –D IL ...

Page 85

AC Characteristics (HD404812, HD404814, HD404816, HD404818 5.5 V; GND = – +75 C, unless otherwise specified) a Item Symbol Pin Oscillation f OSC , OSC OSC 1 frequency X1, X2 ...

Page 86

HD404818 Series Item Symbol Pin RESET high t RESET RSTH width Input capacitance All pins except D RESET fall t RSTf time Analog CSTB 12 13 comparator stabilization time Notes: 1. The ...

Page 87

Serial Interface Timing Characteristics During Transmit Clock Output (HD404812, HD404814, HD404816, HD404818: V HD4074818 5.5 V; GND = Item Symbol Transmit clock cycle time t Scyc Transmit clock high and t t ...

Page 88

HD404818 Series V – 0 OSC 0 INT , INT 0 1 RESET t SCKf t SCK V – 2.0 V (0. SCKL CC CC 0.8 V (0. ...

Page 89

2 Test point 1S2074 equivalent Figure 47 Timing Load Circuit HD404818 Series 87 ...

Page 90

HD404818 Series Electrical Characteristics for Low-Voltage Versions HD40L4812, HD40L4814, HD40L4816, HD40L4818, and HD407L4818 Electrical Characteristics DC Characteristics (HD40L4812, HD40L4814, HD40L4816, HD40L4818: V HD407L4818 5.5 V; GND = Item Symbol Pin RESET, SCK, ...

Page 91

Item Symbol Pin Current I V WTC1 CC dissipation in watch mode (1) Current I V WTC2 CC dissipation in watch mode (2) Current I V STOP CC dissipation in stop mode Notes: 1. Excluding output buffer current. 2. The ...

Page 92

HD404818 Series Input/Output Characteristics for Standard Pins (HD40L4812, HD40L4814, HD40L4816, HD40L4818 2 HD407L4818 unless otherwise specified) Item Symbol Pin Input high V D – voltage R0–R3 Input low V ...

Page 93

Input/Output Characteristics for High-Current Pins (HD40L4812, HD40L4814, HD40L4816, HD40L4818 2 HD407L4818 unless otherwise specified) Item Symbol Pin Input high V D – voltage Input low V D – ...

Page 94

HD404818 Series AC Characteristics (HD40L4812, HD40L4814, HD40L4816, HD40L4818: V HD407L4818 5.5 V; GND = Item Symbol Pin(s) Oscillation f OSC OSC frequency X1, X2 Instruction cycle t cyc time Oscillator t OSC ...

Page 95

The oscillator stabilization time is the period from when V 3 power-on until the oscillator stabilizes. The time required to stabilize the oscillator (t must be obtained. Since t capacitance, consult with the ceramic oscillator manufacturer. 3. ...

Page 96

HD404818 Series During Transmit Clock Input Item Symbol Transmit clock cycle time t Scyc Transmit clock high and low t , SCKH widths t SCKL Transmit clock rise and fall t , SCKr times t SCKf Serial output data delay ...

Page 97

SCKf t SCK V – 1.0 V (0. SCKL CC CC 0.4 V (0. DSO 0 Note – 1.0 V and 0.4 V are the threshold ...

Page 98

HD404818 Series Notes on ROM Out Please pay attention to the following items regarding ROM out. On ROM out, fill the ROM area indicated below with 1s to create the same data size as an 8-kword version (HD404818 and HD40L4818). ...

Page 99

HD404812, HD404814, HD404816, HD404818, HD40L4812, HD40L4814, HD40L4816, HD40L4818 Option List Please check off the appropriate applications and enter the necessary information. 1. ROM Size 5-V operation HD404812 Low-voltage operation HD40L4812 5-V operation HD404814 Low-voltage operation HD40L4814 5-V operation HD404816 Low-voltage ...

Page 100

HD404818 Series Cautions 1. Hitachi neither warrants nor grants licenses of any rights of Hitachi’s or any third party’s patent, copyright, trademark, or other intellectual property rights for information contained in this document. Hitachi bears no responsibility for problems that ...

Related keywords