Hi All !!
I am new to LPC2294 and wish to produce a small code for delay some
thing like
void delay (unsigned int Usec)
{
unsigned int delayUsec= ( ?? ) * Usec; // line 1
volatile unsigned int count = 0; // line 2
for (count = 0; count < delayUsec; count++) //line 3
{asm volatile ("nop");} // line 4
}
where time is the no of micro seconds
for information I am using a 60MHz crystal on my board
I know it is easy to do with timers 0 and 1 but i wish, NOT to use
the timers at all as i need them for orther purpose.
My question
1. is that is there any overhead added due to the code in the
function for the lines 1,2,3,4 ?
2. is there any over head due to this "delay(/*some value*/)" being
called in my over all code.?
If so how much delay? or where can i get the information?
Am i missing some thing or is there a simple way to do this (to
caliculate the delay with out using tmmers?)
thanks in advance!!
regards,
dennis.Message
how to delay LPC2294 without timmer..?
2005-12-14 by dennis_arm
Attachments
- No local attachments were found for this message.