Re: Pic And RS-485
You need at least 4 bytes to transmit 32-bit-long-DATA ..
You also need something to "wake up" the receiver and something to signal the end of transmission ..
Alltogether 6-7 bytes ..
For example, to wake up the receiver, send FFh (11111111b) ..
As the end character you can consider sending checksum (usually XOR of all data bytes), or just Windows EOL 0Dh 0Ah (this is the oldest convention) ..
So, the sting that your transmitter sends may look like this:
FFh DATA3 DATA2 DATA1 DATA0 0Dh 0Ah
Where, for example, DATA0 looks like this: In7 In6 In5 In4 In3 In2 In1 In0 ..
As drivers you can use MAX485, SN75176 or any other 485-transceiver ..
Don't forget that these drivers have two additional pins which switch between transmission and reception (half duplex - 2 wires) ..
Once the receiver receives and accepts this 7-byte string it may send an acknowladgement by sending a selected ASCII character, for example, "!" in the ACSII code ..
Regards,
IanP