Delay on SX28
John Whitfield
Posts: 42
Does anyone have any code that will delay the entire MainLoop of my program without delaying the UARTs in my code attached to the below thread about the Dual UART problems. What I mean is a simple delay for like one to ten seconds or maybe longer after each time the UART takes in and sends out data.
Thanks,
-John Whitfield
Thanks,
-John Whitfield
Comments
at www.sxlist.com/techref/piclist/codegen/delay.htm you find a delay code generator. You specify the clock frequency and required delay time, and it returns the source code to generate that delay.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G
good point - I forgot to mention that.
BTW: Actually the delay time will be longer than calculated because the ISR code "steals" execution cycles whenever it is invoked, For a longer deleay time, this does not matter in most cases unless you need a precisely timed delay. In this case, it makes sense to implement a Timer Virtual Peripheral which can be combined with the UART VP in the ISR.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Greetings from Germany,
G