Wait, Waitms, Waitus
Waits a certain time before continuing program execution. Program execution is blocked completely during the wait, excluding Interrupts. They run anyway. it requires a korrektly defined system clock speed Avr.Clock. The precision of the Wait-Function when using Constant as parameters lies at around 1 µs 1).
Syntax:
- wait Expression (Secunds)
- waitms Expression (Milliseconds)
- waitus Constant (Microseconds)
As of Version 2012r2, you may also call wait and waitms with variables. Precision is then around 100 µs 2).
Example:
dim a a byte a=200 wait 3 ' wait 3 seconds waitms 100 ' wait 100 ms waitus 100 ' wait 100 µs waitms a ' wait a variable time, time to wait in a