Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SPI to RS485

Status
Not open for further replies.

hecrm

New Member
I am working with a Microchip application which uses PIC16F684. The data is outputted by SPI. I would like to know if there is any other PIC micro which can recieve SPI, make some calculations and finally transmit the result by RS485.

Thanks
 
RS485 shares the same data encoding format as RS232 so all you really need is a PIC with a SPI and an USART. You would then attach an RS485 transceiver to the output (in the same way you use a MAX232 tranceiver for RS232).

Since RS485 is half duplex, it will be up to you to implement a protocol to handle flow control, collisons, and other associated obstacles.
 
I'm also not sure if there are any 14-pin PICS with both an SPI and UART. You may have to switch to an 18 or 20 pin device.

If all you have to do is transmit by RS485, it would be easy enough just to write a software UART.
 
SPI often doesn't really need a SPI module at all. If the PIC is fortunate and originates the clock, then SPI is just writing a 1 to the clk pin, read a data bit, write 0 to the clk pin, repeat. If it's a slave to the clock, then there's more overhead and you might need to make the clk an interrupt.
 
The MAX3110E doesn't connect SPI to RS232 rather it provides a SPI & a RS232 interface to a micro.
 
Hi,

You can use PIC16F877 instea o ur PIC. It is very easy to learn and also it has UART and I2C and SPI
 
Paul Obrien said:
The MAX3110E doesn't connect SPI to RS232 rather it provides a SPI & a RS232 interface to a micro.
I didn't understand what he meant either.

It seems to be a very nice full-featured self-contained UART with an SPI interface to the microcontroller.

Nice find Bill. Have you sampled this part and tried it out?

Mike
 
Mike said:
I didn't understand what he meant either.

It seems to be a very nice full-featured self-contained UART with an SPI interface to the microcontroller.

Nice find Bill. Have you sampled this part and tried it out?

Mike
I've got the part Nice PDIP-28 package, no caps needed and RTS will work fine in RS485 mode (they make a RS485 version also exact same UART) I've not written code for it yet. Maxim also makes an wonderful MAX3160 multiprotocal chip (no UART) but RS232, 422 & 485 drivers on a chip. That I've used and it works like a charm.
 
Sorry I was getting confused between protocols but if SPI to RS485 is the goal why not use a MAX3140.
 
Status
Not open for further replies.

Latest threads

Back
Top