WAP to Display 'R' in LED Matrix:
#include<lpc21xx.h>
void delay(int a);
int main()
{
PINSEL0=0x000000000;
PINSEL1=0x000000000;
IO0DIR=0xffffffff;
while(1)
{
IO0SET=(4063<<0);
delay(100);
IO0CLR=(4063<<0);
delay(1);
IO0SET=(4017<<0);
delay(100);
IO0SET=(4017<<0);
delay(1);
IO0CLR=(3953<<0);
delay(100);
IO0CLR=(3953<<0);
delay(1);
IO0SET=(3839<<0);
delay(100);
IO0CLR=(3839<<0);
delay(1);
IO0SET=(3572<<0);
delay(100);
IO0CLR=(3572<<0);
delay(1);
IO0SET=(3058<<0);
delay(100);
IO0CLR=(3058<<0);
delay(1);
IO0SET=(2033<<0);
delay(100);
IO0CLR=(2033<<0);
}
}
void delay(int a)
{
int i;
for(i=0;i<a;i++);
}
#include<lpc21xx.h>
void delay(int a);
int main()
{
PINSEL0=0x000000000;
PINSEL1=0x000000000;
IO0DIR=0xffffffff;
while(1)
{
IO0SET=(4063<<0);
delay(100);
IO0CLR=(4063<<0);
delay(1);
IO0SET=(4017<<0);
delay(100);
IO0SET=(4017<<0);
delay(1);
IO0CLR=(3953<<0);
delay(100);
IO0CLR=(3953<<0);
delay(1);
IO0SET=(3839<<0);
delay(100);
IO0CLR=(3839<<0);
delay(1);
IO0SET=(3572<<0);
delay(100);
IO0CLR=(3572<<0);
delay(1);
IO0SET=(3058<<0);
delay(100);
IO0CLR=(3058<<0);
delay(1);
IO0SET=(2033<<0);
delay(100);
IO0CLR=(2033<<0);
}
}
void delay(int a)
{
int i;
for(i=0;i<a;i++);
}