Welcome To My Blog

Sabtu, 04 Mei 2013

Latihan LED Menyala Bergantian

#include <mega8535.h>
#include <delay.h>
void main(void)
{
PORTC=0×00;
DDRC=0xFF;
while (1)
{
PORTC=0b11111110;
delay_ms (100);
PORTC=0b11111101;
delay_ms (100);
PORTC=0b11111011;
delay_ms (100);
PORTC=0b11110111;
delay_ms (100);
PORTC=0b11101111;
delay_ms (100);
PORTC=0b11011111;
delay_ms (100);
PORTC=0b10111111;
delay_ms (100);
PORTC=0b0111111;
delay_ms (100);
}
}

0 komentar:

Posting Komentar

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Online Project management