Someone Posts a Code Example, Then What?


Closed Thread
Results 1 to 6 of 6

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    I don't think I have schematics for each that use the PIC12F629 but my web page does have schematics of the basic circuits using similar chips (although they may use different pins). See...For the transdmitter, I used a chip with ADC so I can modify the output to signal a low battery. If you are not interested in that, use the PIC12F629 and omit the connection to pin 6. Because I wanted to maximize battery life, the transmitter is powered by the data signal so there is no transmitter drain when idle.

    For the receiver circuit you can use a PIC12F675 or the PIC12F683, as shown, if you want to measure received signal strength using an ADC pin (code will need modification). Otherwise, a PIC12F629 is fine.

    NOTE: While the code uses a protocol developed about 40 years ago by NEC for IR remote control (TV, etc.), it's being used here for RF (as X-10 has used it for for nearly 40 years). If you want to use it with IR it's a bit different for both transmitting and receiving.

  2. #2
    Join Date
    Dec 2007
    Posts
    34


    Did you find this post helpful? Yes | No

    Default

    Hey Dave,
    I plan on using IR in the future but for the moment i would like to get the RF working, the RS232 portion of the reciever is also something i would like to play with so the code you have posted is a perfect start.

    Thanks again,
    Jeremy

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


    Did you find this post helpful? Yes | No

    Default

    The primary differences for IR are that you need to modulate the transmitter with the IR carrier frequency (usually 36-40kHz) and IR receivers are active low whereas RF receivers are active high. If you wander about my website you'll find a few schematics that may help. You can find more specific schematics on Bruce Reynols website...Make sure that you are using the latest version of Code Studio. I believe the sample code was written for use with MPASM. If you want to use the meLabs PM assembler, you need to change the fuse config settings - there's a thread here that details the different syntaxes...
    Last edited by dhouston; - 10th June 2008 at 14:58.

Similar Threads

  1. Reading in Manchester code
    By brid0030 in forum Code Examples
    Replies: 0
    Last Post: - 10th March 2009, 21:55
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  5. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23

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