introduce Delay in MPC565 !!
praveen <[email protected]> Wed, 16 Aug 2006 04:31:06 -0700 (PDT)
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I am working with MPC565. and i have made a routine which can introduce delay in microseconds.
Dummy Routine to Introduce Delay in MicroSeconds :
-----------------------------------------------------------------------
micro_second_delay( int microsecs )
{
int time_base_start = get_tb_time();
//Keep wait until the parameter
while( ( get_tb_time() - time_base_start ) < microsecs );
}
get_tb_time ( void )
{
mftb r3,TB
}
-------------------------------------------------------------------------
Is it possible to have a function which can introduce delay in nanoseconds ?
i know that ,TB register is 64-bit incrementing counter.
how will i be able to manage to get specific delay ? Can i make generic funtions ?
Thanks in advance
Praven
---------------------------------
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.
[Non-text portions of this message have been removed]
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/