+ Reply to Thread
Results 1 to 4 of 4

Thread: pic rs485

  1. #1
    newboy10 Newbie
    Join Date
    Nov 2003
    Location
    canada
    Posts
    1

    Default pic rs485

    hey guys
    I really need help.
    I have a project for school
    I have to build 5 pic boards that controls 5 relay and have 5 switch which can be programmed to sw relay on and off. also i need to connect all 5 board and a pc using rs485. also u can control the relay from pc and programmed schedules for relay. i know it is a lot to ask but i will appriciate any input.
    thanks. newboy.


  2. #2
    ivancho Newbie
    Join Date
    Aug 2003
    Location
    Kansas
    Posts
    333

    Default

    I suggest you develop a RS485 to RS232 converter... so that the PC can talk to the PIC. If the pic has a RS485 card on it then you will only need one converter other wise 2 converters will be necesary.

    A Visual Basic program can be created to output a character with which you can receive witht the pic and turn on the relays. Also have the PIC check the switches and send the data to the PC

    Good Luck

    Ivancho

  3. #3
    stef Newbie
    Join Date
    Nov 2003
    Location
    Port Elizabeth, South Africa
    Posts
    26

    Default

    I agree with Ivancho; I would build a converter using a PIC with an onboard USART to relay the RS232 signals to RS485. If I remember correctly the MAX485 chip has an enable signal for TX & RX which you can then turn on & off with the PIC.

    Use a form in Excel or Access to define the switches. Use an ActiveX I/O control on the form to access the serial port. Take the switch status from your form and concatenate them into a char or byte which will be decoded by each PIC to determine if the relay has to be activated ie bit0 could be relay 1 & bit 2 relay 2 etc.

    Shout if you need help...
    Stef

  4. #4
    crust Okay
    Join Date
    Sep 2003
    Posts
    728

    Default

    You can use an RS485 transceiver from maxim and others for all of the PIC-to-PIC connections. You only need RS232 from the PC to the bus. For that I would make (or buy) a simple RS232-RS485 converter.

+ Reply to Thread

Tags for this Thread