RS-485 code

Do any of you fine people out there know of any RS-485 code snippets. Ideally I am after code that would handle asynchronous comms with a RS-485 or RS-232 transceiver.

Hi Chris, I am not entirely sure what you are asking for.

the Xojo serial class is the same for both systems, RS232 and RS485 being the hardware layer, nothing to do with the actual information transmitted.

I work extensively with the serial class and the examples that come with Xojo are the basis of all my code, and its actually a lot more simple than one might expect.

I have the same serial code working on Mac, Pi, Linux and windows.

For some reason I thought that there were certain issues that needed to be handled in code due to RS-485’s higher signal transients,
but then it occurred to me after starting the conversation that this is what a 232>485 converters job was for.

Hi Chris,

Generally 232 will be a very much higher voltage than 485, around ±9 to 12v, as I am sure you know, but 485 is generally in my experience 3-5v but uses a differential pair and is more like a current loop, therefore very much better at long distance due to very significantly lower noise on the line, I am reiterating this more for any readers than yourself.

I found myself forgetting at first that the transport mechanism in the external hardware has absolutely nothing to do with what Xojo does in its serial class as all it knows is there are a few 1s and 0s in the buffer, caring nothing about how they arrived there!

just give the serial class a go, it really does work very well.

A belated thank you Mark.

Just found this thread and thought I would ask the following

I am in the process of designing a RS-485 to Rasp Pi TX-RX converter for use with an external keypad-card reader that uses RS-485 OSDP

I am not that familiar with OSDP. Tons of RS-232 which is ASCII based. I have found articles on either RS-485 or OSDP but nothing that really differentiates to inform you what you receive from a sending device that utilizes OSDP on RS-485. I am guessing and I do not like to guess that there might be a token to indicate ASCII number - letters or the info may come encapsulated which would require some sort of parsing-decipher code

Does anyone have any links that would be helpful or pieces of wisdom on how to understand OSDP RS-485 data?


Go figure. As I was writing the above I was able to find the following

Does anyone know of a module that parses this information?