// Display 7 segmentos      code for mikroC Version: 7.0.0.3

//
//config WDT = OFF
//config LVP = OFF // Este bit debe estar desactivado para poder usar PORTA5
//config OSC = HSPLL
//config PWRT = ON //Power On timer enable
//——————————————–
// subrutina de inicializacion

void initialization (void)
{
LATA=0;
ADCON1=0x0f;
CMCON=0×07;
TRISA=0;
PORTA=0;

PORTB=0;
LATB=0;
TRISB=0;
PORTB=0;

LATC=0;
TRISC=0xc0;
PORTC=0;
}
//——————————————–

void main (void)
{
unsigned short digits[10] = {0b10111110,0b00000110,0b01111100,0b01011110,
0b11000110,0b11011010,0b11111010,0b00001110,
0b11111110,0b11011110};
unsigned short i;

initialization();

while(1){
for (i=0;i<=9;i++){
portb = digits[i];
porta.ra0=!porta.ra0;
Delay_ms(1000);
}
}
}
//     end of file