alexang
Newbie level 4
void main()
{
unsigned long delay_time=5000;
for(;
{
if(SW1==0)
{
out=1;
delay(1000000);
out=0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this delay(1000000) is around 5 seconds
i m using 20MHz crystal, can i know how is this 5seconds calculation?
{
unsigned long delay_time=5000;
for(;
{
if(SW1==0)
{
out=1;
delay(1000000);
out=0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this delay(1000000) is around 5 seconds
i m using 20MHz crystal, can i know how is this 5seconds calculation?