#define F_CPU
#include <util/delay.h>
#include <avr/pgmspace.h>
#define tst_bit(Y,bit_X) (Y&(1<<bit))
#define DISPLAY PORTD
#define BOTAO PB0
const unsigned char Tabela[] PROGMEM={0x40, 0x79, 0x24, 0x30, 0x19, 0x12, 0x02, 0x78, 0x00, 0x18, 0x08, 0x03, 0x46, 0x21, 0x06, 0x0e};
int main()
{
unsigned char volor =0;
DDRB =0b11111110;
PORTB =0x01;
DDRD =0xFF;
PORTD =0xFF;
UCSR0B =0x00
while(1)
{
if(!tst_bit(PINB,BOTAO))
{
if(valor==0x0F)
valor =0;
else
valor++;
DISPLAY = pgm_read_byte(&Tabela[valor]);
_delay_ms(200);
}
}
}