2214 views|4 replies

4

Posts

0

Resources
The OP
 

pyboard receives serial port data conversion problem [Copy link]

 

Hello everyone! I recently encountered a problem, the problem of converting the data format received by the serial port: PuTTY received: b'\xaa\xd9\xfb\x9f\x9d\x9fYgcO}}\x9d\x93\x9f\x93\x9f\x93\x9f\x95\x8fW\x99\x00' What I actually sent was V4.0010SLNXAA160606058T3. I searched the Internet for a whole circle and was confused. How can this be converted to correctly display the data as V4.0010SLNXAA160606058T3?

Latest reply

Ordinary microcontrollers can support receiving TTL signals, but RS232 needs to be converted.   Details Published on 2021-7-19 15:56
 
 

1w

Posts

25

Resources
2
 

It seems that the baud rate or serial port parameters are set incorrectly.

 
 
 

4

Posts

0

Resources
3
 
This post was last edited by dcexpert on 2021-7-19 15:57
dcexpert posted on 2021-7-18 18:12 It seems that the baud rate or serial port parameters are set incorrectly

Yes, 115200 baud rate, 8 bits. My application is to scan QR codes with a barcode gun. I have tried barcode gun scanning and USB to serial port sending with a serial port assistant. All of them received this data. I checked online and only knew that this example shows: It should be noted that when micropython reads data from the serial port, it returns bytes type data. It will convert some hexadecimal data into corresponding ascii characters. #That is to say, the data we actually receive in the program to open the button is like this, b'e\x00\x03\x01\xff\xff\xff'

 
 
 

4

Posts

0

Resources
4
 

New progress: After adding a max232 chip, the conversion became normal. Could it be that the pyboard (STM32F405) can only receive TTL?

Comments

Ordinary microcontrollers can support receiving TTL signals, but RS232 needs to be converted.  Details Published on 2021-7-19 15:56
 
 
 

1w

Posts

25

Resources
5
 
Flying with the wind oO Published on 2021-7-19 11:04 New progress: After adding a max232 chip, the conversion is normal. Can it be that the pyboard (STM32F405) can only receive TTL?

Ordinary microcontrollers can support receiving TTL signals, but RS232 needs to be converted.

 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list