___________________________________________________________________________________________________
________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ ________________________________________________________________________________________________________ Content for the tab VIDEO
1. CIRCUIT DIAGRAM OF LED AND SWITCH INTERFACING WITH ARM7 (LPC21XX)
2. CIRCUIT DIAGRAM OF LED 7 SEGMENT AND 2 SWITCH INTERFACING WITH ARM7 (LPC21XX)
1. Program Of Control Led Blinking Using Switch Interfacing With ARM7 (LPC21XX)
/******************************************************
IDE :- Keil
DEVELOPED BY:- FIRMWARE DEVELOPER (www.firmcodes.com)
WHAT PROGRAM DO:- PROGRAM TO CONTROL LED BLINKING
USING SWITCH WITH ARM7(LPC21XX)
******************************************************/
#include<lpc21xx.h>
#define switch_1 (IO0PIN&0X01)
#define led (0xff<<1)
void delay();
int main()
{
PINSEL0=0X00000000;
IO0DIR=0Xfffffffe;
IO0CLR=led;
while(1)
{
if(switch_1==1)
{
IO0SET=led;
delay();
IO0CLR=led;
delay();
}
}
}
void delay()
{
int i,j;
for(i=0;i<100;i++)
for(j=0;j<600;j++);
}
PROTEUS File for SIMULATION(Password Of RAR file is :-firmcodes.com)
2. Program in which led is controlled by one switch and 7 segment is controlled by other switch interfacing with ARM7 (LPC2148)
/******************************************************
IDE :- Keil
DEVELOPED BY:- FIRMWARE DEVELOPER (www.firmcodes.com)
WHAT PROGRAM DO:- PROGRAM OF TWO SWITCH,ONE CONTROL LED BLINKING AND
OTHER CONTROL 7 SEGMENT CONNECTED WITH ARM7(LPC21XX)
******************************************************/
#include<lpc21xx.h>
#define switch_1 (IO0PIN&(1<<0))
#define switch_2 (IO0PIN&(1<<1))
#define led (0xff<<2)
void delay();
int data1[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90 }; // array data
int main()
{
int i=0;
PINSEL0=0X0000000;
IO0DIR=0XFFFFFFFD;
while(1)
{
if(switch_1==1)
{
IO0SET=led;
delay();
delay();
IO0CLR=led;
delay();
}
if(switch_2==0)
{
if(i==10)
i=0;
IO0SET=(data1[i]<<12);
delay();
delay();
delay();
delay();
delay();
delay();
delay();
delay();
IO0CLR=(data1[i]<<12);
i++;
}
}
}
void delay()
{
int i,j;
for(i=0;i<100;i++)
for(j=0;j<600;j++);
}
PROTEUS File for SIMULATION(Password Of RAR file is :-firmcodes.com)