Hello,
I'm connecting a PIC 16F876 and a 16F88 through SP485CS transceivers. First, I was getting errors and I read somewhere in the forum that quartz were necessary on both PICs. I added a quartz on the 16F88 and the data transmission was OK in my lab.
I have installed the system in a large building and the circuits are about 70 meters distant. I'm having the same old errors with datas mixed.
I send 10 bytes making 5 words using:
HSerout [b1,b2,...b10]
and when i display them, the order is not respected, w2 can be first or w3.
Both PICs are running at 4 MHz. The cable between the RS485 is a data transmission cable shielded, I have tried to connect the shield to the main ground (on one side only) or not (no change).
The defines for the RS485 are:
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 103
Is there a way to slow down the system and be sure that the receiver will know which data is the first ?
Bookmarks