pic to pic ir link versus wired link : help please anyone


Results 1 to 14 of 14

Threaded View

  1. #7
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    It should work. But you probably need to invert it.

    On the transmit side, where it would previously turn the HPWM ON, make the pin LOW instead.

    For PWM OFF, set the pin HIGH, and forget the transistor.

    Added: And make sure the CCP module is turned OFF.
    <br>
    Yes, turn it low instead of high because I have to pull low my receiver pic pin RA0 to trigger the int.

    But, and wouldn't it be better, I can also output a positive voltage pulse while the receiver pic is pulled to GND by a WPD resistor and PULSIN listens to a Low to HIGH transition: PULSIN porta.0,1,etcetera


    Code:
    IF (a.0(0) == 0) THEN
        FOR i = 0 to 13                     'get a sequence of incoming 14 bits (WITHOUT their prefixes which are 600us pause)
            PULSIN PORTA.0,1,ir_pulse[i]    ' Read 14 low-going pulses on RA.4, see pbp manual
        NEXT i
        pin = 0                              ' Loop 14 times, record in 5us resolution pulse duration in the word variables array
    ENDIF
    It would work too?

    BTW, why do I need to disable CCP module? It would prevent the output to work fine?


    And what's technicaly wrong with using a transistor???
    Last edited by xnihilo; - 29th May 2008 at 22:45.

Similar Threads

  1. Replies: 17
    Last Post: - 12th April 2014, 02:17
  2. Sending Commands from Visual Basic about IR to Pic
    By tne_de in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th April 2009, 06:09
  3. SPI configuration PIC versus Atmel
    By Pedro Santos in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 10th July 2007, 19:17
  4. Need help building a simple IR learning remote with a PIC
    By JackPollack in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 20th April 2006, 22:22
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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