Advanced Hardware Fundamentals
Advanced Hardware Fundamentals
Advanced Hardware
Fundamentals
CLOCK1
WRITE/
CLOCK2 Pulses low when it
want to write data
Clock Signal 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)
...
ROM
... 32K
D7
A15 D7
CPU
A14 • READ/ - OE/ (Output enable)
CE/
A15 OE/ • WRITE/ - WE/
READ/
Clock
circuit
A0 D1
• Address Bus
A1 D2
A2
- Group of address signals
WRITE/ ... RAM ...
D7 • Data Bus
A14
WE/
CE/
• A15 signals
A15
A15
I/O
D2
A2 D2 A2
D7
A7 D7
WE/
WE/
OE/
OE/
CE/
CE/
A19 A19
bus cycle as
needed.
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
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
IRQ(Interrupt Request)
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 LEDs on or off
Resetting a watchdog timer
Reading from a one-pin or two-pin EEPROM
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