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

Hi, we are pleased to see that you are using our forum.

We'd like you to become a member of our community. Membership is FREE, please REGISTER and view our forums without these annoying reminders!

Once registered you may post on the forums, download from the file areas and use the WIKI without interruption.