Professional Documents
Culture Documents
ASSIGNMENT 4
PAVITHRAN T M
P2VLD16018
1. Implement a code to make an LED connected to the port blink. Let the delay be
1second (1 second on and 1 second off). Load the code into Proteus and verify the
results.
PROGRAM: -
#include<lpc214x.h>
void delay(void);
int main()
while(1)
IOSET0 = (1<<16);
delay();
IOCLR0 = (1<<16);
}//End of While
}//End of main
void delay(void)
{ int i;
for(i = 0; i<100;i++)
{//empty loop//
}//End of function
P2VLD16018 Page 1
Embedded Systems 2017
1. The steps till creation of .hex files are already explained in previous assignments.
Once all the steps are completed in Keil uVision.
2. Open Proteus 7.
3. Create a New Project.
4. Go to Libraries Pick parts from libraries (P) and select LPC2148. (Since the
current version of Proteus doesnt include LPC 2148, we are using LPC2138).
5. Select Power and Ground from Terminal Mode and place on root sheet.
6. Select properties of Power terminal and give +3V as supply.
7. Connect power terminal to VBAT(pin #49), VREF(pin #63), V3A(pin #7) of ARM.
8. Select any active LED from Library and place on sheet.
9. Connect the LED to output of ARM and ground it properly.
10. Go to properties of LPC2138 and browse the .hex project file to Program File.
P2VLD16018 Page 2
Embedded Systems 2017
SIMULATION OUTPUT: -
PROTEUS SIMULATION
LED OFF: -
LED ON: -
P2VLD16018 Page 3
Embedded Systems 2017
P2VLD16018 Page 4