background image

3-22

Interrupt Servicing

Register R(1) is always used as the program counter when-
ever interrupt servicing is initiated. When an interrupt
request occurs and the interrupt is allowed by the program
(again, nothing takes place until the completion of the cur-
rent instruction), the contents of the X and P registers are
stored in the temporary register T, and X and P are set to
new values; hex digit 2 in X and hex digit 1 in P. Interrupt
Enable is automatically deactivated to inhibit further inter-
rupts. The user's interrupt routine is now in control; the con-
tents of T may be saved by means of a single instruction (78)
in the memory location pointed to by R(X). At the conclusion
of the interrupt, the user's routine may restore the pre-inter-
rupted value of X and P with a single instruction (70 or 71).
The Interrupt Enable flip-flop can be activated to permit fur-
ther interrupts or can be disabled to prevent them.

CPU Register Summary

CDP1802 Control Modes

The WAIT and CLEAR lines provide four control modes as
listed in the following truth table:

The function of the modes are defined as follows:

Load

Holds the CPU in the IDLE execution state and allows an I/O
device to load the memory without the need for a “bootstrap”
loader. It modifies the IDLE condition so that DMA-lN opera-
tion does not force execution of the next instruction.

Reset

Registers l, N, Q are reset, lE is set and 0’s (VSS) are placed on
the data bus. TPA and TPB are suppressed while reset is held
and the CPU is placed in S1. The first machine cycle after ter-
mination of reset is an initialization cycle which requires 9 clock
pulses. During this cycle the CPU remains in S1 and register X,
P, and R(0) are reset. Interrupt and DMA servicing are sup-

pressed during the initialization cycle. The next cycle is an S0,
S1, or an S2 but never an S3. With the use of a 71 instruction
followed by 00 at memory locations 0000 and 0001, this feature
may be used to reset IE, so as to preclude interrupts until ready
for them. Power-up reset can be realized by connecting an RC
network directly to the CLEAR pin, since it has a Schmitt trig-
gered input, see Figure 24.

Pause

Stops the internal CPU timing generator on the first negative
high-to-low transition of the input clock. The oscillator contin-
ues to operate, but subsequent clock transitions are ignored.

Run

May be initiated from the Pause or Reset mode functions. If
initiated from Pause, the CPU resumes operation on the first
negative high-to-low transition of the input clock. When initi-
ated from the Reset operation, the first machine cycle follow-
ing Reset is always the initialization cycle. The initialization
cycle is then followed by a DMA (S2) cycle or fetch (S0) from
location 0000 in memory.

Run-Mode State Transitions

The CPU state transitions when in the RUN and RESET
modes are shown in Figure 25. Each machine cycle requires
the same period of time, 8 clock pulses, except the initializa-
tion cycle, which requires 9 clock pulses. The execution of
an instruction requires either two or three machine cycles,
S0 followed by a single S1 cycle or two S1 cycles. S2 is the
response to a DMA request and S3 is the interrupt response.
Table 2 shows the conditions on Data Bus and Memory
Address lines during all machine states.

Instruction Set

The CPU instruction summary is given in Table 1. Hexadeci-
mal notation is used to refer to the 4-bit binary codes.

In all registers bits are numbered from the least significant bit
(LSB) to the most significant bit (MSB) starting with 0.

R(W): Register designated by W, where

W = N or X, or P

R(W).0: Lower order byte of R(W)

R(W).1: Higher order byte of R(W)

Operation Notation

M(R(N)) 

→ 

D; R(N) + 1 

 R(N)

This notation means: The memory byte pointed to by R(N) is

D

8 Bits

Data Register (Accumulator)

DF

1-Bit

Data Flag (ALU Carry)

B

8 Bits

Auxiliary Holding Register

R

16 Bits

1 of 16 Scratchpad Registers

P

4 Bits

Designates which register is Program Counter

X

4 Bits

Designates which register is Data Pointer

N

4 Bits

Holds Low-Order Instruction Digit

I

4 Bits

Holds High-Order Instruction Digit

T

8 Bits

Holds old X, P after Interrupt (X is high nibble)

lE

1-Bit

Interrupt Enable

Q

1-Bit

Output Flip-Flop

CLEAR

WAIT

MODE

L

L

LOAD

L

H

RESET

H

L

PAUSE

H

H

 RUN

CLEAR

V

CC

R

S

C

CDP1802

3

THE RC TIME CONSTANT
SHOULD BE GREATER THAN
THE OSCILLATOR START-UP
TIME (TYPICALLY 20ms)

FIGURE 24. RESET DIAGRAM

CDP1802A, CDP1802AC, CDP1802BC

Содержание CDP1802ACD

Страница 1: ...m flexibility and minimum cost can be realized The 1800 series CPU also provides a synchro nous interface to memories and external controllers for I O devices and minimizes the cost of interface contr...

Страница 2: ...TPA TPB MA7 MA6 MA5 MA4 MA3 MA2 MA1 MA0 EF1 EF2 EF3 EF4 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 1 2 3 4 5 6 26 25 24 23 22 21 20 19 18 7 8 9 10 11 12 13 14 15 16 17 SC0 MRD BUS 7 BUS 6 B...

Страница 3: ...F 1 R F 0 R E 0 REGISTER ARRAY 8 BIT BIDIRECTIONAL DATA BUS LATCH AND DECODE R X T P I N N1 N0 N2 I O COMMANDS BUS 0 BUS 1 BUS 2 BUS 3 BUS 4 BUS 5 BUS 6 BUS 7 TO INSTRUCTION DECODE CONTROL AND TIMING...

Страница 4: ...ion is not implied Recommended Operating Conditions TA 40oC to 85oC For maximum reliability operating conditions should be selected so that operation is always within the following ranges PARAMETER TE...

Страница 5: ...0 5 5 0 0 1 0 0 1 V Low Level VOL 0 10 10 0 0 1 V Output Voltage 0 5 5 4 9 5 4 9 5 V High Level VOH 0 10 10 9 9 10 V Input Low Voltage VIL 0 5 4 5 5 1 5 1 5 V 0 5 4 5 5 10 1 V 1 9 10 3 V Input High Vo...

Страница 6: ...850 475 525 ns 5 10 400 600 ns 10 10 300 400 ns Clock to Memory Low Address Byte Valid tPLH tPHL 5 5 250 350 175 250 ns 5 10 150 250 ns 10 10 100 150 ns Clock to MRD tPHL 5 5 200 300 175 275 ns 5 10 1...

Страница 7: ...s 5 10 100 125 ns 10 10 75 100 ns DMA Set Up tSU 5 5 0 30 0 30 ns 5 10 0 20 ns 10 10 0 10 ns DMA Hold tH Note 2 5 5 150 250 100 150 ns 5 10 100 200 ns 10 10 75 125 ns Interrupt Set Up tSU 5 5 75 0 75...

Страница 8: ...NS CDP1802A CDP1802AC CDP1802BC UNITS VCC V VDD V MIN NOTE 1 TYP MIN NOTE 1 TYP High Order Memory Address Byte Set Up to TPA Time tSU 5 5 2T 550 2T 400 2T 325 2T 275 ns 5 10 2T 350 2T250 ns 10 10 2T 2...

Страница 9: ...s as a function of T T 1 fCLOCK at TA 40 to 85oC Except as Noted PARAMETERS SYMBOL TEST CONDITIONS CDP1802A CDP1802AC CDP1802BC UNITS VCC V VDD V MIN NOTE 1 TYP MIN NOTE 1 TYP Timing Waveforms FIGURE...

Страница 10: ...A INTERRUPT EF 1 4 WAIT CLEAR REQUEST REQUEST BUS TO CPU N0 N1 N2 STATE DATA FROM CPU TO BUS MEMORY WRITE CYCLE MEMORY ADDRESS READ CYCLE CODES CYCLE tW 00 10 20 30 40 50 60 70 00 01 11 21 31 41 51 61...

Страница 11: ...RESS HIGH ADD MEMORY READ CYCLE NON MEMORY CYCLE MEMORY READ CYCLE INSTRUCTION MRD MWR HIGH MEMORY OUTPUT FETCH S0 EXECUTE S1 FETCH S0 EXECUTE ALLOWABLE MEMORY ACCESS VALID OUTPUT VALID OUTPUT DON T C...

Страница 12: ...S0 EXECUTE S1 FETCH S0 EXECUTE MEMORY OUTPUT ALLOWABLE MEMORY ACCESS VALID OUTPUT VALID OUTPUT MRD MWR HIGH DON T CARE OR INTERNAL DELAYS HIGH IMPEDANCE STATE VALID OUTPUT MEMORY OUTPUT ALLOWABLE MEMO...

Страница 13: ...FROM INPUT DEVICE N 9 F EXECUTE S1 CYCLE n 1 CYCLE n FETCH S0 NOTE 1 DON T CARE OR INTERNAL DELAYS HIGH IMPEDANCE STATE NOTE 1 USER GENERATED SIGNAL 0 CLOCK 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 TPA TPB MA...

Страница 14: ...RNAL DELAYS HIGH IMPEDANCE STATE NOTE 1 USER GENERATED SIGNAL VALID DATA FROM INPUT DEVICE CYCLE n FETCH S0 CYCLE n 1 EXECUTE S1 CYCLE n 2 DMA S2 VALID OUTPUT 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4...

Страница 15: ...TERRUPT S3 EXECUTE S1 FETCH S0 MRD MWR INTERRUPT MEMORY OUTPUT VALID OUTPUT NOTE 1 MEMORY READ CYCLE MEMORY READ WRITE NON MEMORY CYCLE OR NON MEMORY CYCLE DON T CARE OR INTERNAL DELAYS HIGH IMPEDANCE...

Страница 16: ...200 t THL t TLH TRANSITION TIME ns CL LOAD CAPACITANCE pF TA 25o C VCC VDD 10V VCC VDD 5V VCC VDD 5V VCC VDD 10V tTLH tTHL VGS GATE TO VOLTAGE 5V TA AMBIENT TEMPERATURE 40o C TO 85o C 10V VDS DRAIN T...

Страница 17: ...he conditional branch instructions They can be used in con junction with the INTERRUPT request line to establish inter rupt priorities These flags can also be used by I O devices to call the attention...

Страница 18: ...common data input and output bus If a memory does not have a three state high impedance output MRD is useful for driving memory bus separator gates It is also used to indicate the direction of data t...

Страница 19: ...he program counter for the user s interrupt servicing routine After reset and during a DMA operation R 0 is used as the program counter At all other times the register designated as pro gram counter i...

Страница 20: ...a Schmitt trig gered input see Figure 24 Pause Stops the internal CPU timing generator on the first negative high to low transition of the input clock The oscillator contin ues to operate but subsequ...

Страница 21: ...A X AND DECREMENT STXD 73 D M R X R X 1 R X REGISTER OPERATIONS INCREMENT REG N INC 1N R N 1 R N DECREMENT REG N DEC 2N R N 1 R N INCREMENT REG X IRX 60 R X 1 R X GET LOW REG N GLO 8N R N 0 D PUT LOW...

Страница 22: ...T DF DF D SUBTRACT D WITH BORROW IMMEDIATE SDBl 7D M R P D Not DF DF D R P 1 R P SUBTRACT MEMORY SM F7 D M R X DF D SUBTRACT MEMORY IMMEDIATE SMl FF D M R P DF D R P 1 R P SUBTRACT MEMORY WITH BORROW...

Страница 23: ...NCH IF DF 1 LBDF C3 lF DF 1 M R P R P 1 M R P 1 R P 0 ELSE R P 2 R P LONG BRANCH IF DF 0 LBNF CB IF DF 0 M R P R P 1 M R P 1 R P 0 ELSE R P 2 R P LONG BRANCH IF Q 1 LBQ C1 IF Q 1 M R P R P 1 M R P 1 R...

Страница 24: ...R X 1 R X N LINES 4 OUTPUT 5 OUT 5 65 M R X BUS R X 1 R X N LINES 5 OUTPUT 6 OUT 6 66 M R X BUS R X 1 R X N LINES 6 OUTPUT 7 OUT 7 67 M R X BUS R X 1 R X N LINES 7 INPUT 1 INP 1 69 BUS M R X BUS D N...

Страница 25: ...first byte specifies the condition to be tested and the second specifies the branching address The short branch instruction can a Branch unconditionally b Test for D 0 or D 0 c Test for DF 0 or DF 1 d...

Страница 26: ...5 0 F STR D MRN D RN 1 0 0 Fig 7 6 0 IRX RX 1 RX MRX RX 0 1 0 Fig 7 6 1 OUT 1 MRX BUS RX 1 RX MRX RX 0 1 1 Fig 11 2 OUT 2 2 Fig 11 3 OUT 3 3 Fig 11 4 OUT 4 4 Fig 11 5 OUT 5 5 Fig 11 6 OUT 6 6 Fig 11...

Страница 27: ...0 1 0 Fig 9 2 Not Taken RP 1 RP M RP 1 RP 1 0 1 0 Fig 9 S1 1 5 6 7 C D E F Long Skip Taken RP 1 RP MRP RP 0 1 0 Fig 9 2 Taken RP 1 RP M RP 1 RP 1 0 1 0 Fig 9 S1 1 Not Taken No Operation MRP RP 0 1 0 F...

Страница 28: ...rip ple or ground noise any of these conditions must not cause VDD VSS to exceed the absolute maximum rating Input Signals To prevent damage to the input protection circuit input signals should never...

Отзывы: