0

I'd appreciate advise on how to set the following hardware flow control parameters in FreeBasic

ControlHandShake=(DTR_HANDSHAKE, DSR_HANDSHAKE), 
FlowReplace=(TRANSMIT_TOGGLE, RTS_HANDSHAKE), 
XonLimit=4096,
XoffLimit=1024
Olumide
  • 5,397
  • 10
  • 55
  • 104
  • Not entirely sure but these look pretty much standard, except maybe for Xon/offLimit (which, however, is more of a matter of how fast you can process the data, not the device, as far as I know). Did you try just using defaults? E.g. `Open Com "COM1:9600,N,8,1"` for example (9600 is the baud rate) – CherryDT Nov 18 '16 at 17:55
  • If you want to use hardware based flow control using DTR/DSR, why additionally the setting for software based flow control using Xon/Xoff? As far as I know, FreeBASIC doesn't support software flow control using the in-band control characters out of the box. – MrSnrub Apr 29 '17 at 17:32

1 Answers1

0

Hardware and OS dependent. MOST OS's have command line programs or scripts that will set your hardware up as you wish.

Easiest: use 'open pipe [command string]' or 'shell [command string]' to reprogram the device.

Example: To talk to one of my arduino projects, I use:

PortStr = "COM12:9600,N,8,1,CD,CS,DS,OP,BIN"


shell "stty -F /dev/ttyUSB0 speed 9600 -clocal -hupcl"
sleep 1000
open com "/dev/ttyUSB0:9600,n,8,1,cs0,cd0,ds0,rs,bin" as #filnum

Way old days: you talked directly to the 16650 or other chip directly. peek/poke/etc.

David