Microprocessors & Microcontrolers: H. Sabaghian B
Microprocessors & Microcontrolers: H. Sabaghian B
hsabaghianb @ kashanu.ac.ir
Microprocessors
Text Books
Microcontroller 8051 Author: Mohammad ali Mazidi Translator: Dr. Sepidnam
The 8051 Microcontroller Author: Iscott Makenzi Translator: Dr. Seyed Razi Edition : 3
hsabaghianb @ kashanu.ac.ir
Microprocessors
Introduction
Lec note 1
hsabaghianb @ kashanu.ac.ir
Microprocessors
outline
Microprocessor Micro-computer Microcontroller 3_Bus (Data, Address, Control) I/O Memory
hsabaghianb @ kashanu.ac.ir
Microprocessors
Microprocessor (P)(MPU)
P = CPU on a single chip Components of CPU
Registers: Temporary storage locations for program instruction or data. The Arithmetic Logic unit (ALU): performs both arithmetic and logical operations Timing and Control Circuits: keeps all working
hsabaghianb @ kashanu.ac.ir
Microprocessors
Microprocessor
Microprocessor=P=MPU Tasks
processing data controlling all components make P the Computer system
hsabaghianb @ kashanu.ac.ir
Microprocessors
Microcomputers
Micro-computer (-Computer) small computer specifically for data acquisition and control applications
hsabaghianb @ kashanu.ac.ir
Microprocessors
Microcomputers
All Microcomputers consist of (at least) :
Microprocessor Unit (P) Program Memory (ROM) Data Memory (RAM) Input / Output ports (IO) Bus System (External) (and Software)
hsabaghianb @ kashanu.ac.ir
Microprocessors
hsabaghianb @ kashanu.ac.ir
Microprocessors
Bus
A common communications pathway that carry information between the various elements of system The term BUS refers to
a group of wires or conduction tracks on a printed circuit board (PCB)
though which binary information is transferred Subsystems are connected through BUS together
hsabaghianb @ kashanu.ac.ir
Microprocessors
3_Bus
There are three main bus grouPs
ADDRESS BUS DATA BUS CONTROL BUS
hsabaghianb @ kashanu.ac.ir
Microprocessors
Data Bus
The Data Bus carries the data which is transferred throughout the system. ( bi-directional) Examples of data transfers
Program instructions being read from memory into MPU. Data being sent from MPU to I/O port Data being read from I/O port going to MPU Results from MPU sent to Memory
hsabaghianb @ kashanu.ac.ir
Microprocessors
Address Bus
Address = binary number that identifies a specific memory storage location or I/O port involved in a data transfer
Address Bus = pathway transmit address to memory or I/O port. Address Bus is unidirectional (one way): addresses are always issued by the MPU
hsabaghianb @ kashanu.ac.ir Microprocessors
Control Bus
Control Bus = grouP of control signals Control signals are unidirectional, and are mainly outputs from the MPU. provide synchronization (timing control) between MPU and other components. Example
RD: (read signal) read data into MPU WR: (write signal) write data from MPU
Microprocessors
hsabaghianb @ kashanu.ac.ir
Main memory
Memory
Stores programs Provides data to the MPU Accepts result from the MPU for storage
Read-Only Memory
P can read instructions from ROM quickly Cannot write new data to the ROM ROM remembers the data, even after power cycled When power is turned on, the microprocessor will start fetching instructions from ROM (bootstrap )
hsabaghianb @ kashanu.ac.ir
Microprocessors
Available ROMs
Masked ROM or just ROM PROM or programmable ROM(once only) EPROM (erasable via ultraviolet light) =UVROM Flash
re-writable about 10000 times usually must write a whole block not just 1 or 2 bytes, slow writing fast reading
ROM
m+1 bit Address
A0 A1 A2 Am
D0 D1 D2
Capacity :
m 1
2m1 (n 1)
ROM PROM EEPROM
Dn
OE : Output Enable
CE (CS )
CE
OE
hsabaghianb @ kashanu.ac.ir
Microprocessors
D0-Dn
CE
OE
OE falls to data valid Addr valid to data valid
hsabaghianb @ kashanu.ac.ir
Microprocessors
27XX EPROM
U3 10 9 8 7 6 5 4 3 25 24 21 23 2 22 27 20 1 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 OE PGM CE VPP O0 O1 O2 O3 O4 O5 O6 O7 11 12 13 15 16 17 18 19
U1 8 7 6 5 4 3 2 1 23 22 19 20 18 21 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 OE CE VPP O0 O1 O2 O3 O4 O5 O6 O7 9 10 11 13 14 15 16 17
16 kbit 2 kbyte
2716
2732
32 kbit 4 kbyte
2764
64 kbit 8 kbyte
27XXX EPROM
U7
12 11 10 9 8 7 6 5 27 26 23 25 4 28 29 3 2 24 31 22 1
D0 D1 D2 D3 D4 D5 D6 D7
13 14 15 17 18 19 20 21
27128
27256
27512
27010
hsabaghianb @ kashanu.ac.ir
28XX E2PROM
12 11 10 9 8 7 6 5 27 26 23 25 4 28 29 3 2 24 31 22 32 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 OE WE CE VCC D0 D1 D2 D3 D4 D5 D6 D7 13 14 15 17 18 19 20 21
8 7 6 5 4 3 2 1 23 22 19 20 21 18 24
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 OE WE CE VCC
9 10 11 13 14 15 16 17
10 9 8 7 6 5 4 3 25 24 21 23 2 22 27 20 28
A0 I/O0 A1 I/O1 A2 I/O2 A3 I/O3 A4 I/O4 A5 I/O5 A6 I/O6 A7 I/O7 A8 A9 RDY /BUSY A10 A11 A12 OE WE CE VCC
11 12 13 15 16 17 18 19 1
10 9 8 7 6 5 4 3 25 24 21 23 2 26 1 22 27 20 28
D0 D1 D2 D3 D4 D5 D6 D7
11 12 13 15 16 17 18 19
12 11 10 9 8 7 6 5 27 26 23 25 4 28 29 3 2 30 1 24 31 22 32
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 A15 A16 A17 A18 OE WE CE VCC
D0 D1 D2 D3 D4 D5 D6 D7
13 14 15 17 18 19 20 21
2816
16 kbit 2 kbyte
64 kbit 8 kbyte
2864
28256
256 kbit 32 kbyte
28010
28040
hsabaghianb @ kashanu.ac.ir
Microprocessors
hsabaghianb @ kashanu.ac.ir
Microprocessors
RAM(Static)
A0 A1
m+1 bit Address
D0 D1 D2
A2 Am
Capacity :
m 1
2m1 (n 1)
RAM
Dn
CS
WR
RD
Microprocessors
Static RAM
hsabaghianb @ kashanu.ac.ir
Microprocessors
Dynamic RAM
hsabaghianb @ kashanu.ac.ir
Microprocessors
Dynamic RAM
Write : Charge bitline HIGH or LOW and set wordline HIGH
Read : Bit line is precharged to a voltage halfway between HIGH and LOW and then the word line is set HIGH. Sense Amp Detects change Reads are destructive (Must follow with a write) Address Buffer
hsabaghianb @ kashanu.ac.ir
Microprocessors