0% found this document useful (0 votes)
75 views

Introduction To Microprocessors

- The Motorola MC6809 is a 16-bit microprocessor with a 16-bit address bus and 8-bit data bus. It has 16-bit registers, 4MHz, 6MHz, and 8MHz clock speeds, and a minimum clock frequency of 400KHz. - The MC6809's register set includes index registers X and Y, accumulators A and B that can combine into 16-bit D, program counter PC, stack pointers S and U, and condition code and direct page registers. - To build a basic computer with the MC6809, RAM, ROM, inputs and outputs are connected. Address ranges are mapped to memory chips and decoded using address lines to select

Uploaded by

noway snirfy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Introduction To Microprocessors

- The Motorola MC6809 is a 16-bit microprocessor with a 16-bit address bus and 8-bit data bus. It has 16-bit registers, 4MHz, 6MHz, and 8MHz clock speeds, and a minimum clock frequency of 400KHz. - The MC6809's register set includes index registers X and Y, accumulators A and B that can combine into 16-bit D, program counter PC, stack pointers S and U, and condition code and direct page registers. - To build a basic computer with the MC6809, RAM, ROM, inputs and outputs are connected. Address ranges are mapped to memory chips and decoded using address lines to select

Uploaded by

noway snirfy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Introduction to Microprocessors

Designing Microprocessor Based Systems

➢ Example with Motorola 6809

16-bit registers
16-bit address bus
8-bit data bus

2
Features of 6809

• 16-bit address bus (access a maximum of 65536


memory 216 = 65536)
• 8-bit data bus
• Contain 16-bit registers
• 4MHz, 6MHz and 8MHz clock frequency
versions and minimum clock frequency is
400KHz

3
The Programming Model of 6809 Processor

Motorola 6809 Register Set

X – Index Register
Y – Index Register

U – User Stack Pointer


S – Hardware (System) Stack Pointer
PC – Program Counter

A B
D

Direct Page Register DP


Condition Code Register CC

4
PC (Program Counter)- (16 bit Register)
The Program Counter is used for keeping track of the
position of the program being executed. At any given time it
contains the address of the next instruction to be executed.

A, B and D registers(Accumulators)
The A and B 8-bit registers are general purpose registers
which are used for arithmetic calculations, logical operations and
manipulation of data.

Accumulators A and B can be combined together into 16-bit


accumulator D. The register A contains the most significant byte
of the accumulator D, and the register B contains the least
significant byte.
5
Index registers X and Y
Index registers X and Y are 16-bit registers that usually
contain an indexed addressing modes.

System stack pointer (S)


System stack pointer (S) is a 16-bit register pointing to the
top of the system stack. The system stack stores machine state
during subroutine calls and interrupts.

6
Memory Map

7
Basic Operation of 6809

What happens when we reset the processor?

1. Contents of memory locations FFFE and FFFF are loaded to


PC.
2. The instruction in memory location pointed by PC is
fetched.
3. Content of PC incremented by 1.
4. If required, additional operands are fetch from memory
and PC incremented each time.
5. The instruction is executed.

8
Basic Operation of 6809
What happens when we reset the processor?

9
Basic Operation of 6809

What happens when we reset the processor?

➢ The contents of FFFE and FFFF indicate (or


point to) the location of the first instruction to
be executed after resetting the processor, EFFF
and FFFF are said to contain the reset vector.

10
Building a Computer using 6809

The 6809 processor has 40 pins as shown in


figure. Out of these 40 pins, 16 are used for
the address bus, 8 for the data bus, two for
power, and the rest for various control
functions.

11
Building a Computer using 6809

Power, clock and other control pins

Power

Connecting power to 6809 is easy. It requires just a +5 - 0V ±5%


power supply. Pin 1 (Vss) is the ground and pin 7 (Vcc) is +5V .

6V-12V 7805 +5V

12
Clock
➢For some microprocessors an external clock signal must be
provided, while some others produce their own clock
signals with the help of a few external components.

➢In the case of 6809, both these choices are available.

➢Internal oscillator can be used by connecting a crystal and


two capacitors externally to the two pins 38 and 39 ( EXTAL
and XTAL) as shown in figure below.

13
Clock
➢ Alternately, a TTL compatible output of an external oscillator
can be connected to EXTAL with XTAL connected to ground.
➢ Using the clock signal, the processor generates two bus
timing signals called E and Q which are required for
synchronizing memory and I/O devices with the
microprocessor.
➢ Frequency of Q and E is equal to the ¼ of the clock frequency.
➢These signals are available through pins 34 and 35.

14
Reset mechanism
➢ processor can be reset by applying a low level on the pin
labeled RESET for a period longer than one bus cycle.
➢ During initial power on, the RESET line should be held low until
the clock oscillator is fully operational.
➢ Figure below shows a mechanism that can be used to reset
the processor automatically during the initial power on.

15
Building a Computer using 6809
➢ Suppose we want to build a system with RAM, ROM, a
set of eight switches (input) and one 7-segment display
(output).

➢ One can choose a 6116 SRAM chip (2 Kbyte RAM) and


a 2716 EPROM chip (2 Kbyte ROM).

Pin configurations of the 6116 RAM chip and 2716 UV-EPROM. 16


Building a Computer using 6809

➢ In order to store the reset vector, the EPROM must


cover the addresses FFFE and FFFF.

7-Segment
MP
6809

17
Memory maps of the circuit
Deciding Address Ranges
Address range:
From 000 0000 0000 to 111 1111 1111
In Hex: 000 to 7FF
This range must be mapped to
0000 to 07FF in 6809
2000 – 2FFF 7 Segment

4000 – 4FFF Set of switches

Address range:
From 000 0000 0000 to 111 1111 1111
In Hex: 000 to 7FF
This range must be mapped to
F800 to FFFF in 6809

18
Address decoding (for 2716 EPROM)
➢ 000 to 7FF range in 2716 must be mapped to F800 to FFFF range
in 6809.

F800 = 1111 1000 0000 0000


FFFF = 1111 1111 1111 1111

➢ Within this range, A11=1, A12=1, A13=1 A14=1 and A15=1

➢ ie. if we generate the signal X = A11.A12.A13.A14.A15,

➢ when 6809 addresses a location in the range F800 to FFFF, then X


will be 1.

➢ However, an address is valid only after the rising edge of Q.


19
➢For this , we can redefine X as

X = (A11.A12.A13.A14.A15).(E + Q)

➢If we do not mind a shorter time interval, even


X = (A11.A12.A13.A14.A15).E will work.

➢To enable 2716, we need to generate an active low signal.


Therefore, we must change X as
_____________________
X = (A11.A12.A13.A14.A15).E
20
Address decoding circuit (for 2716 EPROM)

➢E is used in the address decoding circuit to make sure


that the memory does not respond before the address is a
valid one.
➢ Rest of the Address lines (A0 to A10) of the processor are
connected directly to the address lines of the EPROM.
21
Address decoding(for 6116 RAM)
➢ 000 to 7FF range in 6116 must be mapped to 0000 to 07FF range
in 6809.

0000 = 0000 0000 0000 0000


07FF = 0000 0111 1111 1111

➢ Within this range, A11=0, A12=0, A13=0 A14=0 and A15=0

➢ ie. if we generate the signal


____________________
X = A11+A12+A13+A14+A15

➢ when 6809 addresses a location in the range 0000 to 07FF, then X


will be 1.
22
Address decoding (for 6116 RAM)

➢ However, an address is valid only after the rising edge of Q.

➢ To enable 6116, we need to generate an active low signal.


Therefore, we must change X as,
_____________________
X = (A11+A12+A13+A14+A15) . E

23
Address decoding circuit (for 6116 EPROM)

➢ E is used in the address decoding circuit to make sure that


the memory does not respond before the address is a valid
one.
24
7- Segment Display

2000 = 0010 0000 0000 0000


2FFF = 0010 0111 1111 1111

➢ Decode the lines from A12 to A15 and ignore all the other lines.
Then, for any address in the range from 2000 to 2FFF, your display
will be selected.
25
Address decoding (for 7 – segment display)

Address decoding (for switches – use a buffer)

4000 = 0100 0000 0000 0000


4FFF = 0100 0111 1111 1111
26
MC6809 Based Computer

27

You might also like