ARM(LPC2148)basic programming tutorial: In the following ARM(LPC2148) tutorial i used books to learn fundamental knowledge about Embedded system. After that i install Kiel compiler and Proteus simulator tool to implement following basic ARM(LPC2148) programming tutorial:
Interfacing of LED with LPC2148: In this tutorial LED is blink after 1 sec using LPC2148 controller. If you want to learn more kindly see tutorial on youtube as well.
>> Led Blink C Code: /* THIS CODE IS TO CHECK ALL THE PORTS AT A TIME WITH LED ON /OFF */
#include"lpc214x.h" // lpc2148 header file for KIEL IDE
void delay(unsigned long int h) // delay function { unsigned long int i,j; for(j=0;j<h; j++) for(i=0;i<5000;i++); }
int main() { IODIR0 = 0xFFFFFFFF; // making port 0 output port IODIR1 = 0xFFFFFFFF; // making port 1 output port while(1) { IOCLR0 = 0xFFFFFFFF; // making port 0 low IOCLR1 = 0xFFFFFFFF; // making port 1 low delay(1000); IOSET0 = 0xFFFFFFFF; // making port 0 low IOSET1 = 0xFFFFFFFF; // making port 1 low delay(1000);