MICROPROCESSOR SYSTEMS
(PRACTICALS) – Fall 2013
EXPERIMENT 1 –
INTRODUCTION TO MICROPROCESSOR, REGISTERS AND MEMORY
DATE:
______________
|
Group
Members: ____________________________
____________________________
____________________________
|
||||
Marks
Obtained: ________
|
COURSE:
|
||||
Deadline:
Start of Next LAB
|
Instructor:
|
||||
|
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.
|
|
|||
|
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
|
|
|||
|
|
|
|||
|
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 any kind of task or tasks simultaneously e.g. image processing,
signal processing, communication etc. Memory and 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.
|
|
|||
|
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.
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.
BLOCK DIAGRAM OF 6800 MPU
|
|
|||
|
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 and key 2 respectively.
|
|
|||
1.
|
Press
ACCA and write the memory contents ____________________________.
|
|
|||
2.
|
Press
ACCB and write the memory contents ____________________________.
|
|
|||
3.
|
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 values
will be updated.
|
|
|||
4.
|
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:
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 the value _________________________?
|
|
|||
7.
|
The
memory address is shown as a four digit hexadecimal number. What will be the
maximum address? ______________________.
|
|
|||
8.
|
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.
|
|
|||
9.
|
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 0020 and use the FWD key
(five times) to verify that each location contains 36.
|
|
|||
12.
|
This
method works, but it’s not very efficient, because we have to keep pressing
CHAN and FWD. The AUTO key gives a
better way to do this. For example, let’s 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 you’ve 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, you’ll often need to enter
along program into the trainer’s memory.
|
|
|||
|
|
|
|||
0 comments:
Post a Comment