Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use RS-485 and 2x16 LCD with PIC

Status
Not open for further replies.

waleedaly

Newbie level 4
Joined
Oct 31, 2006
Messages
6
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,320
I need help plz in buildin a project using pic , the project consists of 2 part
part one :
transmitter that scane 32 input line and send the status of that input over 2 wire (about 400 meter) using RS-485

part two:
reciver that accept coded data from rs 485 and display trigred input on lcd or
7-segment

the problem is how to use RS-485 and lcd 2x16 chracter with pic

need schmatic and scource cod
i use ccs pic c compiler
 

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
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top