- Fri Mar 11, 2011 5:02 am
#122507
My goal is Turn on and Off a LED But I did not succeed.(battery is 6 or 7 volts)
Too , I use the internal crystal and This is my code.
Too , I use the internal crystal and This is my code.
Code: Select all
#include <mega16.h>
#include <delay.h>
/*This is a program that flashes the Led
on PORTA.0 every 0.5 seconds*/
main()
{
while(1) /*Loop forever*/
{
PORTA.0=1;
delay_ms(500);
PORTA.0=0;
delay_ms(500);
}
}