Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

please help with this code...i need to compile this..can anyone help..

Status
Not open for further replies.

domdomgin

Newbie level 5
Joined
Jul 24, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,331
Code:
#define x1  porta.f0
#define x2  porta.f1
#define x3  porta.f2
#define x4  porta.f3
#define x5  porta.f5
#define x6  porte.f0
#define x7  porte.f1
#define x8  porte.f2
#define x9 portc.f0
#define x10 portc.f1
#define x11 portc.f2
#define x12 portc.f3
#define x13 portd.f0
#define x14 portd.f1
#define x15 portd.f2
#define x16 portd.f3
#define x17 portc.f4
#define x18 portc.f5
#define x19 portc.f6
#define x20 portc.f7
#define x21 portd.f4
#define x22 portd.f5
#define x23 portd.f6
#define x24 portd.f7
#define x25 portb.f0
#define x26 portb.f1
#define x27 portb.f2
#define x28 portb.f3
#define x29 portb.f4
#define x30 portb.f5
#define x31 portb.f6
#define x32 portb.f7

unsigned char new;

void init_all(void){
porta = 0;
portb = 0;
portc = 0;
portd = 0;
porte = 0;
adcon1 = 0x06;
cmcon = 0x07;
trisa= 0;
trisb = 0;
trisc = 0;
trisd = 0;
trise = 0;
}

void very_first(void){
x3 = 1;
delay_ms(2000);
x32 = 1;
delay_ms(2000);
x16 = 1;
delay_ms(2000);
x10 = 1;
delay_ms(2000);
x25 = 1;
delay_ms(2000);
x20 = 1;
delay_ms(2000);
x28 = 1;
delay_ms(2000);
x14 = 1;
delay_ms(2000);
x6 = 1;
delay_ms(1500);
x30 = 1;
delay_ms(1300);

}

void first_patta(void){                                  //1st pattern goes here
x1 = 1;
delay_ms(150);
x2 = 1;
delay_ms(150);
x3 = 1;
delay_ms(150);
x4 = 1;
delay_ms(150);
x5 = 1;
delay_ms(150);
x6 = 1;
delay_ms(150);
x7 = 1;
delay_ms(150);
x8 = 1;
delay_ms(150);
x9 = 1;
delay_ms(150);
x10 = 1;
delay_ms(150);
x11 = 1;
delay_ms(150);
x12 = 1;
delay_ms(150);
x13 = 1;
delay_ms(150);
x14 = 1;
delay_ms(150);
x15 = 1;
delay_ms(150);
x16 = 1;
delay_ms(150);
x17 = 1;
delay_ms(150);
x18 = 1;
delay_ms(150);
x19 = 1;
delay_ms(150);
x20 = 1;
delay_ms(150);
x21 = 1;
delay_ms(150);
x22 = 1;
delay_ms(150);
x23 = 1;
delay_ms(150);
x24 = 1;
delay_ms(150);
x25 = 1;
delay_ms(150);
x26 = 1;
delay_ms(150);
x27 = 1;
delay_ms(150);
x28 = 1;
delay_ms(150);
x29 = 1;
delay_ms(150);
x30 = 1;
delay_ms(150);
x31 = 1;
delay_ms(150);
x32 = 1;
delay_ms(150);

}

void first_pattb(void){
x1 = 0;
delay_ms(150);
x2 = 0;
delay_ms(150);
x3 = 0;
delay_ms(150);
x4 = 0;
delay_ms(150);
x5 = 0;
delay_ms(150);
x6 = 0;
delay_ms(150);
x7 = 0;
delay_ms(150);
x8 = 0;
delay_ms(150);
x9 = 0;
delay_ms(150);
x10 = 0;
delay_ms(150);
x11 = 0;
delay_ms(150);
x12 = 0;
delay_ms(150);
x13 = 0;
delay_ms(150);
x14 = 0;
delay_ms(150);
x15 = 0;
delay_ms(150);
x16 = 0;
delay_ms(150);
x17 = 0;
delay_ms(150);
x18 = 0;
delay_ms(150);
x19 = 0;
delay_ms(150);
x20 = 0;
delay_ms(150);
x21 = 0;
delay_ms(150);
x22 = 0;
delay_ms(150);
x23 = 0;
delay_ms(150);
x24 = 0;
delay_ms(150);
x25 = 0;
delay_ms(150);
x26 = 0;
delay_ms(150);
x27 = 0;
delay_ms(150);
x28 = 0;
delay_ms(150);
x29 = 0;
delay_ms(150);
x30 = 0;
delay_ms(150);
x31 = 0;
delay_ms(150);
x32 = 0;
delay_ms(150);
}

void second_patta(void){                                  //light all
porta = 0xFF;
portb = 0xFF;
portc = 0xFF;
portd = 0xFF;
porte = 0xFF;
}

void second_pattb(void){                                 //off all
porta = 0;
portb = 0;
portc = 0;
portd = 0;
porte = 0;
}
void third_patt(void){                                   //third pattern goes here

x17 = 1;
delay_ms(70);
x16 = 1;
x18 = 1;
delay_ms(70);
x15 = 1;
x19 = 1;
delay_ms(70);
x14 = 1;
x20 = 1;
delay_ms(70);
x13 = 1;
x21 = 1;
delay_ms(70);
x12 = 1;
x22 = 1;
delay_ms(70);
x11 = 1;
x23 = 1;
delay_ms(70);
x10 = 1;
x24 = 1;
delay_ms(70);
x9 = 1;
x25 = 1;
delay_ms(70);
x8 = 1;
x26 = 1;
delay_ms(70);
x7 = 1;
x27 = 1;
delay_ms(70);
x6 = 1;
x28 = 1;
delay_ms(70);
x5 = 1;
x29 = 1;
delay_ms(70);
x4 = 1;
x30 = 1;
delay_ms(60);
x3 = 1;
x31 = 1;
delay_ms(60);
x2 = 1;
x32 = 1;
delay_ms(60);
x1 = 1;
delay_ms(50);
x1 = 0;
delay_ms(50);
x2 = 0;
x32 = 0;
delay_ms(50);
x3 = 0;
x31 = 0;
delay_ms(50);
x4 = 0;
x30 = 0;
delay_ms(50);
x5 = 0;
x29 = 0;
delay_ms(50);
x6 = 0;
x28 = 0;
delay_ms(50);
x7 = 0;
x27 = 0;
delay_ms(50);
x8 = 0;
x26 = 0;
delay_ms(50);
x9 = 0;
x25 = 0;
delay_ms(50);
x10 = 0;
x24 = 0;
delay_ms(50);
x11 = 0;
x23 = 0;
delay_ms(50);
x12 = 0;
x22 = 0;
delay_ms(50);
x13 = 0;
x21 = 0;
delay_ms(40);
x14 = 0;
x20 = 0;
delay_ms(30);
x15 = 0;
x19 = 0;
delay_ms(30);
x16 = 0;
x18 = 0;
delay_ms(30);
x17 = 0;
delay_ms(20);
}

void fourth_patt(void){                                    //fourth pattern goes here

x1 = 1;
delay_ms(50);

x1 = 1;
x32 = 1;
delay_ms(50);

x1 = 1;
x32 = 1;
x31 = 1;
delay_ms(50);

x30 = 1;
x31 = 1;
x32 = 1;
x1 = 1;
delay_ms(50);

x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
x1 = 1;
delay_ms(50);

x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
x1 = 0;
delay_ms(50);

x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 0;
delay_ms(50);

x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 0;
delay_ms(50);

x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 0;
delay_ms(50);

x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 0;
delay_ms(50);

x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27= 1;
x28 = 0;
delay_ms(50);

x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 0;
delay_ms(50);

x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 0;
delay_ms(50);

x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 0;
delay_ms(50);

x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 0;
delay_ms(50);

x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 0;
delay_ms(50);

x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 0;
delay_ms(100);

x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 0;
delay_ms(50);

x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 0;
delay_ms(50);

x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 0;
delay_ms(50);

x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 0;
delay_ms(50);

x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 0;
delay_ms(50);

x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 0;
delay_ms(50);

x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 0;
delay_ms(50);

x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 0;
delay_ms(50);

x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 0;
delay_ms(50);

x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 0;
delay_ms(50);

x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 0;
delay_ms(50);

x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 0;
delay_ms(50);

x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 0;
delay_ms(50);

x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 0;
delay_ms(100);

x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 0;
delay_ms(50);

x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 0;
delay_ms(50);

x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 0;
delay_ms(50);

x1 = 1;
x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 0;
delay_ms(50);

}
///////////////////////////////////////////////////////////////////////////////////////////////////////
void fifth_patt(){                                        //fifth pattern goes here

x1 = 1;
x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
delay_ms(100);

x1 = 0;
x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
delay_ms(100);

x2 = 0;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
delay_ms(100);

x3 = 0;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
delay_ms(100);

x4 = 0;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
delay_ms(100);

x5 = 0;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
delay_ms(100);

x6 = 0;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
delay_ms(100);

x7 = 0;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
delay_ms(100);

x8 = 0;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
delay_ms(100);

x9 = 0;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
delay_ms(100);

x10 = 0;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
delay_ms(100);

x11 = 0;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

x12 = 0;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
delay_ms(100);

x13 = 0;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
delay_ms(100);

x14 = 0;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
delay_ms(100);

x15 = 0;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
delay_ms(100);

x16 = 0;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
delay_ms(100);

x17 = 0;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
delay_ms(100);

x18 = 0;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
delay_ms(100);

x19 = 0;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
delay_ms(100);

x20 = 0;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
delay_ms(100);

x21 = 0;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
delay_ms(100);

x22 = 0;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
delay_ms(100);

x23 = 0;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
delay_ms(100);

x24 = 0;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
delay_ms(100);

x25 = 0;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
delay_ms(100);

x26 = 0;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
delay_ms(100);

x27 = 0;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
x1 = 1;
delay_ms(100);
}

void sixth_patt(){                                      // six pattern goes here

x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
x1 = 1;
delay_ms(100);

x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 1;
x1 = 0;
delay_ms(100);

x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 1;
x32 = 0;
delay_ms(100);

x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 1;
x31 = 0;
delay_ms(100);

x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 1;
x30 = 0;
delay_ms(100);

x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 1;
x29 = 0;
delay_ms(100);

x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 1;
x28 = 0;
delay_ms(100);

x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 1;
x27 = 0;
delay_ms(100);

x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
x26 = 0;
delay_ms(100);

x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 0;
delay_ms(100);

x1 = 1;

x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;

x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;

x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;

x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;

x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;

x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 0;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;

x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 0;
delay_ms(100);

x1 = 0;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;

x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 0;
delay_ms(100);

x32 = 0;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;

x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 0;
delay_ms(100);

x31 = 0;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;

x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 0;
delay_ms(100);

x30 = 0;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;

x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 0;
delay_ms(100);

x29 = 0;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;

x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 0;
delay_ms(100);

x28 = 0;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;

x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 0;
delay_ms(100);

x27 = 0;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;

x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 0;
delay_ms(100);

x26 = 0;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;

x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 0;
delay_ms(100);

x25 = 0;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 1;

x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 0;
delay_ms(100);

x24 = 0;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 1;
x17 = 1;

x1 = 1;
x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 0;
delay_ms(100);

//return
x22 = 1;
x24 = 1;
x23 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 1;
x17 = 0;

x1 = 0;
x2 = 1;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
delay_ms(100);

x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 0;

x2 = 0;
x3 = 1;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
delay_ms(100);

x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;

x3 = 0;
x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
delay_ms(100);

x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 0;

x4 = 0;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
delay_ms(100);

x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 0;

x5 = 0;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
delay_ms(100);

x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 0;

x6 = 0;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
delay_ms(100);

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 0;

x7 = 0;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
delay_ms(100);

}

void seventh_patt(void){                                      // seventh pattern goes here
//// shake pattern

//start of return

x30 = 0;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;

x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 0;
delay_ms(300);

x29 = 0;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;

x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 0;
delay_ms(300);

x28 = 0;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;

x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 0;
delay_ms(300);

x27 = 0;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;

x4 = 1;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 0;
delay_ms(300);   //lowest

// repeat upward

x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 0;

x4 = 0;
x5 = 1;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
delay_ms(300);

x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 1;
x21 = 0;

x5 = 0;
x6 = 1;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
delay_ms(300);

x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 1;
x22 = 0;

x6 = 0;
x7 = 1;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
delay_ms(300);

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 1;
x23 = 0;

x7 = 0;
x8 = 1;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
delay_ms(300);

}

void eighth_patt(void){                                       // eighth pattern goes here

x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 1;
x24 = 0;

x8 = 0;
x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
delay_ms(100);

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
x25 = 0;
x24 = 0;

x8 = 0;
x9 = 0;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 0;

x10 = 0;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

//start to end

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 0;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 0;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 0;
x13 = 0;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 1;
x30 = 0;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 0;
x13 = 0;
x14 = 0;
x15 = 1;
x16 = 1;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 1;
x31 = 0;
x30 = 0;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 0;
x13 = 0;
x14 = 0;
x15 = 0;
x16 = 1;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 0;
x31 = 0;
x30 = 0;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;

x10 = 0;
x11 = 0;
x12 = 0;
x13 = 0;
x14 = 0;
x15 = 0;
x16 = 0;
x17 = 1;
delay_ms(100);

x1 = 1;
x32 = 0;
x16 = 0;
x17 = 1;
delay_ms(100);

x1 = 0;
x32 = 0;
x16 = 0;
x17 = 0;
delay_ms(100);

}

void ninth_patt(void){                                        // ninth pattern goes here
x1 = 1;
delay_ms(100);

x1 = 0;
x32 = 1;
x2 = 1;
delay_ms(100);

x2 = 0;
x32 = 0;
x31 = 1;
x3 = 1;
delay_ms(100);

x3 = 0;
x31 = 0;
x30 = 1;
x4 = 1;
delay_ms(100);

x4 = 0;
x30 = 0;
x29 = 1;
x5 = 1;
delay_ms(100);

x5 = 0;
x29 = 0;
x28 = 1;
x6 = 1;
delay_ms(100);

x6 = 0;
x28= 0;
x27 = 1;
x7 = 1;
delay_ms(100);

x7 = 0;
x27 = 0;
x26 = 1;
x8 = 1;
delay_ms(100);

}

void tenth_patt(void){
x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

x12 = 0;
x22 = 0;
x21 = 1;
x13 = 1;
delay_ms(100);

x13 = 0;
x21 = 0;
x20 = 1;
x14 = 1;
delay_ms(100);

x14 = 0;
x20 = 0;
x19 = 1;
x15 = 1;
delay_ms(100);

x15 = 0;
x19 = 0;
x18 = 1;
x16 = 1;
delay_ms(100);

x18 = 0;
x16 = 0;
x17 = 1;
delay_ms(100);
}

void eleventh_patt(){
x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

x12 = 0;
x22 = 0;
x21 = 1;
x13 = 1;
delay_ms(100);

x13 = 0;
x21 = 0;
x20 = 1;
x14 = 1;
delay_ms(100);

x14 = 0;
x20 = 0;
x19 = 1;
x15 = 1;
delay_ms(100);

x15 = 0;
x19 = 0;
x18 = 1;
x16 = 1;
delay_ms(100);
}

void twelfth_patt(void){
x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

x12 = 0;
x22 = 0;
x21 = 1;
x13 = 1;
delay_ms(100);

x13 = 0;
x21 = 0;
x20 = 1;
x14 = 1;
delay_ms(100);

x14 = 0;
x20 = 0;
x19 = 1;
x15 = 1;
delay_ms(100);
}

void thirteenth_path(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

x12 = 0;
x22 = 0;
x21 = 1;
x13 = 1;
delay_ms(100);

x13 = 0;
x21 = 0;
x20 = 1;
x14 = 1;
delay_ms(100);

}

void fourteenth_patt(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

x12 = 0;
x22 = 0;
x21 = 1;
x13 = 1;
delay_ms(100);
}

void fifteenth_patt(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

x11 = 0;
x23 = 0;
x22 = 1;
x12 = 1;
delay_ms(100);

}

void sixteenth_patt(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

x10 = 0;
x24 = 0;
x23 = 1;
x11 = 1;
delay_ms(100);

}

void seventeenth_patt(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

x9 = 0;
x25 = 0;
x24 = 1;
x10 = 1;
delay_ms(100);

}

void eighteenth_patt(void){

x8 = 0;
x26 = 0;
x25 = 1;
x9 = 1;
delay_ms(100);

}

void ninteenth_patt(void){

x9 = 1;
x10 = 1;
x11 = 1;
x12 = 1;
x13 = 1;
x14 = 1;
x15 = 1;
x16 = 1;
x17 = 1;
x18 = 1;
x19 = 1;
x20 = 1;
x21 = 1;
x22 = 1;
x23 = 1;
x24 = 1;
x25 = 1;
}

void twentieth_patt(void){

x9 = 0;
x10 = 0;
x11 = 0;
x12 = 0;
x13 = 0;
x14 = 0;
x15 = 0;
x16 = 0;
x17 = 0;
x18 = 0;
x19 = 0;
x20 = 0;
x21 = 0;
x22 = 0;
x23 = 0;
x24 = 0;
x25 = 0;
}

void twenty1_patt(void){

x8 = 1;
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 1;
x2 = 1;
x1 = 1;
x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 1;
}

void twenty2_patt(void){

x8 = 0;
x7 = 0;
x6 = 0;
x5 = 0;
x4 = 0;
x3 = 0;
x2 = 0;
x1 = 0;
x32 = 0;
x31 = 0;
x30 = 0;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;
}

void twenty3_patt(void){
x1 = 1;
x2 = 0;
x3 = 1;
x4 = 0;
x5 = 1;
x6 = 0;
x7 = 1;
x8 = 0;
x9 = 1;
x10 = 0;
x11 = 1;
x12 = 0;
x13 = 1;
x14 = 0;
x15 = 1;
x16 = 0;
x17 = 1;
x18 = 0;
x19 = 1;
x20 = 0;
x21 = 1;
x22 = 0;
x23 = 1;
x24 = 0;
x25 = 1;
x26 = 0;
x27 = 1;
x28 = 0;
x29 = 1;
x30 = 0;
x31 = 1;
x32 = 0;
}

void twenty4_patt(void){              //moving heart
x1 = 0;
x2 = 1;
x3 = 0;
x4 = 1;
x5 = 0;
x6 = 1;
x7 = 0;
x8 = 1;
x9 = 0;
x10 = 1;
x11 = 0;
x12 = 1;
x13 = 0;
x14 = 1;
x15 = 0;
x16 = 1;
x17 = 0;
x18 = 1;
x19 = 0;
x20 = 1;
x21 = 0;
x22 = 1;
x23 = 0;
x24 = 1;
x25 = 0;
x26 = 1;
x27 = 0;
x28 = 1;
x29 = 0;
x30 = 1;
x31 = 0;
x32 = 1;
}

void twenty5_patt(void){         // passing pattern     a

x6 = 1;
x5 = 1;
x4 = 1;
x3 = 1;

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;

x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;

x14 = 1;
x13 = 1;
x12 = 1;
x11 = 1;
delay_ms(500);

// passing pattern  b

x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 1;

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 1;

x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 1;

x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 1;
delay_ms(500);

// passing pattern   c

x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 0;
x1 = 1;

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;
x25 = 1;

x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 0;
x17 = 1;

x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 0;
x9 = 1;
delay_ms(500);

// passing pattern  d

x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 0;
x1 = 0;
x32 = 1;

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;
x25 = 0;
x24 = 1;

x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 0;
x17 = 0;
x16 = 1;

x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 0;
x9 = 0;
x8 = 1;
delay_ms(500);

// passing pattern     e

x6 = 1;
x5 = 1;
x4 = 1;
x3 = 1;
x2 = 0;
x1 = 0;
x32 = 0;
x31 = 1;

x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 0;
x25 = 0;
x24 = 0;
x23 = 1;

x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 0;
x17 = 0;
x16 = 0;
x15 = 1;

x14 = 1;
x13 = 1;
x12 = 1;
x11 = 1;
x10 = 0;
x9 = 0;
x8 = 0;
x7 = 1;
delay_ms(500);
}

void twenty6_patt(void){

// passing pattern     a

x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 1;
x1 = 0;

x32 = 0;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 1;

x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 1;

x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 1;

delay_ms(500);

// passing pattern  b
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 0;
x1 = 1;

x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;
x25 = 1;

x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 0;
x17 = 1;

x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 0;
x9 = 1;
delay_ms(500);

// passing pattern  c

x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 0;
x1 = 0;
x32 = 1;

x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;
x25 = 0;
x24 = 1;

x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 0;
x17 = 0;
x16 = 1;

x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 0;
x9 = 0;
x8 = 1;

x3 = 1;
x11 = 1;
x19 = 1;
x27 = 1;
delay_ms(500);

}

void twenty7_patt(void){

//pattern a

x8 = 1;
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 1;

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 1;

x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 1;

x16 = 1;
x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 1;
delay_ms(500);

//pattern b

x8 = 1;
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 0;
x1 = 1;

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 0;
x25 = 1;

x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 0;
x17 = 1;

x16 = 1;
x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 0;
x9 = 1;
delay_ms(500);

}

void twenty8_patt(void){

//pattern a
x8 = 1;
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 1;
x1 = 0;

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 1;
x25 = 0;

x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 1;
x17 = 0;

x16 = 1;
x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 1;
x9 = 0;
delay_ms(500);

x8 = 1;
x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 1;
x2 = 0;
x1 = 1;

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 1;
x26 = 0;
x25 = 1;

x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 1;
x18 = 0;
x17 = 1;

x16 = 1;
x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 1;
x10 = 0;
x9 = 1;
delay_ms(500);

}

void twenty9_patt(void){

x7 = 1;
x6 = 1;
x5 = 1;
x4 = 1;
x3 = 0;
x2 = 1;
x1 = 1;

x32 = 1;
x31 = 1;
x30 = 1;
x29 = 1;
x28 = 1;
x27 = 0;
x26 = 1;
x25 = 1;

x24 = 1;
x23 = 1;
x22 = 1;
x21 = 1;
x20 = 1;
x19 = 0;
x18 = 1;
x17 = 1;

x16 = 1;
x15 = 1;
x14 = 1;
x13 = 1;
x12 = 1;
x11 = 0;
x10 = 1;
x9 = 1;
delay_ms(500);

}

void t30_patt(void){

second_patta();
x17 = 0;
delay_ms(100);

second_patta();
x16 = 0;
delay_ms(100);

second_patta();
x15 = 0;
delay_ms(100);

second_patta();
x14 = 0;
delay_ms(100);

second_patta();
x13 = 0;
delay_ms(100);

second_patta();
x12 = 0;
delay_ms(100);

second_patta();
x11 = 0;
delay_ms(100);

second_patta();
x10 = 0;
delay_ms(100);

second_patta();
x9 = 0;
delay_ms(100);

second_patta();
x8 = 0;
delay_ms(100);

second_patta();
x7 = 0;
delay_ms(100);

second_patta();
x6 = 0;
delay_ms(100);

second_patta();
x5 = 0;
delay_ms(100);

second_patta();
x4 = 0;
delay_ms(100);

second_patta();
x3 = 0;
delay_ms(100);

second_patta();
x2 = 0;
delay_ms(100);

second_patta();
x1 = 0;
delay_ms(100);

second_patta();
x32 = 0;
delay_ms(100);

second_patta();
x31 = 0;
delay_ms(90);

second_patta();
x30 = 0;
delay_ms(80);

second_patta();
x29 = 0;
delay_ms(80);

second_patta();
x28 = 0;
delay_ms(80);

second_patta();
x27 = 0;
delay_ms(70);

second_patta();
x26 = 0;
delay_ms(70);

second_patta();
x25 = 0;
delay_ms(60);

second_patta();
x24 = 0;
delay_ms(60);

second_patta();
x23 = 0;
delay_ms(60);

second_patta();
x22 = 0;
delay_ms(55);

second_patta();
x21 = 0;
delay_ms(55);

second_patta();
x20 = 0;
delay_ms(50);

second_patta();
x19 = 0;
delay_ms(50);

second_patta();
x18 = 0;
delay_ms(50);

second_patta();
x17 = 0;
delay_ms(50);

second_patta();
delay_ms(50);

///////////////// copy
}

void t31_patt(void){

x25 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
x31 = 0;
x19 = 0;
x18 = 1;
x32 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
x18 = 0;
x32 = 0;
x1 = 1;
x17 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
x31 = 0;
x19 = 0;
x18 = 1;
x32 = 1;
x1 = 0;
x17 = 0;
x16 = 1;
x2 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
x18 = 0;
x32 = 0;
x1 = 1;
x17 = 1;
x16 = 0;
x2 = 0;
x3 = 1;
x15 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
x31 = 0;
x19 = 0;
x18 = 1;
x32 = 1;
x1 = 0;
x17 = 0;
x16 = 1;
x2 = 1;
x3 = 0;
x15 = 0;
x14 = 1;
x4 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
x18 = 0;
x32 = 0;
x1 = 1;
x17 = 1;
x16 = 0;
x2 = 0;
x3 = 1;
x15 = 1;
x14 = 0;
x4 = 0;
x5 = 1;
x13 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
x31 = 0;
x19 = 0;
x18 = 1;
x32 = 1;
x1 = 0;
x17 = 0;
x16 = 1;
x2 = 1;
x3 = 0;
x15 = 0;
x14 = 1;
x4 = 1;
x5 = 0;
x13 = 0;
x12 = 1;
x6 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
x18 = 0;
x32 = 0;
x1 = 1;
x17 = 1;
x16 = 0;
x2 = 0;
x3 = 1;
x15 = 1;
x14 = 0;
x4 = 0;
x5 = 1;
x13 = 1;
x12 = 0;
x6 = 0;
x7 = 1;
x11 = 1;
delay_ms(150);

x25 = 0;
x24 = 1;
x26 = 1;
x27 = 0;
x23 = 0;
x22 = 1;
x28 = 1;
x21 = 0;
x29 = 0;
x30 = 1;
x20 = 1;
x31 = 0;
x19 = 0;
x18 = 1;
x32 = 1;
x1 = 0;
x17 = 0;
x16 = 1;
x2 = 1;
x3 = 0;
x15 = 0;
x14 = 1;
x4 = 1;
x5 = 0;
x13 = 0;
x12 = 1;
x6 = 1;
x7 = 0;
x11 = 0;
x8 = 1;
x10 = 1;
delay_ms(150);

x25 = 1;
x24 = 0;
x26 = 0;
x27 = 1;
x23 = 1;
x22 = 0;
x28 = 0;
x21 = 1;
x29 = 1;
x30 = 0;
x20 = 0;
x31 = 1;
x19 = 1;
x18 = 0;
x32 = 0;
x1 = 1;
x17 = 1;
x16 = 0;
x2 = 0;
x3 = 1;
x15 = 1;
x14 = 0;
x4 = 0;
x5 = 1;
x13 = 1;
x12 = 0;
x6 = 0;
x7 = 1;
x11 = 1;
x8 = 0;
x10 = 0;
x9 = 1;
delay_ms(150);

}

void t32_patta(void){
second_patta();
x13 = 0;
x12 = 0;
x11 = 0;
x10 = 0;
x5 = 0;
x4 = 0;
x3 = 0;
x2 = 0;
x29 = 0;
x28 = 0;
x27 = 0;
x26 = 0;
x21 = 0;
x20 = 0;
x19 = 0;
x18 = 0;
}

void t32_pattb(void){
second_patta();
x12 = 0;
x11 = 0;
x10 = 0;
x4 = 0;
x3 = 0;
x2 = 0;
x28 = 0;
x27 = 0;
x26 = 0;
x20 = 0;
x19 = 0;
x18 = 0;
}

void t32_pattc(void){
second_patta();
x11 = 0;
x10 = 0;
x3 = 0;
x2 = 0;
x27 = 0;
x26 = 0;
x19 = 0;
x18 = 0;
}

void t32_pattd(void){
second_patta();
x10 = 0;
x2 = 0;
x26 = 0;
x18 = 0;
}

void t33_patta(void){

second_patta();
x17 = 0;
x16 = 0;
x15 = 0;
x14 = 0;
x9 = 0;
x8 = 0;
x7 = 0;
x6 = 0;
x1 = 0;
x32 = 0;
x31 = 0;
x30 = 0;
x25 = 0;
x24 = 0;
x23 = 0;
x22 = 0;
}

void t33_pattb(void){
second_patta();
x17 = 0;
x16 = 0;
x15 = 0;
x9 = 0;
x8 = 0;
x7 = 0;
x1 = 0;
x32 = 0;
x31 = 0;
x25 = 0;
x24 = 0;
x23 = 0;
}

void t33_pattc(void){

second_patta();
x17 = 0;
x16 = 0;
x9 = 0;
x8 = 0;
x1 = 0;
x32 = 0;
x25 = 0;
x24 = 0;

}

void t33_pattd(void){

second_patta();
x17 = 0;
x9 = 0;
x1 = 0;
x25 = 0;
}

void main() {
init_all();
delay_us(1000);

while(1){
very_first();

first_patta();   /// 1st pattern
first_pattb();
second_patta();  /// 2nd pattern
delay_ms(800);
second_pattb();  /// 2nd pattern
delay_ms(800);

second_patta();  /// 2nd pattern
delay_ms(600);
second_pattb();  /// 2nd pattern
delay_ms(900);

third_patt();   /// 3rd pattern
fourth_patt();  /// 4th pattern
fifth_patt();   /// 5th pattern
sixth_patt();   /// 6th pattern
seventh_patt(); /// 7th pattern
seventh_patt(); /// 7th pattern
seventh_patt(); /// 7th pattern
eighth_patt(); /// 8th pattern
ninth_patt();   /// 9th pattern
tenth_patt();   /// 10th pattern
ninth_patt();
eleventh_patt();
ninth_patt();
twelfth_patt();
ninth_patt();
thirteenth_path();
ninth_patt();
fourteenth_patt();
ninth_patt();
fifteenth_patt();
ninth_patt();
sixteenth_patt();
ninth_patt();
seventeenth_patt();
ninth_patt();
eighteenth_patt();
//separate delays
ninteenth_patt();
delay_ms(100);
twentieth_patt();
delay_ms(300);

ninteenth_patt();
delay_ms(200);
twentieth_patt();
delay_ms(500);

ninteenth_patt();
delay_ms(200);
twentieth_patt();
delay_ms(700);

ninteenth_patt();
delay_ms(300);
twentieth_patt();
delay_ms(800);

twenty1_patt();
delay_ms(500);
twenty2_patt();
delay_ms(600);

twenty1_patt();
delay_ms(700);
twenty2_patt();
delay_ms(300);

twenty1_patt();
delay_ms(900);
twenty2_patt();
delay_ms(100);

second_patta();
delay_ms(800);
second_pattb();
delay_ms(800);

second_patta();
delay_ms(200);
second_pattb();
delay_ms(200);

second_patta();
delay_ms(800);
second_pattb();
delay_ms(800);

second_patta();
delay_ms(800);

twenty3_patt();
delay_ms(1000);
twenty4_patt();
delay_ms(800);

twenty3_patt();
delay_ms(800);
twenty4_patt();
delay_ms(1000);

twenty3_patt();
delay_ms(500);
twenty4_patt();
delay_ms(600);

twenty3_patt();
delay_ms(300);
twenty4_patt();
delay_ms(400);

twenty3_patt();
delay_ms(500);
twenty4_patt();
delay_ms(400);

twenty3_patt();
delay_ms(400);
twenty4_patt();
delay_ms(700);

second_patta();
delay_ms(500);
second_pattb();
delay_ms(700);

second_patta();
delay_ms(300);

twenty5_patt();
twenty6_patt();
twenty8_patt();
twenty9_patt();
second_patta();
delay_ms(500);

t30_patt();      //1 off led going around

first_pattb();

t31_patt();

twenty4_patt();
delay_ms(400);
twenty3_patt();                     //alternating
delay_ms(400);

twenty4_patt();
delay_ms(400);
twenty3_patt();                     //alternating
delay_ms(400);

twenty4_patt();
delay_ms(400);
twenty3_patt();                     //alternating
delay_ms(400);

second_pattb();
delay_ms(500);

t32_patta();                      //counter clockwise 4 set
delay_ms(400);
t32_pattb();
delay_ms(400);
t32_pattc();
delay_ms(400);
t32_pattd();
delay_ms(400);
second_patta();
delay_ms(300);

t33_patta();                      //clockwise 4 set
delay_ms(400);
t33_pattb();
delay_ms(400);
t33_pattc();
delay_ms(400);
t33_pattd();
delay_ms(400);
second_pattb();
delay_ms(300);
}
}


this is for 16f877a
 
Last edited:

You have attached a huge code without any explanation of what is wrong with it, what error do you get, in which lines?

Alex
 

i am trying to get the hex file for this code,its for PIC16F877A running on 20hz..
 

So you mean that there is nothing wrong with it but you just don't have the tools to compile it?

Alex
 

yes i do not know much about programming.please help me if you can..
 

i already have it but it just wont compile. i have a lot of errors then..
 

first of all clear hear ...
what's function of this code ?
what's error found u when compel it ?
etc ? ? ?
 

0 1139 Available RAM: 352 [bytes], Available ROM: 8192 [bytes]
0 126 All files Preprocessed in 46 ms
0 122 Compilation Started MyProject.c
38 300 Syntax Error: ';' expected, but '{' found MyProject.c
39 424 '}' expected ';' found MyProject.c
36 1163 Variable 'new' has been declared, but not used MyProject.c
3282 393 'main' Identifier redefined MyProject.c
3283 324 Undeclared identifier 'init_all' in expression MyProject.c
3287 371 Specifier needed MyProject.c
3287 396 Invalid declarator expected'(' or identifier MyProject.c
3287 371 Specifier needed MyProject.c
3287 300 Syntax Error: ')' expected, but '1' found MyProject.c
3293 371 Specifier needed MyProject.c
3293 300 Syntax Error: ')' expected, but '800' found MyProject.c
3293 312 Internal error '' MyProject.c
0 102 Finished (with errors): 25 Jul 2011, 22:09:40 MyProject.mcppi


these are the errors..
 

check the code for syntax errors. you probably are missing a semicolon or a closing bracket.
 

Compiles fine on MikroC Pro for PIC version 5.01.

The code is too big for the evaluation (free) version of the compiler.

Could it be that you are using the old "non pro" compiler, or an old version of PRO?

How about making a new project from scratch and pasting the code into a new text file?

Whilst the coding style is terrible, it does at least compile (for me).

Can't think what else to suggest.
 

please i dont know pregramming..can u help or take a look at the code.
 

please i dont know pregramming..can u help or take a look at the code.
The code compiles OK. So maybe it is HOW you compile it that is wrong.

Does the "project manager" tab show this file and ONLY this file in the sources list?

Have you tried the MikroC tutorials with simple code examples like "flash an LED"?
 

  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top