2756 views|10 replies

31

Posts

1

Resources
The OP
 

How to receive 0x00 in serial communication [Copy link]

As shown in the figure, 0x00 was not received, how to solve it

This post is from MCU

Latest reply

Solved! It means it is still a configuration problem.   Details Published on 2021-10-29 15:38
 

1412

Posts

3

Resources
2
 
Did you send the hexadecimal format? What is the forwarding device in the middle?
This post is from MCU

Comments

It is hexadecimal. UART is used between stm8 and pc to receive and send: res=UART2_ReceiveData8(); // //UART_data(res);  Details Published on 2021-10-27 18:24
 
 

1w

Posts

142

Resources
3
 

If one is missing, it means there is a problem with the program.

This post is from MCU
 
Personal signature上传了一些书籍资料,也许有你想要的:https://download.eeworld.com.cn/user/chunyang
 
 

31

Posts

1

Resources
4
 
annysky2012 posted on 2021-10-27 18:16 Did you send the hexadecimal? What is the forwarding device in the middle?

It is hexadecimal. UART is used between stm8 and pc to receive and send: res=UART2_ReceiveData8(); //
//UART_data(res);

This post is from MCU
 
 
 

6788

Posts

2

Resources
5
 

Can the microcontroller receive 0x00?

This post is from MCU
 
 
 

122

Posts

2

Resources
6
 

Is it a setting problem, is it a byte or a string? 00 is the string terminator and is not sent.

This post is from MCU
 
 
 

31

Posts

1

Resources
7
 

The transmission is sent in hexadecimal format

This post is from MCU

Comments

That doesn't make sense, hexadecimal 0x00 can be sent. First check if there is a problem with the serial port settings, and then use the official routine to test.  Details Published on 2021-10-28 09:24
 
 
 

31

Posts

1

Resources
8
 

00 cannot be received

This post is from MCU
 
 
 

1412

Posts

3

Resources
9
 
The transmission is in hexadecimal format
That doesn't make sense, hexadecimal 0x00 can be sent. First check if there is a problem with the serial port settings, and then use the official routines to test.
This post is from MCU

Comments

Solved, /GPIO_Init(GPIOD, GPIO_PIN_5, GPIO_MODE_OUT_PP_HIGH_FAST); //GPIO_Init(GPIOD, GPIO_PIN_6, GPIO_MODE_IN_FL_IT); These two sentences can be shielded. It seems that there is no need to initialize stm8s and uart2. Just set the serial port directly.  Details Published on 2021-10-28 10:25
 
 
 

31

Posts

1

Resources
10
 
annysky2012 posted on 2021-10-28 09:24 That doesn't make sense. Hexadecimal 0x00 can be sent. First check if there is a problem with the serial port settings, and then use the official routine to...

Solved, /GPIO_Init(GPIOD, GPIO_PIN_5, GPIO_MODE_OUT_PP_HIGH_FAST);
//GPIO_Init(GPIOD, GPIO_PIN_6, GPIO_MODE_IN_FL_IT); Just shield these two sentences, it seems that there is no need to initialize stm8s and uart2, just set the serial port directly

This post is from MCU

Comments

It's solved! It means it's still a configuration problem.  Details Published on 2021-10-29 15:38
 
 
 

1412

Posts

3

Resources
11
 
zhang520 published on 2021-10-28 10:25 Solved, /GPIO_Init(GPIOD, GPIO_PIN_5, GPIO_MODE_OUT_PP_HIGH_FAST); //GPIO_Init(GPIOD, GPIO...

Solved! It means it is still a configuration problem.

This post is from MCU
 
Personal signature

没有什么不可以,我就是我,不一样的烟火! 

 
 

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