|
From: | varsha |
Subject: | [avr-gcc-list] generating a delay |
Date: | Mon, 24 Oct 2005 12:37:40 +0530 |
Hello all,
I'm working on avr-gcc (GCC)
3.4.3
Atmega 16 controller, clock frequecy is 8
MHz,
and i want to generate a delay of
25ms.
and i wrote one routine for the same..
and called it in other function as
delay(250,0xff);
-
-
- but i think it is not generating the correct
value...
---------------------------------------------------------------------------------------
void delay_ms(unsigned char count1,unsigned char
count)
{ unsigned char j,i; while(count1--) { while(count--) { i++; j++; } } } what is the proper way to write a delay
routine?
regards, varsha -- ***********************Confidentiality Notice*************************** The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Divinet or address@hidden immediately and destroy all copies of this message and any attachments. ************************************************************************ |
[Prev in Thread] | Current Thread | [Next in Thread] |