3591 views|10 replies

3255

Posts

0

Resources
The OP
 

Is there any requirement for the length of the data packet of the serial port? For example, ACK 00 00 means that the data has been received, instead of... [Copy link]

Is there any requirement for the length of the data packet of the serial port? For example, ACK 00 00 means that the data has been received, rather than a long string of numbers.

QQ图片20191211154207.png (212.3 KB, downloads: 0)

QQ图片20191211154207.png

Latest reply

The length of a frame sent by the serial port is not fixed. It may be 10 bits, 10.5 bits, 11 bits... But the different lengths are not much different. They will not be shorter than 10 bits, nor longer than 13 bits.   Details Published on 2019-12-13 16:55
 
 

2w

Posts

0

Resources
2
 

Whether to use a specific character to indicate the end of a packet is up to you. You can set it up as you like.

 
 
 

1w

Posts

142

Resources
3
 

The serial port itself is only related to the frame length, which is composed of 10 or 11 bits of data, that is, a byte. Multi-byte data has nothing to do with the serial port and is completely self-defined. You have to check the protocol to see if there is any requirement for the packet length.

Comments

55 Is such a group a byte?  Details Published on 2019-12-11 16:43
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 
 

3255

Posts

0

Resources
4
 
chunyang posted on 2019-12-11 16:29 The serial port itself is only related to the frame length, which is composed of 10 or 11 bits of data, that is, forming a byte. Multi-byte data has nothing to do with the serial port and is completely self-determined...

55 Is such a group a byte?

Comments

"Is a group of 55 a byte?" You must first clarify what "55" is. If it is a hexadecimal number, it is indeed a byte. If it is an ASCII code, it is two bytes.  Details Published on 2019-12-12 10:48
"Is a group of 55 a byte?" You must first clarify what "55" is. If it is a hexadecimal number, it is indeed a byte. If it is an ASCII code, it is two bytes.  Details Published on 2019-12-11 16:59
 
 
 

2w

Posts

0

Resources
5
 
QWE4562009 posted on 2019-12-11 16:43 55 Is such a group a byte?

"Is a group of 55 a byte?"

You need to first clarify what "55" is. If it is a hexadecimal number, it is indeed one byte. If it is an ASCII code, it is two bytes.

Comments

Does a frame in a microcontroller refer to multiple bytes?  Details Published on 2019-12-12 15:44
 
 
 

1w

Posts

142

Resources
6
 
QWE4562009 posted on 2019-12-11 16:43 55 Is such a group a byte?

The first floor diagram should be in hexadecimal. In hexadecimal, 0x55 is a byte. Note that to avoid confusion, hexadecimal numbers should be written as 0x55 or 55H. If you give 55 directly, it will become ASCII code in principle.

Comments

This is a hexadecimal number.  Details Published on 2019-12-12 15:44
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 
 

3255

Posts

0

Resources
7
 
maychang posted on 2019-12-11 16:59 "Is a group of 55 a byte?" You must first clarify what "55" is. If it is hexadecimal...

Does a frame in a microcontroller refer to multiple bytes?

Comments

"A frame in the microcontroller refers to multiple bytes, right?" A "frame" of the microcontroller serial port is a byte (8 bits) plus a start bit, an end bit (and possibly a check bit).  Details Published on 2019-12-12 15:53
 
 
 

3255

Posts

0

Resources
8
 
chunyang posted on 2019-12-12 10:48 The first floor picture should be in hexadecimal. In hexadecimal, 0x55 is one byte. Note that to avoid confusion, the hexadecimal number should be written as 0x55 in the text...

This is a hexadecimal number.

 
 
 

2w

Posts

0

Resources
9
 
QWE4562009 posted on 2019-12-12 15:44 Does a frame in a microcontroller refer to multiple bytes?

"A frame in a microcontroller refers to multiple bytes, right?"

A "frame" of the microcontroller serial port is a byte (8 bits) plus a start bit, an end bit (and possibly a check bit).

Comments

The length of a frame is not fixed.  Details Published on 2019-12-13 16:12
 
 
 

3255

Posts

0

Resources
10
 
maychang published on 2019-12-12 15:53 "A frame in a microcontroller refers to multiple bytes, right?" A "frame" of a microcontroller serial port is a byte (8 bits) ...

The length of a frame is not fixed.

Comments

The length of a frame sent by the serial port is not fixed. It may be 10 bits, 10.5 bits, 11 bits... But the different lengths are not much different. They will not be shorter than 10 bits, nor longer than 13 bits.  Details Published on 2019-12-13 16:55
 
 
 

2w

Posts

0

Resources
11
 
QWE4562009 posted on 2019-12-13 16:12 The length of that frame is not fixed

The length of a frame sent by the serial port is not fixed. It may be 10 bits, 10.5 bits, 11 bits... But the different lengths are not much different. They will not be shorter than 10 bits, nor longer than 13 bits.

 
 
 

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