need to know if this is possible.


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2012
    Posts
    3

    Default need to know if this is possible.

    i need to link 2 pics using serial. on one side it needs to monitor the state of a reed switch and if possible the charge level of a battery. on the other side the pic needs to trigger and opto and control a status led. i have been looking for a wile have coded a few things on pics but never anything using serial and can't find a solution.

  2. #2
    Join Date
    Dec 2010
    Posts
    409

    Default Re: need to know if this is possible.

    It's a simple matter to put a serial link between two devices. Go to the PBP help section and look up SERIN/SEROUT or SERIN2/SEROUT2 or HSERIN/HSEROUT if your PICs have hardware serial ports. I'm not sure why you would do this, however if all you are doing is what you described - the most basic single device could happily handle that functionality.

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159

    Default Re: need to know if this is possible.

    Quote Originally Posted by Charlie View Post
    It's a simple matter to put a serial link between two devices. Go to the PBP help section and look up SERIN/SEROUT or SERIN2/SEROUT2 or HSERIN/HSEROUT if your PICs have hardware serial ports. I'm not sure why you would do this, however if all you are doing is what you described - the most basic single device could happily handle that functionality.
    Maybe the two halves are separated by some distance?

    I understand that Phillips created I2C (Inter Integrated Circuit) just for having two chips talk to each other on the same board, so there must be a good reason for it.........

  4. #4
    Join Date
    Dec 2010
    Posts
    409

    Default Re: need to know if this is possible.

    Quote Originally Posted by andywpg View Post
    Maybe the two halves are separated by some distance?

    I understand that Phillips created I2C (Inter Integrated Circuit) just for having two chips talk to each other on the same board, so there must be a good reason for it.........
    No one suggested a serial interface is never needed, but in this case (reading a voltage and counting closures of a reed switch, then turning on an LED or an opto) an 8 pin device is tons and 2 PICs with a link is overkill.

    If you need to divide a voltage in half, you can use an A-D converter to sample the voltage, divide the measured result by 2 then use a D-A converter to construct a voltage based on the new number. You also need a power supply, clock source, and a handful of other parts. Or you can use 2 resistors of the same value - it's up to you.

  5. #5
    Join Date
    Jun 2012
    Posts
    3

    Default Re: need to know if this is possible.

    i should explain that the devices will not be physically connected to each other but the data is being send over rf transmuter pair the person I'm building if for has in stock. the project will be used to tell if a door is open and depending on if it is or not turn on and off a piece of equipment they already have in place.

  6. #6
    Join Date
    Dec 2010
    Posts
    409

    Default Re: need to know if this is possible.

    That makes more sense. Depending on the type of link, RF can be significantly more challenging. There are some (expensive) RF link modules that have RS-232 serial inputs. There are some cheap RF modules that will need Manchester or similar encoding in order to function. When you find out which type you have, search the forum - there's lots of good advice for both types here.

  7. #7
    Join Date
    Jun 2012
    Posts
    3

    Default Re: need to know if this is possible.

    i actually went searching through the parts bin and found some rf pairs that are not serial so i have it working with them.

    thanks for the help

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts