+ Reply to Thread
Results 1 to 2 of 2

Thread: IR ISR problem

  1. #1
    timothyjackson Newbie
    Join Date
    Sep 2004
    Posts
    148

    Default IR ISR problem

    Hello everybody,, - would really be grateful for some advice.

    I've got a PIC 16f628 controlling 3 leds. A button is pressed to bring it out of "off/sleep" mode, and into 1 led on, a second press brings the chip into "2 leds on", and a third push brings the chip into 1 led flashing. A forth push brings it into sleep mode again etc etc.

    Pushing a button is the ISR, which decrements a file register, and the "test" sub routine pushes this number into the PCL for the appropriate "goto".

    This works fine with a button on the board. However, when the isr is activated by a IR signal, the "1 flashing LED mode" is totally random. Sometimes it flashes twice and stays on permanatly, sometimes nine times and stays on permanently. Sometimes it wont pull out of the flashing mode.

    Summary: It works with a button on the board, but not with an IR signal (on the same pin - IR definatley works (I have a IR recived light up led to confirm) - for some reason the IR isr is creating this random led flashing sympton.

    any ideas????


  2. #2
    Super Moderator Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent Nigel Goodwin Excellent
    Join Date
    Nov 2003
    Location
    Derbyshire, UK
    Posts
    29,794

    Default Re: IR ISR problem

    Quote Originally Posted by timothyjackson
    Hello everybody,, - would really be grateful for some advice.

    I've got a PIC 16f628 controlling 3 leds. A button is pressed to bring it out of "off/sleep" mode, and into 1 led on, a second press brings the chip into "2 leds on", and a third push brings the chip into 1 led flashing. A forth push brings it into sleep mode again etc etc.

    Pushing a button is the ISR, which decrements a file register, and the "test" sub routine pushes this number into the PCL for the appropriate "goto".

    This works fine with a button on the board. However, when the isr is activated by a IR signal, the "1 flashing LED mode" is totally random. Sometimes it flashes twice and stays on permanatly, sometimes nine times and stays on permanently. Sometimes it wont pull out of the flashing mode.

    Summary: It works with a button on the board, but not with an IR signal (on the same pin - IR definatley works (I have a IR recived light up led to confirm) - for some reason the IR isr is creating this random led flashing sympton.

    any ideas????
    It sounds like you're getting multiple pulses from the IR?.

    But you don't give any idea as to what the IR is?, either the receiver?, or the transmitter?.
    PIC programmer software, and PIC Tutorials at:
    http://www.winpicprog.co.uk

+ Reply to Thread

Tags for this Thread