hesho90
Member level 4
i got 8 leds and pic 16f877a
i made the code
i made the code
Code:
void main()
{TRISB=0; PORTB=0;
Loop:
PORTB=0B00000001; delay_ms(500);
PORTB=0B00000011; delay_ms(500);
PORTB=0B00000111; delay_ms(500);
PORTB=0B00001111; delay_ms(500);
PORTB=0B00011111; delay_ms(500);
PORTB=0B00111111; delay_ms(500);
PORTB=0B01111111; delay_ms(500);
PORTB=0B11111111; delay_ms(500);
PORTB=0B00000000; delay_ms(500);
PORTB=0B00011000; delay_ms(500);
PORTB=0B00111100; delay_ms(500);
PORTB=0B01111111; delay_ms(500);
PORTB=0B00000000; delay_ms(500);
PORTB=0B11111111; delay_ms(500);
PORTB=0B00000000; delay_ms(500);
PORTB=0B11111111; delay_ms(500);
PORTB=0B11111111; delay_ms(500);
goto loop;}
Last edited by a moderator: