rs485

Windows XP embedded - RS485 problems

We've got a system running XP embedded, with COM2 being a hardware RS485 port. In my code, I'm setting up the DCB with *RTS_CONTROL_TOGGLE*. I'd assume that would do what it says... turn off RTS in kernel mode once the write empty interrupt happens. That should be virtually instant. Instead, We see on a scope that the PC is driving ...

Prefered method of notifying upper layers about received message

Hi, I'm writing a RS485 driver for an embedded C project. The driver is listening for incoming messages and should notify the upper layer application when a complete message is received and ready to be read. What is the prefered way to do this? By using interrupts? Trigger a SW interrupt and read the message from within the isr. Le...

How to Verify Atomic Writes?

Hello all, I have searched diligently (both within the S[O|F|U] network and elsewhere) and believe this to be an uncommon question. I am working with an Atmel AT91SAM9263-EK development board (ARM926EJ-S core, ARMv5 instruction set) running Debian Linux 2.6.28-4. I am writing using (I believe) the tty driver to talk to an RS-485 seria...

Modbus stack for Microchip PIC

Can someone suggest an open source implementation of a Modbus RTU Slave for a Microchip PIC18 processor? I'm looking for an implementation of Modbus RTU for RS-232/RS-485, but a Modbus TCP/IP implementation would be welcome as well. ...

UART speed possibly wrong

My brain is fried, so I thought I would pass this one to the community. When sending 1 character to my embedded system, it consistently thinks it receives 2 characters. The first received character seems to map to the transmitted character (in some unkown way) and the second received character is always 0xff Here is what I observed: T...

Simple robust error correction for transmission of ascii over serial (RS485)

I have a very low speed data connection over serial (RS485): 9600 baud actual data transmission rate is about 25% of that. The serial line is going through an area of extremely high EMR. Peak fluctuations can reach 3000 KV. I am not in the position (yet) to force a change in the physical medium, but could easily offer to put in a simpl...

Custom RS485 Protocols

I am writing a simple multi-drop RS485 protocol for serial communications within a distributed system. I am using an addressable model where slave devices are given a window of 20ms to respond. The master uC polls the connected devices for updates and they respond accordingly. I've employed checksums and take the necessary overrun pre...

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

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 co...