Professional Documents
Culture Documents
1===========Lect1-4_microprocessor and microcontroller introduction.
1===========Lect1-4_microprocessor and microcontroller introduction.
1===========Lect1-4_microprocessor and microcontroller introduction.
Chinmayi R, ECE
Amrita School of Engineering, Amritapuri
Campus
Preface-
Digital Number System Review
Example
Binary Number: 101012
Calculating Decimal Equivalent −
Step Binary Number Decimal Number
4 3 2 1 0
Step 1 101012 ((1 × 2 ) + (0 × 2 ) + (1 × 2 ) + (0 × 2 ) + (1 × 2 ))10
Step 2 101012 (16 + 0 + 4 + 0 + 1)10
Step 3 101012 2110
1 1 1
A 1 A C D A1 10 12 13
B F C E 9 B 15 12 14 9
1 7 B 6 18 26 26 22
1
• Reference Book:
– Ramesh S. Goankar, “Microprocessor Architecture,
Programming and Applications with 8085”, 5th Edition,
Prentice Hall
• No.
– It went directly from discrete elements to a
single chip. However, comparing today’s
microprocessors to the ones built in the early
1970’s you find an extreme increase in the
amount of integration.
– Stored in memory :
• First, what is memory?
– Memory is the location where information is kept while not in
current use.
– Memory is a collection of storage devices. Usually, each storage
device holds one bit. Also, in most kinds of memory, these
storage devices are grouped into groups of 8. These 8 storage
locations can only be accessed together. So, one can only read or
write in terms of bytes to and form memory.
– Memory is usually measured by the number of bytes it can hold.
It is measured in Kilos, Megas and lately Gigas. A Kilo in
computer language is 210 =1024. So, a KB (KiloByte) is 1024
bytes. Mega is 1024 Kilos and Giga is 1024 Mega.
– Stored in memory:
• When a program is entered into a computer, it is
stored in memory. Then as the microprocessor starts
to execute the instructions, it brings the instructions
from memory one at a time.
Input Output
Memory
Control Memory
ROM RAM
6000
RAM 2 Address Range of 2nd RAM Chip
8FFF
9000
RAM 3 Address Range of 3rd RAM Chip
A3FF
A400
F7FF
FFFF
• To execute a program:
– the user enters its instructions in binary format into the
memory.
– The microprocessor then reads these instructions and
whatever data is needed from memory, executes the
instructions and places the results either in memory or
produces it on an output device.
Input/Output/
Memory
Read
Write
Address latch
Multiplexed
Enable
Address Data
Bus
Address
Bus
D7 D6 D5 D4 D3 D2 D1 D0
S Z X AC X P X CY
– Sign Flag
• Used for indicating the sign of the data in the accumulator
• The sign flag is set if negative (1 – negative)
• The sign flag is reset if positive (0 –positive)
1 00000000
• Carry Flag
– Is set if there is a carry or borrow from arithmetic operation
Initialize
Body of loop
No Is this
Final
Count?
Yes
Diagram
Instruction.
• Following Buses and Control Signals
must be shown in a Timing Diagram:
• Higher Order Address Bus.
• LowerAddress/Data bus
• ALE
• RD
• WR
• IO/M
Corresponding Coding:
A000h 78
OFC
8085 Memory
A000h 78
ALE
RD
OFC WR
IO/M
8085 Memory
Op-code fetch Cycle
Chinmayi R, ECE,ASE, Amritapuri
Stack and Subroutines
memory.
– In other words, the programmer
defines the bottom of the stack The Stack
and the stack grows up into grows
backwards
reducing address range. into memory Bottom
of the
Stack