Device 16F877 Config hs_osc,wdt_off,pwrte_on,BODEN_On,LVP_OFF XTAL 20 ALL_DIGITAL TRUE Dim teller As Byte main1: While teller < 10 PORTB = %11111111 PORTD = %11111111 PORTC = %00001111 DelayMS 200 PORTB = %00000000 PORTD = %00000000 PORTC = %00000000 DelayMS 200 teller = teller + 1 Wend GoTo main2 main2: ;%76543210 PORTB = %00001111 DelayMS 400 PORTB = %11111111 DelayMS 400 PORTD = %00001111 DelayMS 400 PORTD = %11111111 DelayMS 400 PORTC = %00001111 DelayMS 400 ;%76543210 PORTB = %00011111 PORTD = %10001111 DelayMS 5000 PORTB = %10011111 PORTD = %10011001 DelayMS 5000 PORTB = %10111001 PORTD = %11011101 PORTC = %00001001 DelayMS 5000 GoTo main1 End