PIC to PIC interfacing by RS485

Status
Not open for further replies.
Have you connected your Rx and Tx pins of PIC to SN75176 or or you using other Pins? If you are using other pins then are you using Software UART to send and receive data?
 

I don't really understand what you exactly mean by communication.... to me its a simple "fprintf" statement and the "RDA interrupt"
If you need more help... we can have a skype session??
 

I hav connected tx and rx pins of pic with SN75176.
 

should it be possible to do RS485 serial communication without using transceiver SN75176 in my circuit...
 

I havent done any Project using SN75176. You read the datasheet of SN75176. You have to connect the SN75176 to Rx and Tx pins of PIC if you are using Hardware UART.
 

you are right i just checked my schematic out and SN75176 must be connected to TX and RX pins of PIC18F452. i will change that. can you please help me in code
 

Do you have the algorithm for data transmission and reception? If yes I can help you in coding.

You are using mikroC Pro and It has Software UART Library. If you use that then you can connect pins other than Rx and Tx to SN75176.
 
Last edited:

yes i have an algorithm i m attaching that one and i am also coorecting the mistake i made in tx and rx
 

Attachments

  • algorithm.rar
    10.4 KB · Views: 82

I asked algorithm for SN75176 data transmission. Tere is no such thing in your code. I want to know which pins of SN75176 has to be made high / low during transmission and reception and for what duration.
 

is it possible to use simple RS232 that if we are having communication between two devices that are at a reasonable distance for RS232 communication and leave RS485 S THE TWO PICS THAT I M communicating are at a reasonable distance for RS232
 

its 15m thats enough for our project. suppose if we have one control unit and multiple ballot units then can we use RS232

- - - Updated - - -

RS232 seems reasonable to me

- - - Updated - - -

if i m using RS 232 communication between two pic then did i have to use any transceivers.

- - - Updated - - -

can i have to use MAX232
 

i have changed my schematic by replacing RS485 with RS232. i am attaching my new schematic. i tried to do code for RS232 communication by using interrupt. but i have a problem that when i press switch connected to one micro controller and the other micro controller receives data through uart (RS232) then how can i know that the data received is of particular switch.

- - - Updated - - -

i m also attaching my code.

can anyone help me.
 

Attachments

  • schematic.rar
    17.1 KB · Views: 77
  • final final.rar
    556.4 KB · Views: 96

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…