Professional Documents
Culture Documents
Advanced Hardware
Fundamentals
R E AD/
A2 D2
CLOCK1
WR ITE /
CLOCK2 Pulses low when it
want to write data
Clock S ignal Input
Fig. 3.1 A Very Basic Microprocessor
3.1 Microprocessors(cont.)
Microprocessor and microcontroller
Microprocessor =
small and slow microprocessor
+ limited or no capability for using RAM and ROM
+ pins
( pins can be set high or low or sensed directly by
software)
• WRITE/ - WE/
A14
CE/
OE/
Clock
READ/
A15
• Address Bus
circuit
A0
A1
D1
D2
- Group of address signals
A2
WRITE/ RAM
• Data Bus
... ...
A14
D7
- Group of data signals
WE/
OE/
CE/
• A15 signals
- Decide which of two chips-
ROM or ROM
A15
A15
READ/
WRITE/
device
low low MEMEN/ 0x00000-0x7ffff
high High DV1 0x80000-0x800ff
Low High DV2 0x80000-0x80007
D0
A0 D0 A0
D1
A1 D1 A1
...
D2
A2 D2 A2
D7
A7 D7
WE/
WE/
OE/
OE/
CE/
CE/
A19 A19
WAIT
T1 T2 Tw T3
Clock
A0-An
D0-Dn
READ/
Two Problem
1. DMA can’t drive address and data signal at the same
time as the microprocessor is driving those signals
2. How does the DMA know when it should transfer a
second byte?
WRITE
I/O RE AD Memory
3.3 Direct Memory Access(cont.)
Problem 1
Address bus, READ/ and WRITE/
DMAREQ
DMAACK
Micro
RAM
Processor
BUSACK
BUSREQ BUSACK
WRITE/
Address
Address driven by DMA
DMA I/O
DMAACK
Data
BUSREQ
Micro
RAM
Processor
WRITE/
BUSREQ BUSACK
READ/
DMA I/O
Data
IR Q(Interrupt R equest)
The signal tells the microprocessor that it is time to
run the interrupt routine
3.4 Interrupts(cont.)
I/O A
I/O B
I/O C
CPU
I/O D
IRQ0/
IRQ1/
IRQ2
A0
A1
A2
Driver/
Receiver
D0
D1
D2 UART
D7 Connector
IRQ/
WE/
OE/
Clock
circuit
CPU RAM
A15
A14
UART
RAMCE/
CLK
PAL ROM
UARTCE/
WAIT ROMCE/
Wait := (RomCe + UartCe) * !Wait2 // output signal change as soon as input signals change
Wait2 := Wait * !Wait2
end AddrDeode
3.5 Other Common Parts(cont.)
Wait := (RomCe + UartCe) * !Wait2
Wait2 := Wait * !Wait2
iClk
A15
A14
RomCe/
Wait
Wait2
RomCe/ changs
immediately when
A14 and A15 change.
Wait and Wait2 changes only
On rising edges of iClk.
Glue
circuit
Microprocessor
RESET/
Watchdog
RESET/ RESTART
DMA
Since a DMA channel and the microprocessor
contend for the bus, certain process are simplified
3.6 Built-Ins on the
Microprocessor(cont.)
I/O pins
Used for any number of purposes
Turning LE Ds on or off
Resetting a watchdog timer
Reading from a one-pin or two-pin E E PR OM
Address Decoding
A handful of chip enable output pins that can be
connected directly to the other chips
Memory Caches and Instruction Pipelines
Caches : small, extremely fast memory
Instruction Pipelines : a kind of caches for instruction.
3.6 Built-Ins on the Microprocessor(cont.)
EEROM EECLK
EEDATA
I/OA0
I/OA1
EEENABLE/
I/OA2
I/OA3
EEWRITE/
I/OB0
I/OB1
GREEN0
I/OB2
RED GREEN1
I/OB3
Watchdog
RESTART