EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: muthukural001 on May 05, 2017, 11:02:03 am

Title: MAX487EPA+'s interface to Pic18 Microcontroller
Post by: muthukural001 on May 05, 2017, 11:02:03 am
Hello all,
I want to use MAX487EPA+ as RS-485 Transceiver to send data to PC. I wonder that how to interface it to PIC18 Micro-controller. I don't see any of SPI,UART and I2C in MAX487EPA+ IC. Anyone crossed across this issue?



Thanks,
Muthu
Title: Re: MAX487EPA+'s interface to Pic18 Microcontroller
Post by: igendel on May 05, 2017, 11:06:17 am
RS485 ICs usually have "DI" (Data In) and "DO" or "RO" (Data/Receiver Out) pins, which you can connect to your PIC's TX and RX pins respectively. Pay attention to voltages in the ICs, and to the Enable pins that determine the direction of data transfer.
Title: Re: MAX487EPA+'s interface to Pic18 Microcontroller
Post by: muthukural001 on May 05, 2017, 11:40:43 am
Thanks. PIC18F4620 has single UART. I have already used that UART for serial communication. Results in no UART interface for MAX487EPA+. So, How should I approach further?

Taking Micro-controller with multiple UART is the solution?




Thanks,
Muthu
Title: Re: MAX487EPA+'s interface to Pic18 Microcontroller
Post by: igendel on May 05, 2017, 12:00:13 pm
Thanks. PIC18F4620 has single UART. I have already used that UART for serial communication. Results in no UART interface for MAX487EPA+. So, How should I approach further?

Simplest answer is yes - if you can move to an MCU with more UARTs, you should do it.

However, if you define your system requirements very carefully, sometimes you can find other ways. For example, you can send data from TX to two devices at once, if you can "teach" each one to ignore messages intended for the other; if the devices never have to communicate at the same time, you can use a multiplexer to choose where to direct your signals... etc.
Title: Re: MAX487EPA+'s interface to Pic18 Microcontroller
Post by: BrianHG on May 05, 2017, 03:36:37 pm
There is always a software UART, interupt trigger on your RX input pin + timer, but, unless you have done this before and know what you are in for, just get a PIC with multiple UARTs.  Also, if you only need to use 1 com at a time, you can always use the UART alternate pins as a second set, but you will need to manually switch back and forth making sure the TX pins stay high on the swap.