I'm trying to build a RS-485 project using MAX485's. However, I'm having trouble finding out how to correctly use the RE and DE pins. Some PDF's and websites say that RE and DE should be tied together and then connected to a pin on a microcontroller (for example). Other places seem to have various combinations of connecting DE to ground and RE to positive, and other such things.
Additionally, the places that say RE and DE should be tied together and then connected to a microcontroller, also have conflicting information about how these should then be controlled through the software.
So my questions are:
- What am I actually supposed to do with RE and DE? Do I need any pull up or pull down resistors also?
- How do I control RE and DE assuming they are controlled by my microcontroller? Do I set them high/low then send data then set them low/high again? Do I do the same for receiving data?
Any help on this would be appreciated, and also if there are any links to sites with this specific information about DE/RE would be good.