Home > other > 51 microcontroller serial port communication problems
51 microcontroller serial port communication problems
Time:10-13
I use a serial port assistant send 51 single chip microcomputer a number, and then the MCU receives the number, and sends the digital computer and displayed on the serial port assistant, but on the computer shows that the number of figures and I send, I send 1, for example, the computer is displayed on the 81, sent is 2, 82, shows a... ah, is this, please ask bosses to solve!
CodePudding user response:
(1) is to determine the serial debugging assistants in hexadecimal or character to send; (2) using the oscilloscope to capture a character of data, a serial port RX pin was sent down 0 x01 is 0 x31; (3) using the oscilloscope to capture a serial port TX pin a character data, determine how many data is sent out, And your is through RS232 serial port transceiver to send out? If it is just in the oscilloscope measurement serial port to send data and after RS232 transceiver, the data is consistent, can use the oscilloscope probe two measuring contrast, after receiving the same,
CodePudding user response:
The original poster is sending ASCII characters 1 serial debugging assistant, converted to a decimal is 81,
CodePudding user response:
Try issued by 0 to 255, what was in the receiving, is there any rule Check the baud rate setting