Hello all, I'm not too familiar with this function but I know its just a loop to "stall" the processor for a given amount of time. My question is, are interrupts available while this function is running, or does __delay_ms() take precedence? Thanks!
Short answer, it's only for a school project and I just want to get it done as quickly as possible. I may use timer interrupts for a few sections, if it goes smoothly I'll even use interrupts for the non-critical stuff(flashing LEDs).You can use the dumb delay routines with interrupts in your code. As ErnieM observes, the timing will be longer than indicated because the dumb delay calculations assume that they have sole control of the CPU. If you are using interrupts, why not dedicate one of the timers to generate system delays?
Thanks, guess I should RTFM lol. It was in the xc8 compiler doc.What does the compiler manual say about it?
That's the point - it gets you to the most authoritative answer and you learn to how to answer all future questions on the compilers.guess I should RTFM lo
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
![]() |
__delay_ms() problem (between switches) | Microcontrollers | 4 | |
|
__delay_ms() problem | Microcontrollers | 20 | |
T | HI-TECH C and __delay_ms | Programming & Languages | 2 | |
T | HI-TECH C and __delay_ms | Microcontrollers | 0 |
by Robert Keim
by Jake Hertz
by Aaron Carman