IonicWind Software

IWBasic => General Questions => Topic started by: Boris on June 14, 2008, 04:52:40 PM

Title: Serial input message/trigger?
Post by: Boris on June 14, 2008, 04:52:40 PM
I have used with great success modified versions of the commexample programs. (TY Paul). Is there a windows message sent when the serial input buffer receives a byte, or is not empty? A message I can test for in my window service routine? Like:

If @class=@serintrig then gosub get_data_from_serial_input_buffer

The idea is to have my external microcontroller send a byte at irregular intervals and the EBASIC serial receiving routine only react on reception of a byte (without polling).
Title: Re: Serial input message/trigger?
Post by: Boris on June 18, 2008, 02:04:01 AM
The program I am using now just polls the microcontroller once a second, sending a â€ËÅ"go’ code then collecting the data sent from the microcontroller.

Any ideas?
Title: Re: Serial input message/trigger?
Post by: Earn on June 19, 2008, 10:59:54 AM

The WaitCommEvent function seems to be what you're looking for.
http://msdn.microsoft.com/en-us/library/aa363479(VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa363479(VS.85).aspx)
Earn