Anonymous
Not applicable
Mar 02, 2011
01:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 02, 2011
01:22 PM
Can anyone explain explain to me how to set up a simple delay function? Is there a #include delay.h that goes up top?
I have the delay.h header file in my source code.
Is this the correct way to write the delay function?
if((PRT0DR & 0x02) == 0x02)
{
PRT1DR = 0x01;
Delay50uTimes(255);
PRT1DR = ~0x01;
}
Any help would be greatly appreciated.
Thank you
Labels
- Labels:
-
PSoC 1
1 Reply
Mar 03, 2011
02:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 03, 2011
02:10 AM
Yes. You need to include the delay.asm and delay.h files found in the below KB article.
http://www.cypress.com/?id=4&rID=47960
This KB has a zip file that has delay.asm and delay.h files. Include them in your project. And include the .h file using the "#include delay.h" line of code.
Best Regards,
Ganesh