But forget "binary" and "hex" and "decimal" - they are down to your interpretation of the data, nothing to do with the serial port. RS-485 is an asynchronous serial communication protocol which uses differential signal to transfer binary data from one device to another. So you need to look at what you are trying to communicate with, and see what it expects to send and receive: and then deal with that. What the data is, and what it represents, is entirely up to the software at the two ends of the connection and has no intrinsic character set, or number base: it's just a byte stream. It knows nothing about the data other than that - it can't tell if it human readable, machine readable, or totally random: and it doesn't care. To ask about sending anything else indicates that you don t understand what is going on!Īll a serial port is, is a physical connection between two pieces of equipment which supports transmission of data at an agreed speed (the baud rate) and format (bits per character, parity, stop bits) and which allows software to send a byte or stream of bytes to the physical buffer which transfers them to the other device (if the flow control requirements are met) This is not going to be that simple to explain.Ī serial port doesn't send "ASCII data", "Hex data", or "Binary data" - it sends bytes, which are 7 or 8 bit "chunks" (depending on how you have configured the port) which are interpreted as ASCII or binary data by the software at both ends of the link.
0 Comments
Leave a Reply. |