In Atmel Microcontrollers, there are simple delay functions such as __delay_ms()
and __delay_us()
found in utils\delay.h
.
I am using a Tiva™ C Series TM4C1294 development board, with a TM4C1294NCPDT microcontroller. However, I can't find any libraries to do similar delay functions.
Will I have to write my own delay function? I know it's not that hard, but I'd rather use an existing library if there is is one.
Answer
Try this:
/* Delay cycles for 1 second */ SysCtlDelay(16000000u / 3u);
No comments:
Post a Comment