Simple Wireless Communication


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2007
    Posts
    34

    Default Simple Wireless Communication

    Hi All,
    I am trying to setup very simple wireless communication between 2 PIC's (preferably 16F628A as they are abundant in my area).

    What i would like to do is when a button is pushed on the "transmitter PIC" a number is sent to the "receiver PIC" (01153001), the number itself contains three groups of numbers which the PIC will recognise. "01" is a valid code (this code must match a code pre programmed in the receiver, so that the transmitter and receivers can be addressed), "15" is a action code (determines what the receiver will do, e.g. turn on light A) and "3001" is the unit code (this code is unique to the transmitting PIC, at this point the receiver should ignore it)

    The transmitter and receiver i have in mind are:
    Transmitter: http://jaycar.com.au/productView.asp?ID=ZW3100
    Receiver: http://jaycar.com.au/productView.asp?ID=ZW3102
    I have used them before on a similar project and they worked perfectly.

    If anyone can help or point me in the right direction that would be great,
    Thanks for your help in advance,
    Jeremy

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    use DEC2 and 2 X bytes variable, and probably a last WORD sized one

    HSERIN [DEC2 UnitNumber, DEC2 Action, DEC4 Trash]
    and then you check UnitNumber to see if it fit your requirement.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Dec 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Hi Mister_E
    I am really quite new to basic and have no clue where to start, i have attached a schematic of what i think the wiring should be (if there is anything wrong please point it out) but apart from that i would not have a clue.

    Are there any similar projects or is this more complicated than i think?

    Regards,
    Jeremy
    Attached Images Attached Images

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Start small. For now, forget the RF module. Do some PIC to PC communication first, then PIC to PIC communication. Once you're done, add the RF modules.

    There's a lot of Serial communication example here. Same for RF.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    1. Your schematic says RX Module & Receiver but shows the transmitter.

    2. Don't forget a 0.1µF bypass capacitor on Vdd.

    3. Your question is asked frequently and usually devolves into a long, confused thread. I've put together a very short web page that covers simple wireless communication, including a link to sample PBP code. See...

  6. #6
    Join Date
    Dec 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Hi Dave,
    I made some changes to the schematic to include the capacitor, ideally what i am trying to do is have the transmitter send a code when SW1 is pushed and if that code is the same as the code in the receiver then the LED is turned on.

    I also had a look at your PIC RX-TX code http://davehouston.org/PIC-RX-TX.TXT
    can it be adapted to work on a 16F628A?

    Thank you very much for your time,
    Jeremy
    Attached Images Attached Images

  7. #7
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    It should be simple to convert. The example is for an 8-pin PIC so pin designations will differ. I would start by comparing pin designations in the datasheets for the 12F629 and the PIC you want to use. Also, the example assumes an internal 4MHz oscillator. If you use a different oscillator frequency you need to adjust the values used with PulsIn/PulsOut accordingly. See the PBP manual entries for these commands.

    You are still showing a 4-pin module as the receiver. The receiver has 8 pins. The datasheet for your receiver indicates its output for Logic HI is 0.7Vdd (3.5V with Vdd=5V). Table 17.4 of the PIC16F628A datasheet indicates that pins with Schmitt Trigger inputs need 0.8*Vdd (4V with Vdd=5V) for Logic HI while pins with TTL inputs only need 2.0V for Logic HI. Tables 5.2 & 5.3 of the PIC16F628A datasheet give the types of input buffers for the pins. I suggest you use a TTL input on Port B.

    Also, RA5 is input only so your transmitter circuit isn't going to work as drawn. You need to choose another pin.
    Last edited by dhouston; - 27th March 2008 at 16:43.

Similar Threads

  1. Wireless serial communication question
    By Ahmadabuomar in forum Serial
    Replies: 3
    Last Post: - 21st December 2009, 03:49
  2. Replies: 0
    Last Post: - 29th August 2008, 14:55
  3. Replies: 2
    Last Post: - 29th September 2007, 06:49
  4. RS 485 wireless communication
    By Armadus in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 26th January 2006, 19:30
  5. Wireless communication gear.
    By toalan in forum Off Topic
    Replies: 5
    Last Post: - 17th March 2005, 16:33

Members who have read this thread : 0

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