Hi MAAM, these are the codes that I am using... but I dont know how to make the first 3 digits to be zero and count start from the last digit(example 0001, 0002, 0003.....up to 0999.
void main()
{
TRISB=0;
TRISC=0;
{
while(1)
{
PORTB=0x3F;
delay_ms(500);
PORTB=0x06;
delay_ms(500);
PORTB=0x5B;
delay_ms(500);
PORTB=0x4F;
delay_ms(500);
PORTB=0x66;
delay_ms(500);
PORTB=0x6D;
delay_ms(500);
PORTB=0x7D;
delay_ms(500);
PORTB=0x07;
delay_ms(500);
PORTB=0x7F;
delay_ms(500);
PORTB=0x6F;
delay_ms(500);
PORTB=0x3F;
delay_ms(500);
PORTB=0x06;
delay_ms(500);
PORTB=0x5B;
delay_ms(500);
PORTB=0x4F;
delay_ms(500);
PORTB=0x66;
delay_ms(500);
PORTB=0x6D;
delay_ms(500);
PORTB=0x7D;
delay_ms(500);
PORTB=0x07;
delay_ms(500);
PORTB=0x7F;
delay_ms(500);
PORTB=0x6F;
delay_ms(500);
}
while(1);
}
}