PDA

View Full Version : Max485 & RS232



rwskinner
- 21st November 2006, 13:55
I'm using a 16F88 and I need to use a Max485 chip for the main commincations, but I also need to reserve the ability to use a Bootloader via the Max232.

Can I run both these of the Hardware Serial Port without interfering with each other or is it better to keep them all on their own pins?

Next, normally I bit bang the 485 port so I can enable TX on the 485 chip, send out the data, then disable TX.

I'm thinking if I use the Hardware Serial port I would have to set the USART up for half duplex, then enble the TX, HSerOut, Disable TX. Is this correct?

Thanks for any insight.

b1arrk5
- 21st November 2006, 15:17
If you don't need an interrupt for your RS-485 communications then I would bit bang this on another pin, and keep the usart free for the RS-232. The project that I am working on presently requires three ports, but as only one of them needs to fire an interrupt I have had no problem keeping the other communications separate. I'm using a 16f877a, but the '88 should work just fine. I needed a lot of I/O, that's why I moved up to the '877. I don't know when I will receive data on the main RS-232 link, so that is interrupt driven, while all of the other devices connected wait until the Pic talks to them, and then respond. I hope this helps.

Jerry.

rwskinner
- 21st November 2006, 16:03
I tried it for grins.

Max232 tied to RB2 & RB5
Max485 tied to RB2 & RB5 with RB4 as the Enable on the 485 chip.

What I would really like, is both chips be driven the same, so I could use 232 or 485 without jumpers or SW changes. The end user could plug into either one but not both.

I'm not sure if there is any electrical issues with both tranceivers on the same logic lines.

Maybe safer just to include two 3 pin jumpers on RB2 and RB5 and let them select which one they want.

Archangel
- 22nd November 2006, 00:04
I tried it for grins.

Max232 tied to RB2 & RB5
Max485 tied to RB2 & RB5 with RB4 as the Enable on the 485 chip.

What I would really like, is both chips be driven the same, so I could use 232 or 485 without jumpers or SW changes. The end user could plug into either one but not both.

I'm not sure if there is any electrical issues with both tranceivers on the same logic lines.

Maybe safer just to include two 3 pin jumpers on RB2 and RB5 and let them select which one they want.
Hello rwskinner,
How about using 1n914 diodes as isolation, the 07v voltage drop is not likely to kill off the signal, I doubt you really need anything but you could put a couple of gates in also.
regards,
JS