7 segment display interfacing with atmega16

#include <avr/io.h>
#include<util/delay.h>

int main(void)
{
DDRC=0b11111111;
    while(1)
    {
PORTC=0b00111111;
_delay_ms(1000);
PORTC=0b00000110;
_delay_ms(1000);
PORTC=0b01011011;
_delay_ms(1000);
PORTC=0b01001111;
_delay_ms(1000);
PORTC=0b01100110;
_delay_ms(1000);
PORTC=0b01101101;
_delay_ms(1000);
PORTC=0b11111100;
_delay_ms(1000);
PORTC=0b00000111;
_delay_ms(1000);
PORTC=0b01111111;
_delay_ms(1000);
PORTC=0b01100111;
_delay_ms(1000);
       
    }
}

Comments

Popular posts from this blog

AVR MICROCONTROLLER