IA6805E2 Microprocessor Unit FEATURES
• • • • • • • • • • •
Data Sheet
As of Production Version 00
Form, Fit, and Function Compatible with the Harris © CDP6805E2CE and Motorola © MC146805E2 Internal 8-bit Timer with 7-Bit Programmable Prescaler On-chip Clock Memory Mapped I/O Versatile Interrupt Handling True Bit Manipulation Bit Test and Branch Instruction Vectored Interrupts Power-saving STOP and WAIT Modes Fully Static Operation 112 Bytes of RAM
The IA6805E2 is a "plug-and-play" drop-in replacement for the original IC. innovASIC produces replacement ICs using its MILESTM , or Managed IC Lifetime Extension System, cloning technology. This technology produces replacement ICs far more complex than "emulation" while ensuring they are compatible with the original IC. MILESTM captures the design of a clone so it can be produced even as silicon technology advances. MILESTM also verifies the clone against the original IC so that even the "undocumented features" are duplicated. This data sheet documents all necessary engineering information about the IA6805E2 including functional and I/O descriptions, electrical characteristics, and applicable timing.
Package Pinout
RESET_N
RW_N
OSC1
VDD
IRQ_N LI DS RW_N AS PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 A12 A11 A10 A9 A8 VSS
40 Pin DIP
(3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20)
(38) (37) (36) (35) (34) (33) (32) (31) (30) (29) (28) (27) (26) (25) (24) (23) (22) (21)
OSC2 (6) (5) (4) (3) (2) (1) (44) (43) (42) (41) (40) TIMER PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 B0 B1 B2 B3 B4 B5 A12 A11 A10 A9 A8 B7 B6 B5 VSS B4 B6 B7 NC AS PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 NC NC (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) (18) (19) (20) (21) (22) (23) (24) (25) (26) (27) (28)
LI
(2)
(39)
OSC1
PB0 (39) (38)
NC
DS
IA6805E2
OSC2
RESET_N
(1)
(40)
VDD
TIMER
IRQ_N
PB1 PB2 PB3 PB4 PB5 PB6 PB7 B0 B1 B2 B3
IA6805E2 44 Pin LCC
(37) (36) (35) (34) (33) (32) (31) (30) (29)
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 1 of 31
IA6805E2 Microprocessor Unit Description
Data Sheet
As of Production Version 00
The IA6805E2 (CMOS) Microprocessor Unit (MPU) is a low cost, low power MPU. It features a CPU, on-chip RAM, parallel I/O compatibility with pins programmable as input or output. The following paragraphs will further describe this system block diagram and design in more detail.
TIMER
PRESCALER
TIMER/ COUNTER
OSC1
OSC2 RESET_N
TIMER CONTROL
OSCILLATOR
LI IRQ_N
PA0 B0 ACCUMULATOR 8 PORT A REG DATA DIR REG INDEX REGISTER 8 X CONDITION CODE REGISTER 5 CC STACK POINTER 6 SP PROGRAM COUNTER HIGH 5 PCH PROGRAM COUNTER LOW 8 PCL ALU ADDRESS DRIVE A CPU CONTROL MUX BUS DRIVE B1 B2 B3 B4 B5 B6 B7 MULTIPLEXED ADDRESS DATA BUS
PA0 PA1 PA2 PORT A I/O LINES PA3 PA4 PA5 PA6 PA7
CPU
PB0 PB1 PB2 PORT B I/O LINES PB3 PB4 PB5 PB6 PB7 PORT B REG DATA DIR REG
A8 A9 A10 A11 A12 ADDRESS BUS
AS 112x8 RAM BUS CONTROL DS RW_N ADDRESS STROBE DATA STROBE READ/WRITE
Figure 1. System Block Diagram
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 2 of 31
IA6805E2 Microprocessor Unit
I/O Signal Description
Data Sheet
As of Production Version 00
The table below describes the I/O characteristics for each signal on the IC. The signal names correspond to the signal names on the pinout diagrams provided.
SIGNAL NAME I/O
N/A I I
DESCRIPTION
Source: These t w o pins provide power to the chip. V D and V SS is ground.
D
V D D a n d V SS (Power and Ground) RESET_n (Reset) IRQ_n (Interrupt Request) LI (Load Instruction)
provides + 5 volts (±0.5) p o w e r
T T L : I n p u t pin t h a t c a n b e u s e d t o r e s e t t h e M P U ' s i n t e r n a l s t a t e b y p u l l i n g t h e r e s e t _ n pin low. T T L : I n p u t pin t h a t i s l e v e l a n d e d g e s e n s i t i v e . C a n b e u s e d t o r e q u e s t a n i n t e r r u p t sequence. T T L w i t h s l e w r a t e c o n t r o l : O u t p u t pin u s e d to i n d i c a t e t h a t a n e x t o p c o d e f e t c h i s in p r o g r e s s . U s e d o n l y f o r c e r t a i n d e b u g g i n g a n d t e s t s y s t e m s . N o t c o n n e c t e d in n o r m a l o p e r a t i o n . O v e r l a p s D a t a S t r o b e ( D S ) signal. T h i s o u t p u t is c a p a b l e o f d r i v i n g o n e standard TTL load and 50pF. T T L w i t h s l e w r a t e c o n t r o l : O u t p u t p i n u s e d to t r a n s f e r d a t a t o o r f r o m a p e r i p h e r a l o r m e m o r y . D S occurs a n y t i m e the M P U d o e s a d a t a read o r write a n d during data transfer t o o r f r o m i n t e r n a l m e m o r y . D S is a v a i l a b l e a t f O S C ÷ 5 w h e n t h e M P U is n o t in t h e W A I T or STOP mode. This output is capable of driving one standard TTL load and 130pF. T T L w i t h s l e w r a t e c o n t r o l : O u t p u t pin u s e d to i n d i c a t e t h e d i r e c t i o n o f d a t a t r a n s f e r from internal m e m o r y , I / O registers, and external peripheral d e v i c e s a n d m e m o r i e s . I n d i c a t e s t o a s e l e c t e d p e r i p h e r a l w h e t h e r t h e M P U i s to r e a d ( R W _ n h i g h ) o r w r i t e ( R W _ n l o w ) data o n t h e n e x t data strobe. This o u t p u t is c a p a b l e o f d r i v i n g o n e standard TTL load and 130pF. T T L w i t h s l e w r a t e c o n t r o l : O u t p u t s t r o b e u s e d to i n d i c a t e t h e p r e s e n c e o f a n a d d r e s s o n t h e 8 - b i t m u l t i p l e x e d b u s . T h e A S l i n e i s u s e d to d e m u l t i p l e x t h e e i g h t l e a s t s i g n i f i c a n t a d d r e s s bits f r o m t h e data b u s . A S is a v a i l a b l e a t f O S C ÷ 5 w h e n t h e M P U is n o t in t h e W A I T o r S T O P m o d e s . This o u t p u t is c a p a b l e o f d r i v i n g o n e s t a n d a r d T T L load a n d 130pF. T T L with s l e w rate c o n t r o l : T h e s e 1 6 l i n e s c o n s t i t u t e I n p u t / O u t p u t p o r t s A a n d B . E a c h l i n e is i n d i v i d u a l l y p r o g r a m m e d to b e e i t h e r a n i n p u t o r o u t p u t u n d e r s o f t w a r e c o n t r o l o f t h e D a t a D i r e c t i o n R e g i s t e r ( D D R ) a s s h o w n b e l o w in T a b l e 1 a n d F i g u r e 2 . T h e p o r t I / O is p r o g r a m m e d b y w r i t i n g t h e c o r r e s p o n d i n g b i t i n t h e D D R to a " 1 " f o r o u t p u t a n d a " 0 " f o r i n p u t . In t h e o u t p u t m o d e t h e b i t s a r e l a t c h e d a n d a p p e a r o n t h e c o r r e s p o n d i n g o u t p u t p i n s . A l l t h e D D R ' s a r e i n i t i a l i z e d to a " 0 " o n r e s e t . T h e o u t p u t p o r t registers a r e n o t initialized o n reset. E a c h o u t p u t is c a p a b l e o f d r i v i n g o n e s t a n d a r d TTL load and 50pF. T T L with s l e w rate control: T h e s e five outputs constitute the higher order n o n m u l t i p l e x e d a d d r e s s lines. E a c h o u t p u t is capable o f d r i v i n g o n e s t a n d a r d T T L l o a d a n d 130pF. T T L with slew rate c o n t r o l : T h e s e b i - d i r e c t i o n a l l i n e s c o n s t i t u t e t h e l o w e r o r d e r a d d r e s s e s and data. T h e s e lines are multiplexed with address present a t address s t r o b e t i m e a n d data p r e s e n t a t data s t r o b e t i m e . W h e n in t h e d a t a m o d e , t h e s e l i n e s a r e b i directional, transferring data to and from m e m o r y a n d peripheral devices a s indicated by t h e R W _ n p i n . A s o u t p u t s , these lines are capable o f driving o n e standard T T L load and 130pF. T T L : Input used to control the internal timer/counter circuitry. T T L O s c i l l a t o r i n p u t / o u t p u t : These p i n s provide c o n t r o l i n p u t f o r the on-chip clock o s c i l l a t o r c i r c u i t s . E i t h e r a c r y s t a l o r e x t e r n a l c l o c k i s c o n n e c t e d to t h e s e p i n s to p r o v i d e a s y s t e m c l o c k . T h e c r y s t a l c o n n e c t i o n i s s h o w n i n F i g u r e 3 . T h e O S C 1 to b u s transitions for system designs using oscillators slower than 5MHz is shown in Figure 4 . T h e c i r c u i t s h o w n i n F i g u r e 3 is r e c o m m e n d e d w h e n u s i n g a c r y s t a l . A n e x t e r n a l C M O S o s c i l l a t o r is r e c o m m e n d e d w h e n u s i n g c r y s t a l s o u t s i d e t h e s p e c i f i e d r a n g e s . T o m i n i m i z e o u t p u t distortion a n d start-up stabilization time, the crystal a n d c o m p o n e n t s should b e mounted as close to the input pins as possible. W h e n a n e x t e r n a l c l o c k i s u s e d , i t s h o u l d b e a p p l i e d to t h e O S C 1 i n p u t w i t h t h e O S C 2 input not connected, as shown in Figure 3 .
O
DS (Data Strobe)
O
RW_n (Read/Write)
O
AS (Address Strobe)
O
PA0-PA7/PB0-PB7 (Input/Output Lines)
I/O
A8-A12 (High Order Address Lines)
O
B0-B7 (Address/Data Bus)
I/O
Timer OSC1, OSC2 (System Clock)
I
I/O Crystal
External Clock
Table 1
Copyright © 2002 ENG21108140100 www.innovasic.com Customer Support: 1 -888-824-4184
innovASIC The End of Obsolescence™
Page 3 of 31
IA6805E2 Microprocessor Unit
I/O Pin Functions
Data Sheet
As of Production Version 00
R/W-n DDR I/O Pin Functions 0 0 The I/O pin is in input mode. Data is written into the output data latch. 0 1 Data is written into the output data latch and output to the I/O pin. 1 0 The state of the I/O pin is read. 1 1 the I/O pin is in an output mode. The output data latch is read.
I/O Port Circuitry and Register Configuration:
DATA DIRECTION REGISTER BIT TO
AND
FROM
LATCHED OUTPUT DATA BIT
OUTPUT
I/O PIN
CPU
INPUT REG BIT
INPUT I/O PIN
7
6
5
4
3
2
1
0 $0004 ($0005)
DATA DIRECTION DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 A(B) (DDB7) (DDB6) (DDB5) (DDB4) (DDB3) (DDB2) (DDB1) (DDB0) REGISTER
PORT A(B) REGISTER
$0000 ($0001)
PIN
PA7 (PB7)
PA6 (PB6)
PA5 (PB5)
PA4 (PB4)
PA3 (PB3)
PA2 (PB2)
PA1 (PB1)
PA0 (PB0)
Figure 2. PA0-PA7/PB0-PB7 (Input/Output Lines)
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 4 of 31
IA6805E2 Microprocessor Unit
Crystal Parameters Representative Frequencies:
RS max C0 C1 Q COSC1 COSC2 5.0 MHz 50Ω 8 pF 0.02 pF 50 k 15-30 pF 15-25 pF 4.0 MHz 75Ω 7 pF 0.012 pF 40 k 15-30 pF 15-25 pF
Data Sheet
As of Production Version 00
1.0 MHz 400Ω 5 pF 0.008 pF 30 k 15-40 pF 15-30 pF
Oscillator Connections:
CRYSTAL CIRCUIT L C1 38 OSC2 38 OSC2 C0 RS 39 OSC1 39 OSC1 ia6805E2 10 MΩ 38 OSC2 C OSC2 39 OSC1 C OSC1 NC CRYSTAL OSCILLATOR CONNECTIONS OSC1 OSC2
39 38 IA6805E2
tOL OSC1 PIN t tOLOL
tOH
Figure 3. OSC1, OSC2 (System Clock)
OSC1 to Bus Transitions Timing Waveforms:
OSC1
AS
DS
RW_n
A[12:8]
B[7:0] MPU READ B[7:0] MPU WRITE
MUX ADDR
MPU READ DATA*
MUX ADDR
MPU WRITE DATA
*READ DATA "LATCHED" ON DS FALL
Figure 4. OSC1, OSC2 (System Clock)
Copyright © 2002 ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 5 of 31
IA6805E2 Microprocessor Unit
Functional Description
Memory:
Data Sheet
As of Production Version 00
The MPU is capable of addressing 8192 bytes of memory and I/O registers. The locations are divided into internal memory space and external memory space as shown in Figure 5. The first 128 bytes of memory contain internal port I/O locations, timer locations, and 112 bytes of RAM. The MPU can read from or write to any of these locations. During program reads from on chip locations, the MPU accepts data only from the addressed on chip location. Any read data appearing on the input bus is ignored. The shared stack area is used during interrupts or subroutine calls. A maximum of 64 bytes of RAM is available for stack usage. The stack pointer is set to $7f at power up. The unused bytes of the stack can be used for data storage or temporary work locations, but care must be taken to prevent it from being overwritten due to stacking from an interrupt or subroutine call.
0
$0000
0 1
PORT A DATA REGISTER PORT B DATA REGISTER EXTERNAL MEMORY SPACE EXTERNAL MEMORY SPACE PORT A DATA DIRECTION REGISTER PORT B DATA DIRECTION REGISTER EXTERNAL MEMORY SPACE EXTERNAL MEMORY SPACE TIMER DATA REGISTER TIMER CONTROL REGISTER
I/O PORTS TIMER RAM
ACCESS VIA PAGE 0 DIRECT ADDRESS 127 128 $007F $0080
2 3 4 5 6 7
255 256
$00FF $0100
8 9 10
EXTERNAL MEMORY SPACE
15
EXTERNAL MEMORY SPACE (8064 BYTES)
16
63 64
RAM (112 BYTES)
TIMER INTERRUPT FROM WAIT STATE ONLY TIMER INTERRUPT INTERRUPT VECTORS 8191 EXTERNAL INTERRUPT SWI RESET
$1FF6 - $1FF7 $1FF8 - $1FF9 $1FFA - $1FFB $1FFC - $1FFD $1FFE - $1FFF 127 STACK (64 BYTES MAX)
Figure 5. Memory Map
Copyright © 2002 ENG21108140100 www.innovasic.com Customer Support: 1 -888-824-4184
innovASIC The End of Obsolescence™
Page 6 of 31
IA6805E2 Microprocessor Unit
Registers:
Data Sheet
As of Production Version 00
The following paragraphs describe the registers contained in the MPU. Figure 6 shows the programming model and Figure 7 shows the interrupt stacking order.
7 A 7 X 12 PCH 12 0 6 1 8 7 PCL
0 ACCUMULATOR 0 INDEX REGISTER 0 PROGRAM COUNTER 0 SP STACK POINTER
0
0
0
0
0
4
H I
CC N Z
0
C CONDITION CODE REGISTER CARRY/BORROW ZERO NEGATIVE INTERRUPT MASK HALF CARRY
Figure 6. Programming Model
NOTE: Since the stack pointer decrements during pushes, the PCL is stacked first, followed by PCH, etc. Pulling from the stack is in the reverse order.
STACK 1 R E T U R N 1 1 CONDITION CODE REGISTER I N T E R R U P T
ACCUMULATOR INDEX REGISTER 0 0 0 PCL PCH
INCREASING MEMORY ADDRESSES
DECREASING MEMORY ADDRESSES
UNSTACK
Figure 7. Interrupt Stacking Order
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 7 of 31
IA6805E2 Microprocessor Unit
A(Accumulator):
Data Sheet
As of Production Version 00
The accumulator is an 8-bit register used to hold operands and results of arithmetic calculations or data manipulations. X(Index Register): The index register is an 8-bit register used during the indexed addressing mode. It contains an 8-bit value used to create an effective address. The index register may also be used as a temporary storage area when not performing addressing operations. PC(Program Counter): The program counter is a 13-bit register that holds the address of the next instruction to be performed by the MPU. SP(Stack Pointer): The stack pointer is a 13-bit register that holds the address of the next free location on the stack. During an MPU reset or the reset stack pointer (RSP) instruction, the stack pointer is set to location $007f. The seven most significant bits of the stack pointer are permanently set to 0000001. They are appended to the six least significant register bits to produce an address range down to location $0040. The stack pointer gets decremented as data is pushed onto the stack and incremented as data is removed from the stack. The stack area of RAM is used to store the return address on subroutine calls and the machine state during interrupts. The maximum number of locations for the stack pointer is 64 bytes. If the stack goes beyond this limit the stack pointer wraps around and points to its upper limit thereby losing the previously stored information. Subroutine calls use 2 bytes of RAM on the stack and interrupts use 5 bytes. CC(Condition code Register): The condition code register is a 5-bit register that indicates the results of the instruction just executed. The bit is set if it is high. A program can individually test these bits and specific actions can be taken as a result of their states. Following is an explanation of each bit. C(Carry Bit): The carry bit indicates that a carry or borrow out of the Arithmetic Logical Unit (ALU) occurred during the last arithmetic instruction. This bit is also modified during bit test, shift, rotate, and branch types of instructions. Z(Zero Bit): The zero bit indicates the result of the last arithmetic, logical, or data manipulation was zero.
N(Negative Bit):
The negative bit indicates the result to the last arithmetic, logical, or data manipulation was negative (bit 7 in the result is high).
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 8 of 31
IA6805E2 Microprocessor Unit
I(Interrupt Mask Bit)
Data Sheet
As of Production Version 00
The interrupt mask bit indicates that both the external interrupt and the timer interrupt are disabled (masked). If an interrupt occurs while this bit is set, the interrupt is latched and is processed as soon as the interrupt bit is cleared. H(Half Carry Bit) The half carry bit indicates that a carry occurred between bits 3 and 4 of the ALU during an ADD or ADC operation.
Resets: The MPU can be reset by initial power up or by the external reset pin (reset_n). POR(Power On Reset) Power on reset occurs on initial power up. It is strictly for power initialization conditions and should not be used to detect drops in the power supply voltage. There is a 1920 tCYC time out delay from the time the oscillator is detected. If the reset_n pin is still low at the end of the delay, the MPU will remain in the reset state until the external pin goes high. Reset_n The reset_n pin is used to reset the MPU. The reset pin must stay low for a minimum of tcyc to guarantee a reset. The reset_n pin is provided with a Schmitt Trigger to improve noise immunity capability. Interrupts: The MPU can be interrupted with the external interrupt pin (irq_n), the internal timer interrupt request, or the software interrupt instruction. When any of these interrupts occur, normal processing is suspended at the end of the current instruction execution. The processor registers are saved on the stack (stacking order shown in Figure 7) and the interrupt mask (I) is set to prevent additional interrupts. Normal processing resumes after the RTI instruction causes the register contents to be recovered from the stack. When the current instruction is completed, the processor checks all pending hardware interrupts and if unmasked (I bit clear) proceeds with interrupt processing. Otherwise, the next instruction is fetched and executed. Masked interrupts are latched for later interrupt service. External interrupts hold higher priority than timer interrupts. At the end of an instruction execution, if both an external interrupt and timer interrupt are pending, the external interrupt is serviced first. The SWI gets executed with the same priority as any other instruction if the hardware interrupts are masked (I bit set). Figure 8 shows the Reset and Interrupt processing flowchart.
Copyright © 2002
ENG21108140100
innovASIC The End of Obsolescence™
www.innovasic.com Customer Support: 1 -888-824-4184
Page 9 of 31
IA6805E2 Microprocessor Unit
Data Sheet
As of Production Version 00
RESET
SET
I BIT ? CLEAR STACK PC, X, A, CC IRQ_N EDGE ? N Y CLEAR IRQ_N REQUEST LATCH IRQ_N
I_CC