0% found this document useful (0 votes)
5 views5 pages

UART

The document outlines a series of experiments for an ARM Microcontroller Lab course, focusing on interfacing various components such as LEDs, motors, and LCDs. It includes a specific experiment on interfacing an on-board LCD with an Embedded C program for the LPC2148 microcontroller. Additionally, it details the grading criteria for the lab work, including marks for experiments, journal, and project.

Uploaded by

pastforget784
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)
5 views5 pages

UART

The document outlines a series of experiments for an ARM Microcontroller Lab course, focusing on interfacing various components such as LEDs, motors, and LCDs. It includes a specific experiment on interfacing an on-board LCD with an Embedded C program for the LPC2148 microcontroller. Additionally, it details the grading criteria for the lab work, including marks for experiments, journal, and project.

Uploaded by

pastforget784
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

Index

Marks
Expt. Page Staff
Date Title (out of
No. No. Sign
10)

1 Interfacing of LED and BUZZER

2 Interfacing of 7-segment display

Interfacing of DC and Stepper


3
motor

4 Interfacing of on-chip Timer

5 Interfacing of on-chip PWM


Blinking of LEDs using External
6
Interrupts
7 Interfacing of on-chip UART

8 Interfacing of on-chip DAC

9 Interfacing of on-chip ADC

10 Interfacing of on-board LCD

AVERAGE MARKS

ARM Microcontroller Lab 22ECL68 Dept. of E&C Engg.


Page no.1
Experiment No: 7 Date: USN:

Aim: To write, compile, and execute an Embedded C program on the LPC2148 to interface
on board LCD
Program #include<lpc214x.h>

#define RS (1<<16)
#define EN (1<<17)

void delay(unsigned int time)


{
int i,j;
for(i=0;i<time;i++)
for(j=0;j<6000;j++);
}

void lcd_cmd(unsigned char cmd)


{
IO0CLR = 0x000000FF;
IO0SET = cmd;

IO0CLR = RS;
IO0SET = EN;
delay(2);
IO0CLR = EN;
}

void lcd_data(unsigned char data)


{
IO0CLR = 0x000000FF;
IO0SET = data;

IO0SET = RS;
IO0SET = EN;
delay(2);
IO0CLR = EN;
}

void lcd_string(char *msg)


{
while(*msg)
{
lcd_data(*msg);
msg++;
}
}

void lcd_init()

ARM Microcontroller Lab 22ECL68 Dept. of E&C Engg.


Page no.1
{
lcd_cmd(0x38);
lcd_cmd(0x0C);
lcd_cmd(0x06);
lcd_cmd(0x01);
}

int main()
{
PINSEL0 = 0x00000000;
IO0DIR = 0x0003FFFF;

lcd_init();

while(1)
{
lcd_cmd(0x80);
lcd_string("HELLO");

delay(1000);

lcd_cmd(0x01);

delay(1000);
}
}

Registers Conditions:
Register Conditions Explanation

ARM Microcontroller Lab 22ECL68 Dept. of E&C Engg.


Page no.1
Explain with
relevant
diagram

ARM Microcontroller Lab 22ECL68 Dept. of E&C Engg.


Page no.1
Outcome

Conclusion

Component Max Marks Marks allocated


Conduction of experiments & viva-voce 20
Journal 5
Lab project/ Open ended expt 10

Staff Signature

ARM Microcontroller Lab 22ECL68 Dept. of E&C Engg.


Page no.1

You might also like