18CSL48
18CSL48
0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 1 / 26
Copyright ©2017. cAAS. All rights reserved.
-
Table of Contents
18CSL48 : MICROCONTROLLER AND EMBEDDED SYSTEMS LAB.......................................2
A. LABORATORY INFORMATION.......................................................................................2
1. Lab Overview..................................................................................................………..2
2. Lab Content...................................................................................................................2
3. Lab Material..................................................................................................................3
4. Lab Prerequisites:..........................................................................................................3
5. General Instructions.......................................................................................................3
6. Lab Specific Instructions...............................................................................................4
B. OBE PARAMETERS.............................................................................................................4
1. Lab / Course Outcomes.................................................................................................4
2. Lab Applications............................................................................................................4
3. Articulation Matrix........................................................................................................5
4. Mapping Justification....................................................................................................5
5. Curricular Gap and Content...........................................................................................6
6. Content Beyond Syllabus..............................................................................................6
C. COURSE ASSESSMENT......................................................................................................7
1. Course Coverage............................................................................................................7
2. Continuous Internal Assessment (CIA).........................................................................7
D. EXPERIMENTS....................................................................................................................7
Experiment 01 :.................................................................................................................7
Experiment 02 :.................................................................................................................8
Experiment 03 :...............................................................................................................10
Experiment 04 : ………..................................................................................................12
Experiment 05 : ………..................................................................................................13
Experiment 06 : ………..................................................................................................14
Experiment 07 : ………..................................................................................................16
Experiment 08 : ………..................................................................................................17
Experiment 09 : ………..................................................................................................19
Experiment 10 : ………..................................................................................................21
Experiment 11 : ………..................................................................................................22
Experiment 12 : ………………………………………………………………………...25
Experiment 13 : ………………………………………………………………………...29
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 2 / 26
Copyright ©2017. cAAS. All rights reserved.
A. LABORATORY INFORMATION
1. Lab Overview
Degree: BE Program: CS
Year / Semester : 2/4 Academic Year: 2018-19
CourseTitle: Microcontroller and Embedded Systems lab Course Code: 18CSL48
Credit / L-T-P: 2 / 1-0-2 SEE Duration: 180 Minutes
Total Contact Hours: 40 Hrs SEE Marks: 60Marks
CIA Marks: 40 Assignment 1 / Module
Course Plan Author: Prof. VINAY KUMAR B C Sign Dt :
Checked By: Sign Dt :
2. Lab Content
EXPT Title of the Experiments Lab Concept Blooms
Hours Level
1 Write a program to multiply two 16 bit binary numbers. 03 ALP L4
Analyze
2 Write a program to find the sum of first 10 integer numbers. 03 ALP L4
Analyze
3 Write a program to find factorial of a number. 03 ALP L4
Analyze
4 Write a program to add an array of 16 bit numbers and store the 03 ALP L4
32 bit result in internal RAM Analyze
5 Write a program to add an array of 16 bit numbers and store the 03 Interrupt L4
32 bit result in internal RAM Functions Analyze
6 Write a program to find the largest/smallest number in an array 03 ARM ALP L4
of 32 numbers &C Analyze
7 Write a program to arrange a series of 32 bit numbers in
ascending/descending order
8 Write a program to count the number of ones and zeros in two
consecutive memory locations
To write and simulate C Programs for ARM microprocessor using 03 ARM ALP L4
KEIL (Demonstrate with the help of a suitable program) &C Analyze
9 Display “Hello World” message using Internal UART 03 I/O L4
Interfacing Analyze
10 Interface and Control a DC Motor 03 I/O L4
Interface a Stepper motor and rotate it in clockwise and anti- Interfacing Analyze
clockwise direction.
11 Determine Digital output for a given Analog input using Internal 03 /O L4
ADC of ARM controller. Interfacing Analyze
Interface a DAC and generate Triangular and Square waveforms.
12 Interface a 4x4 keyboard and display the key code on an LCD 03 /O L4
Interfacing Analyze
13 Interface a 4x4 keyboard and display the key code on an LCD On/ 03 ARM L4
Off. Interface Analyze
14 Display the Hex digits 0 to F on a 7-segment LED interface, with 03 ARM L4
an appropriate delay in between Interface Analyze
3. Lab Material
Unit Details Available
1 Text books
In Lib
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 3 / 26
Copyright ©2017. cAAS. All rights reserved.
2 Reference books
In dept
4. Lab Prerequisites:
- - Base Course: - -
SNo Course Course Name Topic / Description Sem Remarks
Code
1 18CSL48 Microcontroller and 2
Embedded System
Lab
2
Note: If prerequisites are not taught earlier, GAP in curriculum needs to be addressed. Include in
Remarks and implement in B.5.
5. General Instructions
SNo Instructions Remarks
1 Observation book and Lab record are compulsory.
2 Students should report to the concerned lab as per the time table.
3 After completion of the program, certification of the concerned staff in-
charge in the observation book is necessary.
4 Student should bring a notebook of 100 pages and should enter the
readings /observations into the notebook while performing the experiment.
5 The record of observations along with the detailed experimental procedure
of the experiment in the Immediate last session should be submitted and
certified staff member in-charge.
6 Should attempt all problems / assignments given in the list session wise.
7 It is responsibility to create a separate directory to store all the programs, so
that nobody else can read or copy.
8 When the experiment is completed, should disconnect the setup made by
them, and should return all the components/instruments taken for the
purpose.
9 Any damage of the equipment or burn-out components will be viewed
seriously either by putting penalty or by dismissing the total group of
students from the lab for the semester/year
10 Completed lab assignments should be submitted in the form of a Lab
Record in which you have to write the algorithm, program code along with
comments and output for various inputs given
B. OBE PARAMETERS
1. Lab / Course Outcomes
# COs Teach. Concept
Instr Assessment Blooms’
Hours Method Method Level
1 Develop and test program using 24 ALP
Instructi Slip Test L2
ARM7TDMI/LPC2148 ons
&Demo
nstratio
n
2 Conduct the following experiments on an 16 INTERFACIN Instructi Slip Test L3
ARM7TDMI/LPC2148 evaluation board G ons
using evaluation version of Embedded 'C' &Demo
& Keil Uvision-4 tool/compiler nstratio
n
- Total 39 - - - -
Note: Identify a max of 2 Concepts per unit. Write 1 CO per concept.
2. Lab Applications
SNo Application Area CO Level
1 Assembly language programming is required to develop system programs CO1 L2
2 Interrupt Functions is required to formulate system program solutions CO1 L2
3 ARM AL and ‘C’ programming is required to develop embedded systems. CO2 L3
4 ARM programming for interfacing external devices is used design and develop CO2 L3
embedded systems.
Note: Write 1 or 2 applications per CO.
3. Articulation Matrix
(CO – PO MAPPING)
- Course Outcomes Program Outcomes
# COs PO PO PO PO PO PO PO PO PO PO PO PO Level
1 2 3 4 5 6 7 8 9 10 11 12
18CSl48.1 Develop and test program using 3 2 3 3 2
ARM7TDMI/LPC2148
18CSl48.2 Conduct the following 3 2 3 3 2 2 3
experiments on an
ARM7TDMI/LPC2148 evaluation
board using evaluation version
of Embedded 'C' & Keil Uvision-
4 tool/compiler.
Note: Mention the mapping strength as 1, 2, or 3
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 5 / 26
Copyright ©2017. cAAS. All rights reserved.
4. Mapping Justification
Mapping Mapping Justification
Level
CO PO - -
CO1 PO1 3 Knowledge of assembly language programming is required to develop
system programs
CO1 PO2 2 Knowledge of assembly language programming is useful in analyzing
system programs
CO1 PO3 3 Assembly language programs used to design and develop system
programs
CO1 PO5 3 Assembler tool used to learn Assembly language programming
CO2 PO1 3 Knowledge of Interrupt Functions is required to develop system
programs
CO2 PO2 2 Interrupt Functions is required to formulate system program solutions
CO2 PO3 3 Interrupt Functions are used to design and develop system programs
CO2 PO5 3 Interrupt Functions help in development of system program projects
CO2 PO11 2 Learning in the context of technology changes
CO2 PO12 3 ARM programming for interfacing external devices is used design and
develop embedded systems.
Note: Write justification for each CO-PO mapping.
Note: Write Gap topics from A.4 and add others also.
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 6 / 26
Copyright ©2017. cAAS. All rights reserved.
C. COURSE ASSESSMENT
1. Course Coverage
Unit Title Teachi No. of question in Exam CO Levels
ng CIA-1 CIA-2 CIA-3 Asg-1 Asg-2Asg-3 SEE
Hours
1 ALP for 16 Bit addition 03 1 - - - - - 1 CO1
2 ALP for first addition of ten 03 1 - - - - - 1 CO1
numbers
3 ALP for factorial number 03 1 - - - - - 1 CO1
4 ALP for add an array of 16 bit 03 1 - - - - 1 CO1
numbers
5 ALP to square of a number (1 to 03 - 1 - - - - 1 CO1
10) using look-up table.
Write a program to count the
number of ones and zeros in two
consecutive memory locations
6 largest/smallest number in an array 03 - 1 - - - - 1 CO1
of 32 numbers
arrange a series of 32 bit numbers
in ascending/descending order
7 ARM C programs 03 - 1 - - - - 1 CO2
8 Display “Hello World” message 03 - 1 - - - 1 CO2
using Internal UART.
9 Determine Digital output for a given 03 - - 1 - - - 1 CO2
Analog input using Internal ADC of
ARM controller
10 interface stepper motor 03 - - 1 - - - 1 CO2
Interface and Control a DC Motor
11 ALP to interface DAC 03 - - 1 - - - 1 CO2
Display the Hex digits 0 to F on a 7-
segment LED interface, with an
appropriate delay in between
12 interface LCD on/off 03 - - 1 - - - 1 CO2
13 Interface a 4x4 keyboard and 03 - - 1 - - - 1 CO2
display the key code on an LCD
- Total 39 4 4 5 13 -
Note: Write CO based on the theory course.
record 15
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 7 / 26
Copyright ©2017. cAAS. All rights reserved.
4 Internal Assessment 40 Marks
5 SEE 60 Marks
- Total 100 Marks
D. EXPERIMENTS
Experiment 01 :
- Experiment No.: 1 Marks Date Date
Planned Conducted
1 Title ALP for 16 Bit addition
2 Course Outcomes Able to develop ARM Assembly language program for addition
3 Aim Write a program to multiply two 16 bit binary numbers.
4 Material / Equipment 1. Designing tool software KEIL
Required
5 Theory, Formula,
Principle, Concept
END
10 Graphs, Outputs
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 8 / 26
Copyright ©2017. cAAS. All rights reserved.
11 Results &Analysis
Experiment 02 :
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 9 / 26
Copyright ©2017. cAAS. All rights reserved.
ARRAY DCD
1,2,3,4,
5,6,7,8,
9,10
END
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
Experiment 03 :
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 11 / 26
Copyright ©2017. cAAS. All rights reserved.
11 Results &Analysis
Experiment 04 : ………
VALUE1 DCW
0X1111,0X2222,0X3333,0X4444,0X3333
,0X5555 AREA
DATA2,DATA,READWRITE
RESULT DCD 0X0 END
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
Experiment 05 : ………
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 13 / 26
Copyright ©2017. cAAS. All rights reserved.
Planned Conducted
1 Title square of a number (1 to 10) using look-up table.
2 Course Outcomes Able to develop ARM Assembly language program using LOOKUP TABLE
3 Aim Write a program to find the square of a number (1 to 10) using
look-up table.
4 Material / 1. Designing tool software KEIL
Equipment
Required
5 Theory, Formula,
Principle, Concept
6 Procedure, AREA square, CODE, READONLY ENTRY
Program, Activity, MOV R1,#0X3 ; load the number to be squared
Algorithm, Pseudo
Code LDR R0,=LOOKUP ; load the starting address of the lookup table
MOV R1,R1,LSL#0X2 ; offset of value to be squared
ADD R0,R0,R1 ; points to mem where square of the given no is sor
LDR R3,[R0] ; load the squared value from look-up table
STOP B STOP
LOOKUP DCD
0X0,0X1,0x4,0x9,0x10,0x19,0x24,0x31,0x40,0x51,0x64
; look-up table
E
N
D
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 14 / 26
Copyright ©2017. cAAS. All rights reserved.
9 Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
Experiment 06 : ………
ARRAY DCD
0X23,0X45,0X65,0X76
,0X12,0X99
END
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
Observation Table,
Look-up Table,
Output
Sample
Calculations
10 Graphs, Outputs
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 16 / 26
Copyright ©2017. cAAS. All rights reserved.
11 Results &Analysis
12 Application Areas ARM AL and ‘C’ programming is required to develop embedded systems.
13 Remarks
14 Faculty Signature
with Date
Experiment 07 : ………
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 18 / 26
Copyright ©2017. cAAS. All rights reserved.
11 Results &Analysis
12 Application Areas ARM AL and ‘C’ programming is required to develop embedded systems.
13 Remarks
14 Faculty Signature
with Date
PART B
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 19 / 26
Copyright ©2017. cAAS. All rights reserved.
int main(void)
{
PINSEL0=0X0000005; //select TXD0 and RXD0 lines
U0THR = temp1 ;
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 20 / 26
Copyright ©2017. cAAS. All rights reserved.
Observation Table,
Look-up Table,
Output
Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
12 Application Areas ALP to interface with external I/O devices is used to design interfacing solutions
of computers with external devices
13 Remarks
14 Faculty Signature
with Date
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 21 / 26
Copyright ©2017. cAAS. All rights reserved.
Planned Conducted
1 Title Interface and Control a DC Motor.
2 Course Outcomes Able to Design and develop ARM assembly programs to interface with external
I/O devices
3 Aim Interface and Control a DC Motor
4 Material /
Equipment
Required
5 Theory, Formula,
Principle, Concept
6 Procedure, #in
Program, Activity,
Algorithm, Pseudo
clu
Code de
<lp
c2
14
x.h
>
voi
d
clo
ck
_w
ise
(vo
id);
void
anti_clo
ck_wise
(void);
unsigne
d int
j=0;
int main()
{
PINSEL2 = 0XFFFFFFF0;
//IO1CLR = 0X0000ff00;
IO1DIR= 0X00030000; //p1.16 and
p1.17 are selected as outputs. IO1SET=
0X00010000; //P1.16 should always high.
while(1)
{
clock_wise();
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 22 / 26
Copyright ©2017. cAAS. All rights reserved.
for(j=0;j<500000;j++); //delay
anti_clock_wise();
for(j=0;j<500000;j++); //delay
} //End of while(1)
} //End of Main
void clock_wise(void)
{
for(j=0;j<500000;j++); //small delay to allow motor to turn off
IO1SET = 0X00030000; //Selecting the P1.17 line for clockwise
and turn on motor
}
void anti_clock_wise(void)
{
IO1CLR = 0X00030000; //stop motor and also turn off
relay
for(j=0;j<1000000;j++); //small delay to allow motor to
turn off
IO1SET = 0X00010000; //not selecting the P1.17 line for
Anti clockwise
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
12 Application Areas 8086 ALP to interface with external I/O devices is used to design interfacing
solutions of computers with external devices
13 Remarks
14 Faculty Signature
with Date
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 23 / 26
Copyright ©2017. cAAS. All rights reserved.
2 Course Outcomes Able to Design and develop 8086assembly programs to interface with external
I/O devices
3 Aim
Interface a Stepper motor and rotate it in clockwise and
anti-clockwise direction.
4 Material /
Equipment
Required
5 Theory, Formula,
Principle, Concept
6 Procedure, #include <LPC21xx.h> void clock_wise(void) ;
Program, Activity, void
Algorithm, Pseudo
Code
anti_cloc
k_wise(v
oid) ;
unsigned
int var1 ;
unsigned long int i = 0 , j = 0 , k = 0 ;
int main(void)
{
PINSEL2 = 0x00000000; //P1.20 to P1.23 GPIO
IO1DIR |= 0x00F00000 ; //P1.20 to P1.23 made as output
while(1)
{
} // End of main
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
11 Results &Analysis
12 Application Areas interface with external I/O devices is used to design interfacing solutions of
computers with external devices
13 Remarks
14 Faculty Signature
with Date
delay(3200);
lcd_init(); //LCD initialization
delay(3200);
clr_disp(); //clear display
delay(3200); //delay
ptr = dis;
temp1 = 0x80; //Display starting address of 1st
line on LCD lcd_com();
delay(800);
while(*ptr!='\0')
ptr; lcd_data();
ptr ++;
}
7 Block, Circuit,
Model Diagram,
Reaction Equation,
Expected Graph
8 Observation Table,
Look-up Table,
Output
9 Sample
Calculations
10 Graphs, Outputs
IS
Prepared by Checked by Approved
SKIT Teaching Process Rev No.: 1.0
Doc Code: INST.Ph5b1.F02 Date: 3-12-2018
Title: Course Plan Page: 26 / 26
Copyright ©2017. cAAS. All rights reserved.
11 Results &Analysis
12 Application Areas interface with external I/O devices is used to design interfacing solutions of
computers with external devices
13 Remarks
14 Faculty Signature
with Date
IS
Prepared by Checked by Approved