0

If I want to use a MAXIM 485 for a RS485 communication, is there any option to include the Control DE and RE' pin in a natural manner in the code, instead changing the control pin everytime I made a Serial.print()?

Should I overload the HardwareSerial object in order to add those pin operations everytime?

asked Jun 27, 2019 at 21:44

1 Answer 1

1

No, there isn't - you have to do it manually. And don't forget to flush.

You could inherit HardwareSerial if you really wanted - or just write a couple of functions to do the sending and controlling of the DE pin.

answered Jun 27, 2019 at 22:45
3
  • Should i use a slight delay and distinct signals for controlling the DE and RE' pins? Or it is enough to join them in the design?. When should I have different signals for them? Commented Jun 28, 2019 at 5:39
  • 1
    I usually tie them together. And no need for a delay normally. Commented Jun 28, 2019 at 7:19
  • 1
    The only time you might want separate control of directions is if you are doing fancy collision detection by reading what you're sending and seeing if it matches what you sent. Commented Jun 28, 2019 at 11:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.