Answer the question
In order to leave comments, you need to log in
In what form is data transmitted through the serial port in arduino?
How is data transmitted through the serial port?
Do they carry error correction codes (Hamming codes), checksums, or something like that?
Answer the question
In order to leave comments, you need to log in
If we are talking about connecting an Arduino-terminal to a PC, then characters are transmitted stupidly with codes. Essentially a normal UART. Just transfers bytes.
If necessary, during transmission, the programmer adds goodies in the form of error correction codes, or at least a checksum (CRC), with a second request, if the checksum did not agree. On other devices, respectively, this should also be implemented.
In the case of using a specific protocol (for example, if you got a ready-made library), these features can already be written for you.
A serial port is just an output port, but when establishing a connection between two devices via a serial port, the programmer can already select the protocol parameters, and there, between the data exchange rate, there is both parity and bit depth and order.
Thus, the port itself does not parse what to transmit, it depends on how to use it.
In what it is necessary for the user. If the user needs Hamming codes, checksums, or other weird crap, that's also passed on. Of course, in Arduino it is necessary to provide for the processing of all this exotic
When transmitting a byte, you can turn on the odd-even check. Upper-level protocols may have their own checks (for example, for Modbus this is the CRC checksum).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question