0% found this document useful (0 votes)
158 views

This Study Resource Was: Program 1

The document summarizes two programs written for a microcontroller lab. The first program loads data into memory locations and pushes and pops values from the stack. The second program calculates the average age of 12 children by first loading age data from ROM to RAM, adding the values, and displaying the BCD result.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

This Study Resource Was: Program 1

The document summarizes two programs written for a microcontroller lab. The first program loads data into memory locations and pushes and pops values from the stack. The second program calculates the average age of 12 children by first loading age data from ROM to RAM, adding the values, and displaying the BCD result.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ECE 3003- MICROCONTROLLER LAB

Reg No.= 18BEC0506


Name= Anchit

m
Lab Slot= L43+L44

er as
co
Program 1: Load 40H into the stack pointer register. Load 5 data’s (8

eH w
bit data) into Bank 2. Push all the 5 data’s into the stack and retrieve

o.
the data from stack to bank 0.
rs e
ou urc
Program:
o
aC s
vi y re
ed d
ar stu
is
Th
sh

Result(Memory window):

This study source was downloaded by 100000805495355 from CourseHero.com on 08-23-2021 09:11:24 GMT -05:00

https://www.coursehero.com/file/71739355/18BEC0506-Task-1pdf/
m
er as
co
eH w
o.
rs e
Program 2: Write a program to find the average age of a group of
ou urc
children in a class. There are 12 Children, ranging in age from 5 to 15
years old. Pick your own data. Notice that you must first bring the
o

data from ROM space into the CPU's RAM and then add them
aC s
vi y re

together. Using KEIL simulator, Simulate to get the results in BCD.


Program:
ed d
ar stu
is
Th
sh

This study source was downloaded by 100000805495355 from CourseHero.com on 08-23-2021 09:11:24 GMT -05:00

https://www.coursehero.com/file/71739355/18BEC0506-Task-1pdf/
Result:

m
er as
co
eH w
o.
Zoomed image of Result window:
rs e
ou urc
o
aC s
vi y re
ed d
ar stu
is
Th
sh

This study source was downloaded by 100000805495355 from CourseHero.com on 08-23-2021 09:11:24 GMT -05:00

https://www.coursehero.com/file/71739355/18BEC0506-Task-1pdf/
Powered by TCPDF (www.tcpdf.org)

You might also like