Ee8681-Mp MC Eee
Ee8681-Mp MC Eee
DEPARTMENT OF
ELECTRICAL & ELECTRONICS ENGINEERING
EE8681-MICROPROCESSOR AND MICROCONTROLLER
LABORATORY
NAME :
REG.NO :
YEAR :
DEPT :
P.T.Lee.CHENGALVARAYA NAICKER COLLEGE OF
ENGINEERING & TECHNOLOGY
CHENGALVARAYA NAGAR, OOVERY
KANCHIPURAM-631 502
BONAFIDE CERTIFICATE
AIM:
ALGORITHM:
ALGORITHM:
ALGORITHM:
ADDITION:
S.NO INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1 4500 40 4502 60
4501 20 4503 00
2 4500 FF 4502 01
4501 02 4503 01
SUBTRACTION:
S.NO INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1 4500 04 4502 03
4501 01 4503 00
2 4500 06 4502 04
4501 07 4503 01
MULTIPLICATION:
S.NO INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1 4500 02 4502 08
4501 04 4503 00
2 4500 FF 4502 01
4501 FF 4503 FE
DIVISION:
S.NO INPUT OUTPUT
ADDRESS DATA ADDRESS DATA
1 4500 06 4502(Remainder) 00
4501 02 4503(Quotient) 03
2 4500 23 4502 01
4501 11 4503 02
RESULT:
Ex. No: 2 Ascending/Descendingorder,Maximum/Minimumof numbers
AIM:
a. ASCENDING ORDER
ALGORITHM:
ALGORITHM:
ALGORITHM:
1. Place all the elements of an array in the consecutive memory locations.
2. Fetch the first element from the memory location and load it in the accumulator.
3. Initialize a counter (register) with the total number of elements in an array.
4. Decrement the counter by 1.
5. Increment the memory pointer to point to the next element.
6. Compare the accumulator content with the memory content (next
element).
7. If the accumulator content is smaller, then move the memory content
(largest element) to the accumulator. Else continue.
8. Decrement the counter by 1.
9. Repeat steps 5 to 8 until the counter reaches zero
10. Store the result (accumulator content) in the specified memory location.
PROGRAM: LARGEST NUMBER IN ANA ARRAY
ALGORITHM:
1. Place all the elements of an array in the consecutive memory locations.
2. Fetch the first element from the memory location and load it in the accumulator.
3. Initialize a counter (register) with the total number of elements in an array.
4. Decrement the counter by 1.
5. Increment the memory pointer to point to the next element.
6. Compare the accumulator content with the memory content (next
element).
7. If the accumulator content is smaller, then move the memory content
(largest element) to the accumulator. Else continue.
8. Decrement the counter by 1.
9. Repeat steps 5 to 8 until the counter reaches zero
10. Store the result (accumulator content) in the specified memory location.
PROGRAM: SMALLEST NUMBER IN AN ARRAY
B. DESCENDING ORDER
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4200(Array Size) 05
4201 08 4201 2A
4202 02 4202 1F
4203 1F 4203 10
4204 2A 4204 08
4205 10 4205 02
C. SMALLEST ELEMENT
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4200(Array Size) 05
4201 08
4202 02 4300 02
4203 1F
4204 2A
4205 10
D. LARGEST ELEMENT
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4200(Array 05
Size)
4201 08
4202 02 4300 2A
4203 IF
4204 2A
4205 10
RESULT:
Ex. No: 3 FIND THE NUMBER OFEVENANDODDNUMBERINA
BLOCKOFDATA
AIM:
a. OddandEven Number
ALGORITHM:
1. Start.
2. Load the given data.
3. Clear the data in accumulator.
4. Move the content of accumulator to D and B register.
5. Increment HL register pair and move the content of memory to accumulator.
6. Rotate the obtain data in the form of RAR.
7. If carry occur increment B else increment D.
8. Decrement C, if C ≠0 go to step 5. Else increment HL pair.
9. Move the content of D to memory and increment HL pair and move the content B to
memory.
10. Stop.
PROGRAM-FIND THE EVEN AND ODD NUMBER
ALGORITHM:
1. Start.
2. Load the given data.
3. Clear the data in accumulator.
4. Move the content of accumulator to D and B register.
5. Increment HL register pair and move the content of memory to accumulator.
6. Rotate the obtain data in the form of RAL.
7. If carry occur increment B else increment D.
8. Decrement C, if C ≠0 go to step 5. Else increment HL pair.
9. Move the content of D to memory and increment HL pair and move the content B to
memory.
10. Stop.
PROGRAM-FIND THE POSITIVE AND NEGATIVE NUMBER
RESULT:
Ex. No: 4 CODECONVERSIONS
AIM:
a. ASCIITO HEXADECIMAL
ALGORITHM:
We know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is39H (57D). So all
other numbers are in the range 30H to 39H. The ASCII value of 0AH is 41H (65D) and ASCII
of 0FH is 46H (70D), so all other alphabets (B, C, D, E, F) are in the range 41H to 46H
ALGORITHM:
We know that the ASCII of number 00H is 30H (48D), and ASCII of 09H is39H
(57D). So all other numbers are in the range 30H to 39H. The ASCII value of
0AH is 41H (65D) and ASCII of 0FH is 46H (70D), so all other alphabets (B, C,
D, E, F) are in the range 41H to 46H.
1. Start the program
2. Load the data from address 4200 to A
3. Compare Accumulator value with 0A
4. If Carry is set, Add 30 and 07 to Accumulator
Else, Add 30 to Accumulator
5. Store the result to 4300
6. Stop the Execution
PROGRAM: HEXA DECIMAL TO ASCII
ALGORITHM:
4111 00
4112 C6 L1 ADI 0A Add immediate data
OAHto the accumulator
4113 0A
4114 15 DCR D Decrement the D
register
4115 C2 JNZ L1 Jump if no zero to
4112H
4116 12
4117 41
4118 83 ADD E Add the content of E
register to Accumulator
4119 32 STA 4300 Store the accumulator
411A 00 content at 4300h
411B 43
411C 76 HLT Halt the execution
e. HEXADECIMALTO DECIMAL
ALGORITHM:
a. ASCII TO HEXADECIMAL
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4200 42 4300 0B
4200 35 4300 05
b. HEXADECIMAL TO ASCII
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4200 06 4300 36
4200 0C 4300 43
c. HEXADECIMAL TO BINARY
INPUT OUTPUT
MEMORY DATA MEMORY DATA MEMORY DATA
LOCATION LOCATION LOCATION
A9 4201 01 4205 00
4200 4202 00 4206 01
4203 00 4207 00
4204 01 4208 01
d. BCD TO HEXADECIMAL
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
1D
4200 29 4300
e. HEXADECIMAL TO DECIMAL
INPUT OUTPUT
MEMORY DATA MEMORY DATA
LOCATION LOCATION
4150 21 4151 00
4152 33
RESULT
.
EX.No:5 INTERFACINGA/DANDD/ACONVERTERWITH8085
A IM:
a. ADCINTERFACINGWITH 8085
APPARATUS REQUIRED:
PROBLEM STATEMENT:
To program starts from memory location 4100H. The program is executed for various values
of analog voltage which are set with the help of a potentiometer. The LED display is verified with the
digital value that is stored in the memory location 4150H.
THEORY:
An ADC usually has two additional control lines: the SOC input to tell the ADC when to
start the conversion and the EOC output to announce when the conversion is complete. The following
program initiates the conversion process, checks the EOC pin of ADC 0419 as to whether the
conversion is over and then inputs the data to the processor. It also instructs the processor to store the
converted digital data at RAM 4200H.
ALGORITHM:
1. Select the channel and latch the address.
2. Send the start conversion pulse.
3. Read EOC signal.
4. If EOC =1 continue else go to step (3)
5. Read the digital output.
6. Store it in a memory location.
PROGRAM: ADC INTERFACE WITH 8085
ADDRESS OPCODE LABEL MNEMON ICS OPERA COMMENTS
ND
4100 3E MVI A, 10 Select channel 0 and to
make accumulator low
4101 10
4102 D3 OUT C8 Output the data
4103 C8
4104 3E MVI A, 18 Make accumulator high
4105 18
4106 D3 OUT C8 Display the data
4107 C8
4108 3E MVI A, 01 Make 01 to accumulator
4109 01
410A D3 OUT D0 Display the data
410B D0
410C 00 NOP
410D 00 NOP
410E 00 NOP
410F 3E MVI A, 00 Make 00 to accumulator
4110 00
4111 D3 OUT D0 Load D0 in output port
4112 D0
4113 DB LOOP IN D8
4114 D8
4115 E6 ANI 01 Do and operation directly
4116 01
4117 FE CPI 01 Compare with accumulator
4118 01
4119 C2 JNZ LOOP Jump to specified address
411A 13
411B 41
411C DB IN C0
411D C0
411E 32 STA 4150 Store the data
411F 50
4120 41
4121 76 HLT End the program
OBSERVATION
SOCJUMPERSELECTION:
APPARATUSREQUIRED:
SOFTWAREEXAMPLES
The following examples illustrate how to control the DAC using 8085 and generate sine
wave, saw tooth wave by means of software.
The basic idea behind the generation of waveforms is the continuous generation of
Analog output of DAC. With 00(HEX) as input to DAC2, the analog output is -5V.
Similarly, with FF (Hex) as input, the output is +5V. Outputting digital data 00 and FF at
regular intervals, to DAC2, results in a square wave of amplitude I5 Volts
ALGORITHM:
1. Load the initial value (00) to Accumulator and move it to DAC.
2. Call the delay program
3. Load the final value (FF) to accumulator and move it to DAC.
4. Call the delay program.
5. Repeat steps 2 to 5.
PROGRAM: SQUARE WAVE FORM
Execute the program and using a CRO, verify that the waveform at the DAC2 output is a
square-wave. Modify the frequency of the square-wave, by varying the time delay.
(b) SAWTOOTH GENERATION:
ALGORITHM:
1. Load the initial value (00) to Accumulator
2. Move the accumulator content to DAC.
3. Increment the accumulator content by 1.
4. Repeat steps 3 and 4.
Output digital data from 00 to FF constant steps of 01 to DAC1 repeat this sequence again and
again. As a result a saw – tooth wave will be generated at DAC1 output.
PROGRAM: SAW TOOTH WAVE FORM
ALGORITHM:
WAEFORMS:
OBSERVATION:
AIM
APPARATUSREQUIRED:
ALGORITHM:
1. Initialize the ports.
2. Initialize the memory content, with some address to the data.
3. Read data for each sequence from the memory and display it through the ports.
4. After completing all the sequences, repeat from step2.
ASAMPLESEQUENCE:
1. (a) Vehicles from south can go to straight or left.
(b) Vehicles from west can cross the road
(c) Each pedestrian can cross the road.
(d) Vehicles from east no movement.
(e) Vehicles from north can go only straight.
2. All ambers are ON, indicating the change of sequence.
3. (a) Vehicles from east can go straight and left.
(b) Vehicles from south can go only left.
(c) North pedestrian can cross the road.
(d) Vehicles from north, no movement.
(e) Vehicles from west can go only straight.
4. All ambers are ON, indicating the change of sequence.
5. (a) Vehicles from north can go straight and left.
(b) Vehicles from east can go only left.
(c) West pedestrian can cross the road.
(d) Vehicles from west, no movement.
(e) Vehicles from south can go only straig6. All ambers are ON, indicating the
change of sequence.
7. (a) Vehicles from west can go straight and left.
(b) Vehicles from north can go only left.
(c) South pedestrian can cross the road.
(d) Vehicles from south, no movement.
(e) Vehicles from east can go only straight.
8. All ambers are ON, indicating the change of sequence.
9. (a) All vehicles from all directions no movement.
(b) All pedestrian can cross the road.
BITALLOCATION:
PATHREPRESENTATION:
APPARATUSREQUIRED:
Prior to starting data transmission or reception, the 8251 must be loaded with a
set of control words generated by the CPU.These control signals define the complete
functional definition of the 8251 and must immediately follow a RESET operation. Control
words should be written in to the control register of 8251. Words should be written in to the
control register of 8251.words should be written in to the control register of
8251.Thesecontrol words are split into two formats.
1. MODE INSTRUCTION WORD
2. COMMAND INSTRUCTION WORD.
1. MODEINSTRUCTIONWORD
This format defines the BAUD rate, character length, parity and stop bits required to
work with asynchronous data communication. By selecting the appropriate BAUD
factor synchronous mode, the 8251 can be operated in synchronous mode.
8 bit data
No parity
Baud rate factor (16X)
1 stop bit
Gives a mode command word of 01001110=4E(X)
PROGRAM:
AIM:
APPARATUS REQUIRED:
4130 FF
4131 FF
4132 FF
4133 FF
4134 FF
4135 FF
4136 FF
4137 FF
4138 98
4139 68
413ª 7C
413B C8
413C 1C
413D 29
413E FF
413F FF
SEGMENTDEFINITION:
DATA BUS D7 D6 D5 D4 D3 D2 D1 D0
SEGMETS d c b a dp G f e
OBSERVATION:
H fegbc 1 0 0 1 1 0 0 0 98
E fegad 0 1 1 0 1 0 0 0 68
L fed 0 1 1 1 1 1 0 0 7C
P fegab 1 1 0 0 1 0 0 0 C8
U fedbc 0 0 0 1 1 1 0 0 1C
S fgacd 0 0 1 0 1 0 0 1 29
b) Accept a Key and display the same (Two key lock out)
81
c) Accept a Key and display the same( N Key rollover)
ADDRESS OPCO LABEL MNEMON ICS OPERAN COMMENT
DE D
AIM:
a. ADDITIONOFTWO8BIT NUMBERS
Algorithm:
Observation:
Input:
4500: 05 [Addend]
4501: 06 [Augend]
Output:
4502: 0B [Sum]
4503: 00 [Carry]
b. SUBTRACTIONOFTWO8BIT NUMBERS
Algorithm:
Observation:
Input:
4500: 09 [Minuend]
4501: 04 [Subtrahend]
Output:
4502: 05 [Difference]
4503: 00 [Sign Bit]
C.MULTIPLICATION OF TWO 8 BIT NUMBERS
Algorithm:
Observation:
Input:
Output:
Algorithm:
Observation:
Input:
4500: 99 [Dividend]
4501: 12 [Divisor]
Output:
4502: 08 [Quotient]
4503: 09 [Remainder]
Result:
Ex. No. 10 A)SUMOFELEMENTSINANARRAY
AIM:
ALGORITHM:
1. Load the array in the consecutive memory location and initialize the
memory pointer with the starting address.
2. Load the total number of elements in a separate register as a counter.
3. Clear the accumulator.
4. Load the other register with the value of the memory pointer.
5. Add the register with the accumulator.
6. Check for carry, if exist, increment the carry register by 1. otherwise,
continue
7. Decrement the counter and if it reaches 0, stop. Otherwise increment the
memory pointer by 1 and go to step 4.
97
PROGRAM:
Label Program Comments
MOV DPTR, #4200 Load 4200 to DPTR, get array size
MOVX A, @DPTR Copy array size value to A
MOVR0, A Move contents of A to R0
MOV B, #00
MOVR1, B
CLR C Clear B, R1 & Carry Flag
AGAIN INCDPTR Get value from datapointer
MOVX A, @DPTR
ADD A, B Sum of two numbers
MOV B, A
JNC NC If no carry jump to NC
INC R1 Else increment R1
NC DJNZ R0,AGAIN Decrement size of array, if not zero fetch data from
DPTR and add to the resultant value
MOV DPTR, #4500 Store the result in 4500 memory locations
MOV A, B
MOVX @DPTR, A
INC DPTR
MOV A, R1
MOVX @DPTR, A
HERE SJMP HERE
OBSERVATION:
INPUT OUTPUT
4200(Array Size) 05 4500
60
4201 15
4202 20 00
4501
4203 1A
4204 09
4205 08
RESULT:
Exp. No 11 8051–CheckOddorEvenusingCallOption
AIM:
ALGORITHM:
1. Start
2. Move the data to DPTR
3. Move the data to accumulator
4. Call check function whether given number is odd or even
5. Increment DPTR
6. Resultant value stored in DPTR-4201
7. Halt
Check Function
8. Rotate right through carry
9. If carry copy 00 to B reg (odd number)
10. Else copy EE to B reg (even number)
11. return
PROGRAM:
Label Program Comments
MOV DPTR, #4200 Load 4200 to DPTR, get a number
MOVX A, @DPTR Copy value to A
ACALL CHECK_EV_OD Call check function whether given number is
odd or even
INC DPTR
MOV A,B
MOVX @DPTR, A Resultant value stored in DPTR-4201
HERE SJMP HERE
OBSERVATION:
INPUT OUTPUT
4200 20 4201 EE
RESULT:
Ex. No: 12 INTERFACINGA/D&D/ACONVERTERWITH8051
AIM
a. ADCINTERFACINGWITH 8051
APPARATUS REQUIRED:
PROBLEM STATEMENT:
To program starts from memory location 4100H. The program is executed for various
values of analog voltage which are set with the help of a potentiometer. The LED display is
verified with the digital value that is stored in the memory location 4150H.
THEORY:
An ADC usually has two additional control lines: the SOC input to tell the ADC when
to start the conversion and the EOC output to announce when the conversion is complete. The
following program initiates the conversion process, checks the EOC pin of ADC 0419 as to
whether the conversion is over and then inputs the data to the processor. It also instructs the
processor to store the converted digital data at RAM 4200H.
ALGORITHM:
OBSERVATION
SOCJUMPERSELECTION:
APPARATUS REQUIRED:
THEORY:
SOFTWAREEXAMPLES
After going through the software examples you can learn how to control the
DAC using 8051 and generate sine wave, saw tooth wave etc by means of software.
ALGORITHM:
DAC-CIRCUIT:
WAVEFORMS:
OBSERVATION:
The basic idea behind the generation of waveforms is the continuous generation of
Analog output of DAC.
With 00(HEX) as input to DAC2, the analog output is -5V. Similarly, with FF (Hex) as
input, the output is +5V. Outputting digital data 00 and FF at regular intervals, to DAC2,
results in a square wave of amplitude I5 Volts.
PROGRAM:
Execute the program and using a CRO, verify that the waveform at the DAC2 output is
a square-wave. Modify the frequency of the square-wave, by varying the time delay.
(b) SAWTOOTH GENERATION
1. Load the initial value (00) to Accumulator
2. Move the accumulator content to DAC.
3. Increment the accumulator content by 1.
4. Repeat steps 3 and 4.
Output digital data from 00 to FF constant steps of 01 to DAC1 repeat this sequence again and
again. As a result a saw – tooth wave will be generated at DAC1 output.
PROGRAM:
The following program will generate a triangular wave at DAC2 output. The program is
self explanatory.
AIM:
APPARATUSREQUIRED:
.
PROGRAM:
Set the jumper, so that the clock 0 of 8253 is given a square wave of frequency 1.5
MHz. This program divides this PCLK by 10 and thus the output at channel 0 is 150 KHz.
Vary the frequency by varying the count. Here the maximum count is FFFF H. So, the
square wave will remain high for 7FFF H counts and remain low for 7FFF H counts. Thus
with the input clock frequency of 1.5 MHz, which corresponds to a period of 0.067
microseconds, the resulting square wave has an ON time of 0.02184 microseconds and an OFF
time of 0.02184 microseconds.
To increase the time period of square wave, set the jumpers such that CLK2 of 8253 is
connected to OUT 0. Using the above-mentioned program, output a square wave of frequency
150 KHz at channel 0. Now this is the clock to channel 2.
CONTROLWORD:
SC-SELECTCOUNTER:
M-MODE:
M2 M1 M0 MODE
0 0 0 Mode 0
0 0 1 Mode 1
X 1 0 Mode 2
X 1 1 Mode 3
1 0 0 Mode 4
1 0 1 Mode 5
READ/WRITE:
RW1 RW0
0 0 Counter latch command
0 1 R/W least significant bit only
1 0 R/W most significant bit only
BCD:
AIM:
To interface a stepper motor with 8051 microcontroller and operate it.
THEORY:
A motor in which the rotor is able to assume only discrete stationary angular position is
a stepper motor. The rotary motion occurs in a step-wise manner from one equilibrium position
to the next. Stepper Motors are used very wisely in position control systems like printers, disk
drives, process control machine tools, etc.
The basic two-phase stepper motor consists of two pairs of stator poles. Each of the
four poles has its own winding. The excitation of any one winding generates a North Pole. A
South Pole gets induced at the diametrically opposite side. The rotor magnetic system has two
end faces. It is a permanent magnet with one face as South Pole and the other as North Pole.
The Stepper Motor windings A1, A2, B1, B2 are cyclically excited with a DC current
to run the motor in clockwise direction. By reversing the phase sequence as A1, B2, A2, B1,
anticlockwise stepping can be obtained.
ANTICLOCKWISE CLOCKWISE
STEP A1 A2 B1 B2 DATA STEP A1 A2 B1 B2 DATA
1 1 0 0 1 9h 1 1 0 1 0 Ah
2 0 1 0 1 5h 2 0 1 1 0 6h
3 0 1 1 0 6h 3 0 1 0 1 5h
4 1 0 1 0 Ah 4 1 0 0 1 9h
PROCEDURE:
1. Enter the above program starting from location 4100.and execute the same.
2. The stepper motor rotates.
3. Varying the count at R4 and R5 can vary the speed.
4. Entering the data in the look-up TABLE in the reverse order can vary direction of
rotation.
BLOCKDIAGRAM:
8051
MICROCONTROLLER 8255
DRIVER CIRCUIT STEPPER MOTOR
REPRESENTATION:
PROGRAM :
Aim
Motivation
Understanding of Intel 8085 microprocessor is fundamental to getting insight into the Von-
Neumann Architecture. It was first introduced in 1976, since then many generations of
computer architecture have come up, some still persists while others are lost in history. This
microprocessor still survives because it is still popular in university and training institutes to
get students acquainted with basic computer architecture. For this purpose 8085 trainer kit are
available on the market.
With this academic learning purpose in mind 8085 simulator software is designed. It helps in
get started easily with example codes, and to learn the architecture playfully. It also provides a
trainer kit as an appealing functional alternative to real hardware. The users can write
assembly code easily and get results quickly without even having the actual hardware.
Jubin 8085 simualor is open source software which is available
at https://8085simulator.codeplex.com/downloads/get/86234
Features
1.Assembler Editor
• Can load Programs written in other simulator
• Auto-correct and auto-indent features
• Supports assembler directives
• Number parameters can be given in binary, decimal and hexadecimal format
• Supports writing of comments
• Supports labeling of instructions, even in macros
• Has error checking facility
• Syntax Highlighting
2.Disassembler Editor
• Supports loading of Intel specific hex file format
• It can successfully reverse trace the original program from the assembly code,
in most of the cases
• Syntax Highlighting and Auto Spacing
3.Assembler Workspace
• Contains the Addressfield, Label, Mnemonics, Hex-code, MnemonicSize, M-Cycles
and T-states
• Static Timing diagram of all instruction sets are supported
• Dynamic Timing diagram during step by step simulation
• It has error checking facility also
4.Memory Editor
• Can directly update data in a specified memory location
• It has 3 types of interface, user can choose from it according to his need.
–Show entire memory content
–Show only loaded memory location
–Store directly to specified memory location
• Allows user to choose memory range
5.I/O Editor
• It is necessary for peripheral interfacing.
• Enables direct editing of content
6.Interrupt Editor
• All possible interrupts are supported. Interrupts are triggered by pressing the
appropriate column (INTR,TRAP,RST7.5,RST6.5,RST5.5) on the interrupt table.
The simulation can be reset any time by pressing the clear memory in the settings
tab.
7.Debugger
• Support of breakpoints
• Step by step execution/debugging of program.
• It supports both forward and backward traversal of programs.
• Allows continuation of program from the
breakpoint. 8.Simulator
• There are 3 level of speed for simulation:
–Step-by-step −→Automatic line by line execution with each line highlighting.
The time to halt at each line is be decided by the user.
–Normal−→Full execution with reflecting intermittent states periodically.
–Ultimate−→Full execution with reflecting final state directly.
119
• There are 2modes of simulator engine:
–Run all at a Time−→It takes the current settings from the simulation speed
level and starts execution accordingly.
-StepbyStep−→It is manual mode of control of FORWARD and BACKWARD
traversal of instruction set. It also displays the in-line comment if available for
currently executed instruction.
• Allows setting of starting address for the simulator.
• Users can choose the mnemonic where program execution should
terminate. 9.Helper
• Help on the mnemonics is integrated.
• CODEWIZARD is a tool added to enable users with very little knowledge of
assembly code could also 8085 assembly programs.
• Already loaded with plenty SAMPLE programs.
• Dynamic loading of user code if placed in user_code folder.
• It also includes a user manual.
10.Printing
• Assembler Content
• Workspace Content
11.Register Bank−→Each register content is accompanied with its equivalent binary value
• Accumulator, RegB, RegC, RegD, RegE, RegH, RegL, Memory(M)
• Flag Register
• Stack Pointer(SP)
• Memory Pointer(HL)
• Program Status Word(PSW)
• Program Counter(PC)
• Clock Cycle Counter
• Instruction Counter\
• Special blocks for monitoring Flag register and the usage of SIM and RIM
instruction.
12.Crash Recovery
• Can recover programs lost due to sudden shutdown or crash of
application. 13.8085 TRAINER KIT
120
• It simulates the kit as if the user is working in the lab. It basically uses the same
simulation engine at the back-end.
14.TOOLS
• Insert DELAY Subroutine TOOL
–It is a powerful wizard to generate delay subroutine with user defined delay
using any sets of register for a particular operating frequency of 8085
microprocessor.
• Interrupt Service Subroutine TOOL
–It is a handy way to set memory values at corresponding vector interrupt
address.
• Number Conversion Tool
–It is a portable interconversion tool for Hexadecimal, decimal and binary
numbers. So, that user do not need to open separate calculator for it.
Directives
Assembler
Directives Example Description
121
Debugging Mode
The debug mode allows the user to view and/or manipulate the program’s internal state
for the purpose of debugging. The software allows stepwise or block wise line monitor with
both forward and backward traversal facility.
PROGRAM
#ORG 2000
#BEGIN 2000
LXI H, 4200
MOV B,M
INX H
MVI C,00
MVI A,00
L2: ADD M
JNC L1
INR C
L1: DCR B
JNZ L2
INX H
MOV M,A
INX H
MOV M,C
HLT
#ORG 4200
#DB 23,42
Click
ASSEMBLE, Run all at a Time and then Memory
Observation
Input Output
4200 4202
4201 4203
Result
Thus the multiplication of two numbers was performed using the 8085 microprocessor
simulator.
122
Appendix A - 8085 Instruction set and Opcodes (Hex code)