Is there any flag that turn on when the motor get an ascii character by rs232 in data mode?
i'd like to make an interruption everytime i send a ascii character, I wouldn't like to be asking for "Len" all the time
The administrator has disabled public write access.
Re: INTERRUPTIONS CLASS 5
6 years 8 months ago #772
There aren't any status bits to indicate LEN has changed... meaning something is in the buffer.
The best work around I can suggest is to use one of the Class5 Timers(these are countdown timers). The Timer can be set in millisecond increments. Set up an interrupt based on the timer's status bit timing out ... which can cause a subroutine to be called... which checks LEN to see if characters have come in. If LEN shows nothing in the buffer... reset the Timer preset.. and RETURNI. If there is something in the buffer... do what you need to do... then reset the Timer preset.. and RETURNI.
Note: You can use Timers to do other tasks... such as updating I/O... on the same interrupt.