You are on page 1of 2

#include <mega8535.

h>

#include<delay.h>

PORTB=0x00;

DDRB=0xff;

DDRC=0xf0;

While(1)

PORTC.7=1;

PORTC.6=0;

PORTB=0x7f;

Delay_ms(10);

While(1)

PORTC.7=0;

PORTC.6=1;

PORTB=0x66;

Delay_ms(10)

Unsigned char bil[10]= (0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f);

Int kanan;

While(1)

Kanan= 0;

For (kanan=0;kanan<10;kanan++)

PORTC.7=1;

PORTC.6=0;

PORTB=bil[kanan];

Delay_ms(1000);

You might also like