G'day all, particularly newbies. I was having trouble sending byte data using HSEROUT in PBP 2.67 to my PC software which uses VB6. I found a thread on the older list dated 2003 in which another programmer was apparently having similar trouble and had difficulty sending byte data as distinct from two-byte characters. It was correctly pointed out that if you send byte variables in the HSEROUT item list without any formatting precursors like "HEX" or "BIN" etc, then PBP should indeed send individual bytes. Try as I could yesterday, I still received two bytes per item at the receiver - the second one zero. It came to me in the early hours! It had nothing to do with the PIC or the PBP compiler. The problem was with my setting of MSComm on the PC, in that the Com port was set to text mode. There is a property called "input mode" which needs to be set to "1" for binary (byte) input data ("0" for text data). Similarly, in VB6 at least, the RThreshold should be set to the required number of characters for text mode and the required number of bytes for byte mode. The help file on the RThreshold property does not make this clear. Sending a data stream in byte form compared with character (text) form not only reduces the amount sent, but also often reduces the subsequent computational load.
Regards Carl