www.DataSheet4U.com
HD404339 Series
Rev. 7.0 Sept. 1999 Description
The HD404339 Series is 4-bit HMCS400-Series microcomputer with large-capacity memory designed to increase program productivity. Each microcomputer has an A/D converter, input capture timer, and a 32kHz oscillator circuit for clock use all built in. They also come with high-voltage I/O pins that can directly drive a fluorescent display. The HD404339 Series includes six chips: the HD404339 with 16-kword ROM; the HD4043312 with 12kword ROM; the HD404338 with 8-kword ROM; the HD404336 with 6-kword ROM; the HD404334 with 4-kword ROM; the HD4074339 with 16-kword PROM. The HD4074339 is a PROM version ZTAT™ microcomputer. Programs can be written to the PROM by a PROM writer, which can dramatically shorten system development periods and smooth the process from debugging to mass production. (The PROM program specifications are the same as for the 27256.) ZTAT™: Zero Turn Around Time ZTAT is a trademark of Hitachi Ltd.
Features
• 54 I/O pins One input-only pin 53 input/output pins: 30 pins are high-voltage pins (40 V, max.) • On-chip A/D converter (8-bit × 12-channel) • Three timers One event counter input One timer output One input capture timer • 8-bit clock-synchronous serial interface (1 channel) • Alarm output • Built-in oscillators Ceramic or crystal oscillator External clock drive is also possible Subclock: 32.768-kHz crystal oscillator
www.DataSheet4U.com
HD404339 Series
• Seven interrupt sources Two by external sources Three by timers One each by the A/D converter and serial interface • Four low-power dissipation modes Standby mode Stop mode Watch mode Subactive mode • Instruction cycle time: 1 µs (fOSC = 4 MHz, 1/4 division ratio) 1/4, 1/8, 1/16, 1/32 system clock division ratio can be selected
Ordering Information
Type Mask ROM Product Name HD404334 Model Name HD404334S HD404334FS HD404336 HD404336S HD404336FS HD404338 HD404338S HD404338FS HD4043312 HD4043312S HD4043312FS HD404339 HD404339S HD404339FS ZTAT™ HD4074339 HD4074339S HD4074339FS 16,384 16,384 12,288 8,912 6,144 ROM (words) 4,096 RAM (digit) 512 Package DP-64S FP-64B DP-64S FP-64B DP-64S FP-64B DP-64S FP-64B DP-64S FP-64B DP64S FP-64B
Recommended PROM Programmers and Socket Adapters
PROM Programmer Manufacture DATA I/O corp Model Name 121 B Socket Adapter Package DP-64S FP-64B AVAL corp PKW-1000 DP-64S FP-64B Hitachi Manufacture Hitachi Model Name HS4339ESS01H HS4339ESF01H HS4339ESS01H HS4339ESF01H
2
www.DataSheet4U.com
HD404339 Series
Pin Arrangement
R71 R70 R63 R62 R61 R60 RA1/Vdisp R23 R22 R21 R20 R13 R12 R60 R61 R62 R63 R70 R71 R72 R00/SCK R01/SI R02/SO R03/TOC TEST RESET OSC1 OSC2 GND X1 X2 AVSS R30/AN0 R31/AN1 R32/AN2 R33/AN3 R40/AN4 R41/AN5 R42/AN6 R43/AN7 R50/AN8 R51/AN9 R52/AN10 R53/AN11 AV CC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 RA1/Vdisp R23 R22 R21 R20 R13 R12 R11 R10 R93 R92 R91 R90 R83 R82 R81 R80 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4/STOPC D3/BUZZ D2/EVNB D1/INT1 D0/INT0 VCC
64 63 62 61 60 59 58 57 56 55 54 53 52 R72 R00/SCK R01/SI R02/SO R03/TOC TEST RESET OSC1 OSC2 GND X1 X2 AVSS R30/AN0 R31/AN1 R32/AN2 R33/AN3 R40/AN4 R41/AN5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33
FP-64B
R11 R10 R93 R92 R91 R90 R83 R82 R81 R80 D13 D12 D11 D10 D9 D8 D7 D6 D5
DP-64S
R42/AN6 R43/AN7 R50/AN8 R51/AN9 R52/AN10 R53/AN11 AVCC VCC D0/INT0 D1/INT1 D2/EVNB D3/BUZZ D4/STOPC
20 21 22 23 24 25 26 27 28 29 30 31 32
3
www.DataSheet4U.com
HD404339 Series
Pin Description
Pin Number Item Power supply Symbol VCC GND Vdisp (shared with RA1) Test Reset Oscillator TEST RESET OSC 1 12 13 14 6 7 8 I I I DP-64S 33 16 64 FP-64B 27 10 58 I/O Function Applies power voltage Connected to ground Used as a high-voltage output power supply pin when selected by the mask option
Cannot be used in user applications. Connect this pin to GND. Resets the MCU Input/output pin for the internal oscillator. Connect these pins to the ceramic or crystal oscillator, or OSC1 to an external oscillator circuit.
OSC 2 X1 X2 Port D0–D 13
15 17 18 34–47
9 11 12 28–41
O I O I/O Input/output pins addressed individually by bits; D0–D 13 are all high-voltage I/O pins. Each pin can be individually configured as selected by the mask option. One-bit high-voltage input port pin Four-bit input/output pins consisting of standard voltage pins Used with a 32.768-kHz crystal oscillator for clock purposes
RA 1
64
58 1–5, 14–25, 59–64
I I/O
R0 0–R0 3, 1–11, R3 –R7 20–31
0 2
R1 0–R2 3, 48–63 R8 0–R9 3 Interrupt Stop clear INT0, INT1 34, 35 STOPC 38 8 9 10 11 36 37
42–57
I/O
Four-bit input/output pins consisting of high voltage pins Input pins for external interrupts Input pin for transition from stop mode to active mode Serial interface clock input/output pin Serial interface receive data input pin Serial interface transmit data output pin Timer output pin Event count input pin Square waveform output pin
28, 29 32 2 3 4 5 30 31
I I I/O I O O I O
Serial interface SCK SI SO Timer TOC EVNB Alarm BUZZ
4
www.DataSheet4U.com
HD404339 Series
Pin Number Item A/D converter Symbol AVCC DP-64S 32 FP-64B 26 I/O Function Power supply for the A/D converter. Connect this pin as close as possible to the VCC pin and at the same voltage as VCC. If the power supply voltage to be used for the A/D converter is not equal to V CC, connect a 0.1-µF bypass capacitor between the AV CC and AV SS pins. (However, this is not necessary when the AV CC pin is directly connected to the VCC pin.) Ground for the A/D converter. Connect this pin as close as possible to GND at the same voltage as GND. I Analog input pins for the A/D converter
AVSS
19
13
AN 0–AN 11 20–31
14–25
5
www.DataSheet4U.com
HD404339 Series
Pin Description in PROM Mode
The HD4074339 is a PROM version of a ZTAT™ microcomputer. In PROM mode, the MCU stops operating, thus allowing the user to program the on-chip PROM.
Pin Number DP-64S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 FP-64B 59 60 61 62 63 64 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 MCU Mode Pin R6 0 R6 1 R6 2 R6 3 R7 0 R7 1 R7 2 R0 0/SCK R0 1/SI R0 2/SO R0 3/TOC TEST RESET OSC 1 OSC 2 GND X1 X2 AVSS R3 0/AN0 R3 1/AN1 R3 2/AN2 R3 3/AN3 R4 0/AN4 R4 1/AN5 R4 2/AN6 R4 3/AN7 R5 0/AN8 R5 1/AN9 R5 2/AN10 I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I I I O — I O — I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O GND O0 O1 O2 O3 O4 O5 O6 O7 I/O I/O I/O I/O I/O I/O I/O I/O GND GND VPP RESET VCC I VCC VCC PROM Mode Pin O4 O3 O2 O1 O0 I/O I/O I/O I/O I/O I/O
6
www.DataSheet4U.com
HD404339 Series
Pin Number DP-64S 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 FP-64B 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 MCU Mode Pin R5 3/AN11 AVCC VCC D0 /INT0 D1 /INT1 D2 /EVNB D3 /BUZZ D4 /STOPC D5 D6 D7 D8 D9 D10 D11 D12 D13 R8 0 R8 1 R8 2 R8 3 R9 0 R9 1 R9 2 R9 3 R1 0 R1 1 R1 2 R1 3 R2 0 R2 1 R2 2 R2 3 RA 1/V disp I/O I/O — — I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I/O I A5 A6 A7 A8 A0 A10 A11 A12 I I I I I I I I CE OE A13 A14 I I I I A3 A4 A9 VCC I I I VCC VCC M0 M1 A1 A2 I I I I PROM Mode Pin I/O
Notes: 1. I/O: Input/output pin; I: Input pin; O: Output pin 2. O0 to O 4 consist of two pins each. Tie each pair together before using them.
7
www.DataSheet4U.com
HD404339 Series
Block Diagram
STOPC RESET
OSC1
OSC2
TEST
GND
VCC
X1
X2
D0 INT0 Interrupt control INT1 System control RAM (512 × 4 bits) D port D1 D2 D3 D4 D5 D6 D7 D8 D9 X (4 bits) D10 D11 D12 D13 R0 port EVNB Timer B SPX (4 bits) Y (4 bits) TOC Timer C Internal data bus Internal address bus R00 R01 R02 R03 R10 R11 R12 R13 R20 R21 R22 R23 R30 R31 R32 R33 R40 R41 R42 R43 R50 R51 R52 R53 R60 R61 R62 R63 R70 R71 R72 R80 R81 R82 R83 R90 R91 R92 R93 RA1
Timer A
W (4 bits)
SI SO SCK Serial interface
AV SS
AN 0
• • • AN11
A/D converter
ST (1 bit)
CA (1 bit)
B (4 bits) BUZZ Buzzer SP (10 bits) Data bus Instruction decoder PC (14 bits)
Directional signal line
8
RA port
ROM (16,384 × 10 bits) (6,144 × 10 bits) (12,288 × 10 bits) (4,096 × 10 bits) (8,192 × 10 bits)
R9 port
High voltage pin
R8 port
R7 port
R6 port
AVCC
A (4 bits)
R5 port
• • •
R4 port
ALU
R3 port
R2 port
SPY (4 bits)
Internal data bus
R1 port
www.DataSheet4U.com
HD404339 Series
Memory Map
ROM Memory Map Vector Address Area ($0000–$000F): Reserved for JMPL instructions that branch to the start addresses of the reset and interrupt routines. Zero-Page Subroutine Area ($0000–$003F): Reserved for subroutines. The program branches to a subroutine in this area in response to the CAL instruction. Pattern Area ($0000–$0FFF): Contains ROM data that can be referenced with the P instruction. Program Area ($0000-$0FFF (HD404334), $0000-$17FF (HD404336), $0000–$1FFF (HD404338), $0000–$2FFF (HD4043312), $0000–$3FFF (HD404339, HD4074339)): The entire ROM area can be used for program coding.
$0000 $000F $0010 Zero-page subroutine (64 words) $003F $0040 $0FFF $1000 $17FF $1800 $1FFF $2000 HD4043312 Program (12,288 words) $2FFF $3000 HD404339, HD4074339 Program (16,384 words) $3FFF Pattern (4,096 words) HD404334 Program (4,096 words) HD404336 Program (6,144 words) HD404338 Program (8,192 words) Vector address (16 words)
$0000 JMPL instruction $0001 (jump to RESET, STOPC routine) JMPL instruction $0002 (jump to INT 0 routine) $0003 JMPL instruction $0004 (jump to INT 1 routine) $0005 JMPL instruction $0006 (jump to timer A routine) $0007 $0008 JMPL instruction (jump to timer B routi