IR ISR problem

Status
Not open for further replies.

timothyjackson

New Member
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?.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…