Serial port part add RS485 chip DE pin control

Post here first, or if you can't find a relevant section!
Post Reply
SHIPC
Posts: 6
Joined: Sat May 06, 2023 2:00 pm

Serial port part add RS485 chip DE pin control

Post by SHIPC »

When the TXD serial port is being sent, an I/O can automatically change to high level. When the TXD port is sent, it automatically changes to low level. In this way, you can control the sending and receiving of the RS485 chip
NormanEstrada
Posts: 1
Joined: Sun May 14, 2023 7:55 am

Re: Serial port part add RS485 chip DE pin control

Post by NormanEstrada »

SHIPC wrote: Mon May 08, 2023 12:15 pm When the TXD serial port is being sent, an I/O can automatically change to high level. When the TXD port is sent, it automatically changes to low level. In this way, you can control the sending and receiving of the RS485 chip
In RS485 communication, the TXD (transmit data) line is responsible for transmitting data from the sender to the receiver. To control the sending and receiving of data using the RS485 chip, you can utilize an I/O (input/output) line that automatically changes its level based on the activity of the TXD line.
want entertainment download gta 5 mobile (100% working) – android on website getmodnow
SHIPC
Posts: 6
Joined: Sat May 06, 2023 2:00 pm

Re: Serial port part add RS485 chip DE pin control

Post by SHIPC »

But my use of the following functions does not work:
digitalWrite(DE,HIGH);
Serial.println("hello");
digitalWrite(DE,LOW);


I have to do this by adding the DELAY function such as:
digitalWrite(DE,HIGH);
Serial.println("hello");
delay(10);
digitalWrite(DE,LOW);

Is there any way to automatically control the RS485 mode, rather than through the delay mode
SHIPC
Posts: 6
Joined: Sat May 06, 2023 2:00 pm

Re: Serial port part add RS485 chip DE pin control

Post by SHIPC »

IN STM32CUBEMX I found the serial port automatic flow control function:
https://img-blog.csdnimg.cn/img_convert ... 075b4c.png

https://www.st.com/content/ccc/resource ... 055208.pdf

However, it is not supported in stm32duino
User avatar
fpiSTM
Posts: 1723
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Serial port part add RS485 chip DE pin control

Post by fpiSTM »

SHIPC
Posts: 6
Joined: Sat May 06, 2023 2:00 pm

Re: Serial port part add RS485 chip DE pin control

Post by SHIPC »

This function is used to control CTS and RTS
But what I need is DE control which means that when the serial port sends data, the DE pin automatically changes to high level and then to low level after sending
User avatar
Vassilis
Posts: 23
Joined: Wed Dec 18, 2019 3:04 pm
Location: Thessaloniki, Greece
Contact:

Re: Serial port part add RS485 chip DE pin control

Post by Vassilis »

An alternative way to connect the RS-485 transceiver is as follows, where the DE/RE pins are not used in the known way.
RS-485_transceiver.jpg
RS-485_transceiver.jpg (37.77 KiB) Viewed 1203 times
Source: https://www.waveshare.com/w/upload/1/1d ... ematic.pdf
Vassilis Serasidis
https://www.serasidis.gr
Post Reply

Return to “General discussion”