#include <io.h>
#include <delay.h>

void main(void)
{      
    unsigned char num = 0;
    unsigned char sevenSegNum[10] = {
        0xC0,0xF9,0xA4,0xB0,0x99,
        0x92,0x82,0xF8,0x80,0x90
    };        

    DDRC = 0xFF;
    DDRD = 0xFF;
    
    
    DDRA = 0x00;
    PORTA = 0xFF;
                       
    while(1)
    {
        PORTC = sevenSegNum[num / 10]; 
        PORTD = sevenSegNum[num % 10];
        
        num++;     
        if(num >= 100)
        {           
            num = 0;
        }
        delay_ms(500);
    }
}
   