Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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????
 
timothyjackson said:
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.

Latest threads

Back
Top