how to get pic to pic communication


Closed Thread
Results 1 to 6 of 6
  1. #1
    kinsiro's Avatar
    kinsiro Guest

    Default how to get pic to pic communication

    hi, i m doing a IR project using pic16f84.. wat command should i use to write transmit a data from 1 pic(16f84) to another pic(16f84) thru ir transmitter n receiver??. i had tested the "serin & serout" but it seems cannot work... any suitable command?

  2. #2
    wilfrieds's Avatar
    wilfrieds Guest


    Did you find this post helpful? Yes | No

    Default Pic to Pic

    Hello there

    I found this intesting program from Frank Sloep on the folowing web page
    http://users.picbasic.org/projects/G...trol-revu1.htm

    Regards
    Wilfried

  3. #3
    Join Date
    Aug 2005
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    Take a look at this site.http://www.rentron.com/ under remote control projects.I used information from here for an IR project that worked perfectly.I used the serial commands and they work just fine.You will need to mix the serial data with the pwm signal thru an and gate as you will see in the rentron info.
    Good luck

  4. #4
    Join Date
    Aug 2005
    Location
    antipolo city, philippines
    Posts
    23


    Did you find this post helpful? Yes | No

    Default PIC Communication

    kinsiro,

    good day. using the serin/serout commands will work well provided that it has proper hardware selection, initiated properly and written timely. just for instance: you might require MCP2122 (IR Encoder/Decoder) with IR txmitter/receiver if strict IR signal/protocol is required. then you can just send serial data directly using SEROUT command. upon receiving, your device must be waiting for incoming data, SERIN portb.0,T9600,"ID",....

    If you might need help, you may want to post your work in details. thanks!

    regards,
    yettie

    We should learn "KISS" - Keep It Simple Stupid...

  5. #5
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    OK.. Here's a super simple way to do this.

    Take the code from this page: http://www.rentron.com/IR_TO_RF.htm. You'll need the MPASMWIN assembler from http://www.microchip.com

    Burn a 10F200 with this code. Connect the DIN pin (shown in Figure #2) on the 10F200 to any pin on your existing PIC (that will send your IR data), and use "inverted" serial mode.

    Build the IR receiver circuit shown in Figure #1 up to the 2N3906 PNP transistor with the 10K pull-down.

    Replace the the RF trasnsmitter module with the receiving PIC (serial input pin).

    Viola. You now have a way to transmit IR data by serial with a single 8-pin PIC that works up to 2400 bps.

    Note: You'll need a good quality IR photo module like this one http://www.rentron.com/remote_control/PNA4602M.htm#1140 (and yes, it really does matter which IR module you use for reliable serial communications).

    Why? Because IR modules have a MAX data rate. If you violate this (calm down Melanie..}), it simply does not work. This particular IR photo module works up to 3500 bps which is absolutely perfect for reliable 2400 bps serial IR data reception.

    You will also want an IR LED that matches the "peak spectral sensitivity" of the IR photo module used for absolute maximum operating distance.

    Why? Because the peak spectral sensitivity of the IR photo detector is fixed at a specific wavelength. For the TSOP1140 this is 940nm. When you use an IR LED that matches this wavelength, you get the absolute best operating range because you're transmitting at a wavelength the IR photo module is most sensitive to. This = maximum gain at the receiving end which is very important.

    We have these IR LED's as well, but any 940nm IR LED will suffice. http://www.rentron.com/remote_control/IRLED.htm I think most Radio Shack stores carry IR LED's in this wavelength, but we've also got em.

    I designed an IR wireless programming system for the BASIC Stamp a few years back that would program a Stamp (BS-II, BS-II SX, and BS2p series) from up to 75 foot from any PC running the Stamp compiler/tokenizer software (we offered a modified version of course) with a simple pre-programmed 8-pin PIC on the PC transmitter end very similar to this setup.

    If you're interested in the PIC16F676 IR receiving end that actually receives IR data from the PC & programs the Stamp, drop me a line via email. I'll give you the full source code.

    If you want to transmit & receive serial data by IR using simple PBP serout/serin commands, this works, period, and it's incredibly simple.

    And if you really want to crank the data-rate up there, (I.E. up to 19,200 bps) with IR data communications, we've got a chip & the required parts for that too http://www.rentron.com/remote_control/TX-IRHS.htm

    Can't give you the code for that one, but we definitely have the parts if you have the "need for speed"....;o}
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  6. #6
    kinsiro's Avatar
    kinsiro Guest


    Did you find this post helpful? Yes | No

    Default

    thanks.. to all of u.. i will go to read all the information.. it mayb need some time to test.. hehe.. anyway i will post my problem if i face any... tx..

Similar Threads

  1. 2 PIC, serial communication
    By lightgreen in forum Serial
    Replies: 6
    Last Post: - 21st November 2009, 15:20
  2. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  3. PIC 2 PIC communication
    By Mario in forum Forum Requests
    Replies: 16
    Last Post: - 28th April 2006, 01:56
  4. Serial communication PIC to PIC help.
    By Rubicon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th January 2005, 15:45
  5. Pic to Pic communication?
    By Rob Martin in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th April 2004, 19:41

Members who have read this thread : 1

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

Posting Permissions

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