Sei sulla pagina 1di 12

INTRODUCTION

Hardware

In this experiment, students were given expositor to the Primer Trainer. The Primer
Trainer is a popular experiment board which is used by beginners to learn about microprocessors.
Most of todays electronics technologies such as

microwave ovens, stereos, and TVs

contain a microprocessor. The Primer 8085 which is used in this experiment demonstrates the
principles used by these products, and in addition it educates us on how to write a program
interlace, and control these devices. To program the trainer, Monitor Operating System known as
MOS will be used. The MOS will function to display and edit memory and registers. It also
allows students to conduct single step by instruction, run full speed with breakpoint and run
diagnostic to test board. Students need to use assembly language which involves source codes
and opcodes to operate the MOS. The MOS used together with Primer Trainer for this
experiment is known as ProComm.

Figure 1 : Experiment
Board

The Primer Experiment Board is the heart of the learning environment. It is the means by which
the software and the experiment board communicate with each other.
The hardware features are as follows:
Based on popular INTEL integrated circuits (IC). Knowledge gained on the
Primer applies directly to computer that are widely used in engineering and
business applications. ICs used include:
8085 Microprocessor.
1

8155 Programmable Peripheral interface with Timer and RAM.


8279 Compatible Keypad and Display controller.
8251 Optical UART Serial controller.
20-key, keypad
6 digit, 7s Segment, LED display
8 position dipswitch input port with I/O connector
8 bit output port with status LEDs and I/O connector
Analog to Digital Converter
Digital to Analog Converter
Timer Output with speaker
14 bit timer with interrupt support
System reset button
24 pin I/O access connector allows connection to breadboards
50 pin bus expansion connector allow interfacing of most devices

Software
The programming features of the Primer Trainer are as follows:
Monitor Operating System (MOS) allows users to:
Display and edit memory
Display and edit registers
Display and edit top of stack
Single step by instruction
Run full speed with breakpoint
Run diagnostic to test board
Utilize MOS internal subroutines for each I/O device as well as for
multiply, divide, getkey, display number, and ASCII

Assembly Language
Commented source code listing
With addresses & opcodes

ProComm is a powerful full featured communication software package that is ideally suited for
use with the Primer Trainer. ProComm runs on IBM PCs and compatibles, using COM ports 1
4 at baud rates of up 19,200 baud.
In the terminal mode of operation ProComm is acting like a dumb terminal, that is sending
keystrokes to the Primer and displaying any information from the Primer to the display. If the
Trainer is powered up and the communication cable is connected to the correct COM port, the
Primer should be on-line.
The PRIMER allows the uploading and downloading of INTEL hex files. An INTEL hex file is
an ASCII file that contains all of the memory information from some starting address to some
ending address. The address information and the memory information are contained together,
2

along with checksums, to verify each line of the file. INTEL hex files are usually generated by
assembler and some compilers. If the user has access to an 8080/8085 assembler that generates
INTEL hex files, it is possible to create an assembly language program, assemble it and upload
the resulting INTEL hex file to the PRIMER using ProComm. This eliminates entering each hex
code using the Edit command mode. After uploading, the program can be changed using the Edit
command and the Downloaded back to the PC, saving the modified INTEL hex file to disk. This
program can also be listed to the display in its INTEL hex form.
User will upload a program that was assembled on a PC into the PRIMER which was
downloaded to the PC to save the program. It is extremely important that the user uploads the
program to the address where the program was originally developed. In the case of the
assembler, the upload address is determined by the address chosen in the assembler ORG
statement. It is highly recommended that all programs start at the same address to avoid
confusion. A convenient address on the PRIMER is FF01H, which is the address that the system
defaults to a power-up. Exceptions to the above rule are when the users program is relocatable
or when data, instead of a program, is being uploaded.

OBJECTIVES

To familiarize with EMAC Primer Trainer hardware.


To familiarize with PROCOMM software modules.

APPARATUS/COMPONENTS

Primer Trainer
Power Supply unit
Serial Cable
Personal Computer (PC) with ProComm software preloaded

PROCEDURE
An Assembly Program is being wrote and analysed :
STEP 1:

BUILDING AN ASSEMBLY PROGRAM


Part I Program wrote
Part II Program compiled

STEP 2:

ANALYZING YOUR PROGRAM


Part III *.hex File uploaded to Trainer
Part IV An Uploaded Program is being analysed

BUILDING AN ASSEMBLY PROGRAM


Part 1 Writing a Program
Step 1

Command Prompt, cmd.exe is being launched.

Step 2

On Command Prompt window, cd..is being typed and enter is being pressed, C
prompt is being appeared. (command prompt figure referred)

Step 3

cd xasm220 is being typed.

Figure 2 : Command
prompt figure

Step 4

Edit ex2.asm is being typed. (pop-up appeared as below,Figure 3)

Blue
background

Figure 3 : Command
prompt figure

Step 5

The following program is being wrote on the computer. (Figure 3 is being


referred)
ORG
MVI
MVI
ADD
HLT

Step 6

$FF01
A,$02
B,$09
B

File is being saved and exit. (exit button under file button at the top left is being
used)

Part II Compiling a Program


Step 1

On C:\xasm220>, asm85 ex2.asm i f is being typed.


When there is 0 error, amir.asm program is being compiled to *.hex. this means,
the assembler translates my assembly language program to computer language.
Go to step 2 (Figure 4 is being referred)
Otherwise, if there is error, return to program by typing ex2.asm (Step 4, Part 1).
Make correction to program, save file then exit. After that return to step 1 to
compile program.

Figure 4 : Command
prompt figure

Step 2

On C:\xasm220>, cd procomm is being typed (Figure 4 is being referred)


5

Step 3

Procomm is being typed again and the terminal emulator PROCOMM with the
computer host interconnected.

Figure 5 : Command
prompt figure

Step 4

On my trainer, RESET, FUNC,0 is being pressed. Procomm terminal displayed as


Figure 5. (Figure 1,6 & 7 is being referred)

Presse
d

Figure 6 : Reset
Button

Step 5

Figure 7 :
LED

LED display on my trainer reads Func. 00 is being checked. (Figure 7 is being


referred)

ANALYSING YOUR PROGRAM


Part III Uploading Your.hex File to Trainer
Step 1

SHIFT and > on keyboard is being pressed


(As shown in Figure 5, the key > is being used for hex upload to trainer from
host)

Step 2

STARTING ADDRESS..FF01 is being pressed

Step 3

Page Up button on keyboard is being pressed.

Step 4

7 button on keyboard is being pressed.


6

(By selecting 7, ASCII format for program is being chose)


Step 5

C:\xasm220\amir.hex is being typed


(By doing this, *.hex program is being uploaded to the trainer)

Step 6

Part IV is being referred to analyse your program.

Part IV Analyzing an Uploaded Program


Step 1

Figure 5 is being referred. All keys that can be used to analyse my program using
PROCOMM is being showed in figure 5.

Step 2

My program is being analysed by pressing these keys.


Example:
- R is being pressed to check the contents of all registers.
- L is being pressed to get the list of memory contents using
mnemonics.

Step 3

PROCOMM is being exit by press ALT and X button on keyboard. Y button is


being pressed for Yes and N button for No.

Step 4

Exit is being typed on Command Prompt window.

QUESTION AND ANSWER


1. Define a microprocessor. What is the function of the microprocessor?
7

A microprocessor, sometimes called a logic chip, is a computer processor on a microchip.


The microprocessor is a multipurpose, programmable device that accepts digital data as
input, processes it according to instructions stored in its memory, and provides results as
output.
The microprocessor contains all, or most of, the central processing unit (CPU) functions
and is the "engine" that goes into motion when you turn your computer on. A
microprocessor is designed to perform arithmetic and logic operations that make use of
small number-holding areas called registers. Typical microprocessor operations include
adding, subtracting, comparing two numbers, and fetching numbers from one area to
another. These operations are the result of a set of instructions that are part of the
microprocessor design.
When your computer is turned on, the microprocessor gets the first instruction from the
basic input/output system (BIOS) that comes with the computer as part of its memory.
After that, either the BIOS, or the operating system that BIOS loads into computer
memory, or an application program is "driving" the microprocessor, giving it instructions
to perform.
2. How many address location can the microprocessor point for 32-bit wide program
counter?
A 32-bit register can store 232 different values. The signed range of integer values
that can be stored in 32 bits is -2,147,483,648 (-1 231) through 2,147,483,647 (231 - 1);
the unsigned range is 0 through 4,294,967,295 (232 - 1). Since 232 is 4,294,967,296, a
processor with 32-bit memory addresses can directly access 4 GiB of byteaddressable memory.
3. Describe the main components of a microprocessor?
INSTRUCTION DECODER
-Translates current program instruction into a
set of control signals
COMPONENT : (TRANSISTOR)
The internal arrangement of a microprocessor varies depending on the age of the
design and the intended purposes of the microprocessor. The complexity of an integrated
circuit is bounded by physical limitations of the number of transistors that can be put onto
one chip, A transistor is a semiconductor device used to amplify or switch electronic
signals and electrical power. It is composed of semiconductor material with at least three
terminals for connection to an external circuit. A voltage or current applied to one pair of
the transistor's terminals changes the current through another pair of terminals. Because
the controlled (output) power can be higher than the controlling (input) power, a
transistor can amplify a signal. Today, some transistors are packaged individually, but
many more are found embedded in integrated circuits.
The transistor is the fundamental building block of modern electronic devices, and is
ubiquitous in modern electronic systems. Following its development in 1947 by
8

American physicists John Bardeen, Walter Brattain, and William Shockley, the transistor
revolutionized the field of electronics, and paved the way for smaller and cheaper radios,
calculators, and computers, among other things. The transistor is on the list of IEEE
milestones in electronics, and the inventors were jointly awarded the 1956 Nobel Prize in
Physics for their achievement

UNIT :
The Arithmetic/Logic Unit
Performs both arithmetic and logical operations on data: add, subtract, multiply,
AND, OR and etc.
ii.
The Control Unit
As the name implies, the control unit controls what is happening in the
microprocessor. It provides the necessary control and timing signals to all operations
in the microprocessor as well as its contact to the outside world. The control unit has
control lines to each of the microprocessors logic function: ALU, registers, memory,
I/O. The timing signal such as clock provides synchronization for communication
between the components of microprocessor. It also processes interrupt and power-up
sequence.
i.

iii.

The Register Array


Apart from Accumulator (A-register), there are six general-purpose programmable
registers B, C, D, E, H and L. They can be used as 8-bit registers or paired to store l6bit data. The allowed pairs are B-C,D-E and H-L. The temporary registers W and Z
are intended for internal use of the processor and it cannot be used by the
programmer.

STACK POINTER (SP):


The stack pointer SP, holds the address of the top of the stack.
The stack is used to save the content of registers during the execution of a program.
PROGRAM COUNTER (PC):
The program counter (PC) keeps track of program execution. To execute a program
the starting address of the program is loaded in program counter. The PC sends out an
address to fetch a byte of instruction from memory and increment its content
automatically. Hence, when a byte of instruction is fetched, the PC holds the address
of the next byte of the instruction or next instruction
4. Is translating your assembly program into machine code important? Explain.
- A much more readable rendition of machine language, called assembly language,
uses mnemonic codes to refer to machine code instructions, rather than using the
instructions' numeric values directly. For example, on the Zilog Z80 processor, the
machine code 00000101 , which causes the CPU to decrement the B processor register,
would be represented in assembly language as DEC B . If you not translate ur assembly
language, the program cannot run because of machine cannot read the program.
5. What is the function of Procomm Software? Explain how it works.
- ProComm is a powerful full featured communication software package that is ideally
suited for use with the Primer Trainer. ProComm runs on IBM PCs and compatibles,
using COM ports 1 4 at baud rates of up 19,200 baud.
In the terminal mode of operation ProComm is acting like a dumb terminal, that is
sending keystrokes to the Primer and displaying any information from the Primer to the
display. If the Trainer is powered up and the communication cable is connected to the
correct COM port, the Primer should be on-line.

CONCLUSION
Upon completing this microprocessor lab, Some of the error are found in the experiment
when doing experiment but it has been identify because of the spacing for the lab.
And the objective to familiarize with EMAC Primer Trainer hardware and to familiarize with
ProComm software modules was fulfilled. Basically the whole lab was carried out successfully
without any problem. No problems occurred during the lab. As conclusion, this lab had provided
a good exercise and understanding on using the microprocessor hardware and software
technology module.

REFFERENCE
- http://www.procomm-guide.com/
10

http://www.aspectscripting.com/procomm.shtml

ELECTRONICS
FACULTY OF ENGINEERING
LAB 3
Microprocessor

NAME: UGESWRAN A/L THAMALINGGAM


11

MATRICS NUMBER: 4123000961

12

Potrebbero piacerti anche