on Jul 3rd, 2012, 12:12pm, Designer wrote:| Can you please share the test program code for sending and receiving a couple of bytes of data. |
|
Sending code something like:
Code: port% = OPENOUT("COM1:9600,n,8,1")
BPUT #port%,dat1%
BPUT #port%,dat2%
CLOSE #port%
Receiving code something like:
Code: port% = OPENIN("COM2:9600,n,8,1")
dat1% = BGET#port%
dat2% = BGET#port%
CLOSE #port%
This code waits for the data to arrive. If you need to be doing something else whilst waiting, you can monitor how many bytes have arrived using EXT#port% and only read them when they're ready.
Richard.