RS485

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
HyperUniverse
Posts: 282
Joined: 17 Jun 2009 10:42

RS485

#1 Post by HyperUniverse » 30 Sep 2021 16:51

Hi,

I cannot understand how RS485 is working, particularly receiving data.

Can anyone give me an example?

Let's say I'm expecting this message:

Code: Select all

0x01
0x00
0xA6
0x41
0x7B
0x30
0xFC
0x16
0x41
0x7B
0x01
0x00
0xFC
0x16
0x16
0x41
How do I get it?
All the time the message is different and there's no start bit and no stop bit.
How do I guess when the data is coming, and when the full message has ended?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: RS485

#2 Post by filip » 01 Oct 2021 08:44

Hi,

If you are using RS-485 library from the compiler, you can see the message format description at the bottom of the RS-485 library help topic in the compiler's help file.

Regards,
Filip.

jumboelettronica
Posts: 45
Joined: 26 Dec 2018 10:29

Re: RS485

#3 Post by jumboelettronica » 01 Oct 2021 09:04

RS485 is a transport vehicle for industrial use. Generally one Byte is sent at a time with the logic used in RS232, that is a start bit, 8 data bits, and one or two stop bits.
The speed is limited by the length of the line, the number of nodes and the type of cable used.

Post Reply

Return to “mikroC PRO for PIC General”