INTERRUPTIONS CLASS...
 
Notifications
Clear all

INTERRUPTIONS CLASS 5

2 Posts
1 Users
0 Likes
9,016 Views
(@argelia)
Posts: 11
Active Member Guest
Topic starter
 

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

 
Posted : 11/12/2012 11:54 am
(@csearcy)
Posts: 0
New Member Guest
 

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.

 
Posted : 11/12/2012 5:17 pm
Share: