Вы находитесь на странице: 1из 12



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

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.

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

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,

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.


To familiarize with EMAC Primer Trainer hardware.

To familiarize with PROCOMM software modules.


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

An Assembly Program is being wrote and analysed :


Part I Program wrote
Part II Program compiled



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


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)


Figure 3 : Command
prompt figure

Step 5

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


Step 6


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

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)


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)


Figure 6 : Reset

Step 5

Figure 7 :

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



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

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.


(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.

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

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.


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

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
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
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?
-Translates current program instruction into a
set of control signals
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

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

The Arithmetic/Logic Unit
Performs both arithmetic and logical operations on data: add, subtract, multiply,
AND, OR and etc.
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


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


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.
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.

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.

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





MATRICS NUMBER: 4123000961