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?

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.

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?
    – Brethlosze
    Commented Jun 28, 2019 at 5:39
  • 1
    I usually tie them together. And no need for a delay normally.
    – Majenko
    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.
    – Majenko
    Commented Jun 28, 2019 at 11:38

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.