zahid0055
Newbie level 3
I got a .c file from **broken link removed** . I have edited the file for my own program but I can not compile it to build the .HEX file. Can anybody help me making the .HEX file for my .c file???
Code:
#include<reg51.h>
sbit row1 = P1^1;
sbit row2 = P1^0;
sbit row3 = P1^3;
sbit row4 = P1^2;
sbit row5 = P1^5;
sbit row6 = P1^4;
sbit row7 = P1^7;
sbit row8 = P1^6;
void delay(unsigned int y)
{
unsigned int x;
for(x=0;x<y;x++);
}
void main()
{
unsigned int a;
P1 = 0xff;
a=150;
while(1)
{
//////////////////////T
row2=0;row3=0;
delay(a);
P1 = 0xff;
row2=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////T
//////////////////////E
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////E
//////////////////////A
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////A
////////////////////M
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row3=0;
delay(a);
P1 = 0xff;
row4=0;
delay(a);
P1 = 0xff;
row5=0;
delay(a);
P1 = 0xff;
row4=0;
delay(a);
P1 = 0xff;
row3=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
delay(5000);
delay(5000);
//////////////////M
//////////////////////I
row2=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////I
//////////////////////N
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row3=0;
delay(a);
P1 = 0xff;
row4=0;
delay(a);
P1 = 0xff;
row5=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////N
//////////////////////N
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row3=0;
delay(a);
P1 = 0xff;
row4=0;
delay(a);
P1 = 0xff;
row5=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////N
//////////////////////O
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
row2=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row8=0;
delay(a);
P1 = 0xff;
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////O
//////////////////////V
row2=0;row3=0;row4=0;row5=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row8=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////V
//////////////////////A
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;
delay(a);
P1 = 0xff;
row3=0;row4=0;row5=0;row6=0;row7=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////A
//////////////////////T
row2=0;row3=0;
delay(a);
P1 = 0xff;
row2=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////T
//////////////////////I
row2=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////I
//////////////////////V
row2=0;row3=0;row4=0;row5=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row8=0;
delay(a);
P1 = 0xff;
row7=0;
delay(a);
P1 = 0xff;
row6=0;
delay(a);
P1 = 0xff;
row2=0;row3=0;row4=0;row5=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////V
//////////////////////E
row2=0;row3=0;row4=0;row5=0;row6=0;row7=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
row2=0;row5=0;row8=0;
delay(a);
P1 = 0xff;
delay(a);
delay(a);
//////////////////////E
}
}