Download Embedded Systems

Transcript
Experiment No. 5: Aim : Write a program to interface LCD. Apparatus :­ EDU­ARM­2148 Trainer kit with 16x2 LCD,SCRAM,PC Theory :­ Write theory related to LDC Interfacing with ARM Processors. Block Diagram:­ J1/UART0 J1
[16x2 LCD] EDU­ARM7­2148 PC Serial Cable Programm:­ Program is given along with the compiler software. Source Code: #include <Philips\LPC2148.h> #include "lcd.h" void main () { LcdInit(); DisplayRow (1," JNEC "); DisplayRow (2," Aurangabad "); while(1) {} } Function: LCD #include <Philips\LPC2148.h> #include "lcd.h" void SmallDelay (void) { int i; for(i=0;i<100;i++); } void LcdCmd1 (unsigned char cmd) { if (cmd & 0x01) IO0SET = (1<<15); else IO0CLR = (1<<15); 18