SDM COLLEGE OF ENGINEERING AND TECHNOLOGY, DHARWAD
Microcontroller Lab
Manual
2019-20
MICROCONTROLLER LAB MANUAL
Double Click on the Talk
You will get this on the screen
2 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Press ‘RESET’ and ‘E’ on the microcontroller kit and you will get this on the screen →
3 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Press again ‘RESET’ and ‘E’ and you will get →
4 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Press ‘H’ in computer key board to get the help menu →
ALS 8031 Monitor V1.0
8031>H
HELP MENU
<D> Display data, program, internal, bit memory or registers
<E> Edit data, program, internal, bit memory or registers
<S> Single step from specified address, press sp to terminate
<G> Execute the program till user break
<B> Set address till where the program is to be executed
<C> Clear break points
F10 key followed by 4 key at the PC to Upload data to a file (DOS)
<T> Test the onboard peripherals
<:> Download a file from pc mem to the sda-31 kit (DOS)
<A> Assembler
<Z> Disassembler
To see the register contents press ‘D’ then ‘R’ on computer key board →
To see the bit addressable area press D followed by B →
5 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
To see the content of Internal Memory press ‘D’ followed by ‘M’ →
To see the program code press ‘D’ followed by ‘P’ then enter start and end address→
To see the external data RAM press D followed by D then enter start and end address→
6 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
To write a program press ‘A’ and then enter the starting address then one by one instructions at
the end type LCALL 0003 without fail, then press one more enter key.
Example →
To execute the program till user break press ‘G’ followed by address. You will get the
following result for the above program→
MOV R0,#05 R0=05
MOV A,#02 A=02
ADD A,R0 A=07
LCALL 0003
We can see on the screen that ACC(accumlator) value is 07 and register R0 is 05.
If we need to edit any data press E followed by whatever you want to edit (R for registers,
B for bits, M for internal RAM, P for program code and D for external data RAM).
For example if I want to make following changes in R→
NOW AFTER CHANGING
ACC=07 ACC= 03
R0= 05 R0=08
7 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Press spacebar to go to the next register.
To execute program step by step press ‘S’ and enter the start address→
(Press space bar to come out of the loop)
8 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
EXAMPLE 2→
To take values from user, let us consider the following example→
To take values from user press ‘E’ followed by ‘R’ and enter the values in the registers
we’ve used in the program (Here,R0 & R1)→
Now press ‘G’ and start address to execute the program→
We can see the value of ACC is ‘0D’ (08+05=13).
9 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
EXAMPLE 3→
To input the values in memory locations from the user.
To add values press ‘E’ followed by ‘M’ and enter the starting address(Here,25) →
Now press ‘G’ to execute→
EXAMPLE 4→
To upload the program.
Step 1: Press ‘A’ and enter the starting address and write the program.
Step 2: Go to the File dropdown and select ‘Upload Intel Hex File’.
10 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Step 3: Save the file giving any name with extension .hex
11 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Step 4: Enter starting and ending address.
Step 5: Press ‘Z’ to see the code. After that, press A and enter the start address (For
eg.:8000). Then type NOP (i.e. no operation) to clear memory locations.
12 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Step 6: Press ‘Z’ again to see the program.
13 Dept. of E&CE SDMCET Dharwad
MICROCONTROLLER LAB MANUAL
Step 7: Now go to file dropdown again and click ‘Download Intel Hex File’ and select the previously
uploaded file.
Step 8: Now the file has uploaded.
Prepared by
Vidhya H - 2SD17EC115
Kshama Tallur - 2SD17EC045
14 Dept. of E&CE SDMCET Dharwad