You are on page 1of 8

MICROPROCESSOR SYSTEMS (PRACTICALS) Fall 2013

Microcontroller
Microprocessor

EXPERIMENT 1 INTRODUCTION TO MICROPROCESSOR, REGISTERS


AND MEMORY
DATE: ______________

Group Members: ____________________________


____________________________
____________________________

Marks Obtained: ________

COURSE: TE 49 _____

Instructor: Engr. Muhammad Hammad


Instructions
This is Syndicate effort. Only Three students per syndicate are allowed. Write
your remarks next to the space provided.
Plagiarism is strictly forbidden.
Submit hard copy of the report before deadline. Marks will be deducted for late
submissions.

Deadline: Start of Next LAB

Objectives:
(a). Introduction to Microprocessor
(b). Introduction to ET-3400 Heath kit Microcomputer Learning System
(c). To store and retrieve data from registers
(d). To access the memory and its locations
Time Required: 3 hrs
Required Resources: ETS-3400 Microcomputer teaching system
A Microprocessor is an integrated circuit that takes input from user, process it and
gives the desired output. This is the decision maker or the brain of computer.
Microprocessor works with other peripherals and devices and they are integrated in the
form of a unit which is called CPU or MPU. Like the brain in your body, MPU need
support from many peripheral devices to maintain the system.

A Microcontroller (C,or MCU) is also a microprocessor and its purpose is to process


instructions and perform a specific task.
Difference between MCU and general Purpose MP is the limitation. MCU is application
specific, it can perform only one task at a time. It has limited ram, rom, cache and all of
this is integrated on a single chip. While on the other hand general purpose MP can do
1

6800 Microprocessor

any kind of task or tasks simultaneously e.g. image processing, signal processing,

ET-3400 communication
Learning Kit &etc.
6800
mp and
dsfMmmmMPmmmmmpfdfdf:
Memory
storage devices are attached separately to MU and have
large pool of memory, more processing power and greater storage capacity. MCU are
special purpose processors and are used for embedded applications e.g. washing machine,
electric oven, printer, systems having automation etc.
It is a training kit for learning microcomputer. It has Motorola 6800 microprocessor.
The processor was first released by Motorola in the mid 1970s. Today is being second
sourced by several other companies. 6800 has 2 accumulators named A and B, both are 8
bit wide. Three registers are 16 bit wide that is Stake pointer, index register and program
counter. there is an 8 bit register called condition codes register which contain flag bits
that asserts or cleared on different actions . Complete architecture will be discussed in
theory class.

Important Keys
DO Execute the program, beginning at the address specified after this key is pressed.
EXAM (Examine) Display the address and the memory contents at the address after
this key is pressed. Memory contents can be changed by pressing CHAN key and
entering new data.
FWD (Forward) Advances to the next memory location and display the contents.
BACK- Go back to the previous memory location and display the contents
AUTO (Automatic) Open the memory location specified after this key is pressed, so
that data can be entered. After data has been entered, automatically advance to the next
memory location and wait for data.
RESET- Clear any trainer board commands and displays CPU UP . Memory contents
and MP contents are not disturbed.
SS (Single Step) Go to the address specified by program counter and execute
instruction at that address. Wait at the next instruction.
PC (Program Counter) Displays the contents of program counter. This points to the
next location of the memory that the MP will fetch from. PC contents can be changed by
pressing CHAN key and entering new address.

6800 Microprocessor

Registers
Accumulator (ACC) :
As it name indicate, accumulator is used to store the data. Results from different CPU
operations are stored in accumulator. Results of arithmetic operations are stored in
accumulator and these operation can only be performed on ACC. 6800 has two
accumulators named A & B. both of these are 8 bit wide which means that only 1 byte of
data can be stored in them at a time .
Program Counter (PC):
This is 16 bit wide register and purpose of PC is to hold the address of next instruction to
be executed. MP executes instruction in successively unless a branch is occurred. These
instructions are stored in some memory location. Every memory location is a register or
we can say that memory is composed of array of registers in which data and instructions
are stored. Each memory location has an address and it is 16 bit address in case of 6800.
PC hold these addresses .The memory space starts from 0000H to FFFFH.
Condition code registers :
6800 MPU has 6 condition codes i.e. status flags. These include Negative (N), Overflow
(V), and Carry , Zero (Z), Half carry (H) also called auxiliary carry in some MP and an
Interrupt (I) code/flag. Higher 2 bits of register are not used.
Index Register :
The index register is a special purpose 16 bit register that greatly increase the power of
MP.
It allows powerful addressing mode called index addressing.

Stack Pointer (SP);


The stack pointer is another 16 bit special purpose register that works like PC and hold
address of the stack location. Stake memory is part of the ram and is used to store the
instructions, register status etc if a branch occurred.
6800 has 16 bit wide address bus and 8 bit data bus.
3

6800 Microprocessor

BLOCK DIAGRAM OF 6800 MPU

6800 Microprocessor

6800 Microprocessor

Power on the kit and verify that the display shows CPU UP as shown in the following
figure. If not press Reset key. If any other value is shown then the kit is faulty.

Viewing ACC Contents


6800 has two accumulators named ACCA and ACCB and they are accessed through key
1.
2.
3.

1 and key 2 respectively.


Press ACCA and write the memory contents ____________________________.
Press ACCB and write the memory contents ____________________________.
Turn off and power up the kit, check the contents of the registers. Did the value change?
Why?
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Changing Register Content: To change contents of ACC, Press 1 or 2 to view the value
and press the CHAN (C) Key. This will allow you to store any 8 bit value in hex format on
the current memory location. To view the change press the ACCA or ACCB key again. The

4.

values will be updated.


Store value (255)10 in the ACC. What will be the values should be typed?

5.

____________.
Change the contents of ACCB with (52)10. What will be values typed at the prompt?

6.

____________.
What is the maximum number that can be stored in a register and why?
_____________________________________________________________
_____________________________________________________________
____________________________________________________________
Viewing Memory:
6

6800 Microprocessor

To view the contents of memory, EXAM (E) key is used. Press E key and the first four
digits of the display will show a prompt. Type in 0000 to view the value there. What is
7.
8.

9.

the value _________________________?


The memory address is shown as a four digit hexadecimal number. What will be the
maximum address? ______________________.
The FWD and BACK keys are used to view the next and previous memory locations.
Changing memory Contents: To change contents of a memory location, press CHAN
key and prompt will be shown. The value must be hex format.
Change the value of location 0017 to FC. Write steps.
_____________________________________________________________
_____________________________________________________________

____________________________________________________________
10. The amount of data stored in a memory cell is 1 Byte. If 16 bits are used to represent a
memory address, then what will be the maximum memory capacity?
_____________________________________________________________
_____________________________________________________________
11.

____________________________________________________________
Suppose you want to store the hex value 36 in each of the locations from 0020 to 0025.
To do so:
a. Enter the following sequence of keys: RESET EXAM 0020 CHAN 36 FWD
CHAN 36 FWD CHAN 36 FWD CHAN 36 FWD CHAN 36 FWD CHAN 36
b. To make sure that the values got entered correctly, press RESET. Then press EXAM

12.

0020 and use the FWD key (five times) to verify that each location contains 36.
This method works, but its not very efficient, because we have to keep pressing CHAN
and FWD. The AUTO key gives a better way to do this. For example, lets use AUTO to
store the hex value 1A in each of the locations from 0020 to 0025:
a. Enter the following sequence of keys: RESET AUTO 0020 1A 1A 1A 1A 1A 1A
b. To make sure that the values got entered correctly, press RESET. Then press
EXAM 0020 and use the FWD key (five times) to verify that each location contains
1A.
In AUTO mode, the trainer automatically moves to the next location after youve entered
a value for the current location. This saves you from having to press FWD each time. It
also assumes that you want to keep entering new contents (rather than viewing the
existing contents). This saves you from having to press CHAN each time. Below and in
future labs, youll often need to enter along program into the trainers memory.
7

6800 Microprocessor

------------------------------------------------------------------------------------------------------------------------

6800 Microprocessor

You might also like