Electronic – Does anyone have any sample code or suggestions to help me to interface the 100 pin uc3a1512to a device via RS-485

atmelrs485

I am attempting to connect and control a device which only accepts RS-485 input. I wish to communicate to this device via my existing UC3A1512. Does anyone have any existing source code or examples that may help me to create this interface?

I need a method of outputting date via RS-485 format.

I do not need to establish round trip communication, I simply need the ability to send commands to the device.

I have looked at Atmel's website and also on AVRFreaks and I see nothing of value to my project.

Any help is welcomed and appreciated!

I originally posted this question on StackOverflow before I knew of electronics.stackexchange.com

Best Answer

You need to put a RS-485 transceiver on your USART. Maybe a TI SN65HVD11, looks like it works with 3.3V IO.

As you you need to transmit, any sample that writes out the USART in asynchronous mode will do.

As you don't mention having to share a RS-485 bus, tie the TX enable on on the transceiver.

That way RS-232 example code will work for you.