#include <16F648A.h>
#FUSES NOWDT //No Watch Dog Timer
#FUSES NOPROTECT //Code not protected from reading
#FUSES INTRC_IO //Oscilador interno, pines de CLK como IO
#FUSES MCLR //usa pin para reset
#FUSES NOLVP //No low voltage programing
#FUSES PUT //Espera estabilizar al iniciar
#FUSES NOBROWNOUT //Se apaga por debajo del voltaje minimo
#FUSES CPD //EE protection
#use delay(clock=4000000)
#use fast_io(a)
#use fast_io(b)
#byte PORTA = 5
#byte PORTB = 6
int8 Leds[] = {0b00010000,
0b00111000,
0b00111000,
0b01111100,
0b01111100,
0b11111110,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00010000,
0b00000000,
};
void main(){
int8 x = 0;
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_INTERNAL|T1_DIV_BY_1);
setup_timer_2(T2_DISABLED,0,1);
setup_comparator(NC_NC_NC_NC);
setup_vref(FALSE);
disable_interrupts(INT_EXT);
disable_interrupts(INT_CCP1);
disable_interrupts(INT_TIMER0);
disable_interrupts(INT_TIMER1);
disable_interrupts(GLOBAL);
setup_oscillator(OSC_4MHZ);
set_tris_a(0xFF);
set_tris_b(0x00);
PORTB = Leds[0];
do{
delay_ms(1);
PORTB = Leds[x];
if(x++ == 12)
x = 0;
}while(TRUE);
}