INTRODUCTION TO MICROPROCESSOR TRAINER KIT AND PROGRAMMING

                

                              In our experiments we used Micro 85 EB trainer kit from Vi Micro systems. The steps involved in doing programs in trainer kit are summarized below.

 

1.Write  the program

2.Prepare the hex code of the program

3.Enter the hex code to trainer kit in suitable locations(eg:From 4100 H)

4.Give sufficient data for program in data memory(eg:From 4200 H)

5.Run the program

6.Check for output

 

The programming procedure  is explained through an example. Consider the case of addition of two 8 bit numbers.

 

1.WRITE THE PROGRAM

 

                   MV1 C,00

                   LDA 4200

                    MOV B,A

                   LDA 4201

                   ADD B

                   JNC LABEL1

                    INRC

    LABEL1:STA 4202

                   MOV A,C

                   STA 4203

                    HLT

 

2.PREPARE HEX CODE OF THE PROGRAM

 

                  Hex code is preparing in accordance with the Intel Hex file format.The hex code table is given below.Each instruction has a hex code. Consider the instruction ADD B.From the hex file format the corresponding hex code is 80.

                     Consider STA 4203 .The first  location should contain the hex code of STA. That is  32.Next location should contain the LSB of 4203, that is 03.The next location should contain the MSB of the address,that is 42.

                 The hex code table is given below

 

 

 

 

 

 

 

The hex code of the above program is given below.

 

 

LABEL

ADDRESS

MNEMONIC

CODE

COMMENT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

LABEL1

 

4100

4101

4102

4103

4104

4105

4106

4107

4108

4109

410A

410B

410C

410D

410E

410F

4110

4111

4112

4113

4114

4115

MVI C,00

 -

LDA 4200

-

-

MOV B,A

LDA 4201

-

-

ADD B

JNC LABEL1

-

-

INR C

STA 4202

-

-

MOV A,C

STA 4203

-

-

HLT

0E

00

3A

00

42

47

3A

01

42

80

D2

0E

41

0C

32

02

42

79

32

03

42

76

 

 

 

 

 

 

 

Write the meaning of each instruction in this column

 

 

3.ENTER THE HEX CODE TO THE TRAINER

 

       The obtained hex code now can be entered  to the trainer. Assume the program is entering from location 4100. Now to enter the code,press   SUB key +4100+NEXT key. Now the location will be 4100. Now start entering the program. After entering each code press the NEXT key to get the next location.

 

4.ENTER SUFFICIENT DATA

 

      In the above program the  two numbers  which are to be added are to be supplied. Suppose  the data memory is from locations 4200.To write  data  press   SUB key +4200+NEXT key . Now the address will be 4200.Enter the first data in 4200.Now press NEXT key to get the next location .

 

5.EXCECUTE THE PROGRAM

 Assume the program is from location 4100 and data memory is from 4200.Then the command to execute the program is  SUB key+4100+EXEC key. Now there   will be an E symbol on the display . This indicates the running of program.

6. CHECKING DATA MEMORY FOR RESULTS

  After  few seconds the running is stopping by an interrupt . Then the data memory can be read t get the result of running by the  SUB key +4200+NEXT key. In our example  assume  the input numbers are 05 and 04 .The output after running the program is given below.

 

ADDRESSES

DATA

INPUT/OUTPUT

4200

05

Input

4201

04

Input

4202

09

Output

4203

00

Output

 

Custom Search

Leave a Reply

2 Responses to “INTRODUCTION TO MICROPROCESSOR TRAINER KIT AND PROGRAMMING”

  • SHINESIMON says:

    Its very helpful for me to have this study materials.
    i am request everyone to make advantage of this.

  • saglibene says:

    This has got me thinking, I have a similar post idea, I?m going to do some research and probably reference this. Thanks for the idea.