Connecting 18f45k20 to a TSOP IR reciever

New Member
2011/01/19 16:40:25
Hi everyone,
I am using a debug express board which has an 18f45k20 on board, and i am having problems connecting a TSOP  to RB0.  I cannot find any good references on the internet on connecting to interrupt pins.  The interrupt is set-up ok in code and works with a button press, but it will not work with the falling edge of my tsop signal.  I suspect my hardware design is bad.  If anyone could  point me towards a good guide on interupt hardware design I would be grateful.
Starting Member
Re:Connecting 18f45k20 to a TSOP IR reciever 2011/01/20 02:33:14
hi, what does it mean TSOP? It is for me a packaging style.

Otherwise, although I didn't use a 18f45k20, I think the INT hw is the same at all of the chips. Usually I pull up the pin for ex. 4,7k; If you attempt to use the chip in power saving HW it may be higher; when you try to use you TSOP is the INT line free from other switches, other hw? Does your button connect the INT pin (pulled up to VCC) to the GND, causing so the INT signal or connect the line to VCC6GND? Or how long is the TSOP signal? May be the multiple interrupt works on button press, and a single doesn't on TSOP signal
Super Member
Re:Connecting 18f45k20 to a TSOP IR reciever 2011/01/21 09:14:18
What's the voltage level on the TSOP IR module output when no IR signal is being received?

These have internal pull-up resistors, and transition from high-to-low when the IR carrier is seen, but RB0/INT is a Schmitt trigger input type so the IR module output needs to hold RB0 at around 0.8 * VDD during idle periods for the transition to be seen.

If you're using a 3V IR module, and 5V supply for the PIC, the idle logic output of the IR module might be below the inputs threshold.

Could be something else too, but it's tough to say without seeing your code and a schematic.
New Member
Re:Connecting 18f45k20 to a TSOP IR reciever 2011/01/22 05:18:30
Hi, thanks for the replies.  I will try to post a schematic soon. 

My inital idea was this:
 The TSOP is a 1736 which outputs 5V when idle( it inverts the input signal).  The pic is 3.3V, and using the weak internal pull-ups has 3.3V on int0.  A diode is between the tsop output and int0, so that when a '1' goes into the tsop it drops to 0V output, thus allowing a potential across the diode for the voltage at int0 to drop to ground and trigger the interrupt.  

I have just got a book on pics so hopefully that will help.
I'm guessing that weak internal pull-ups don't work like I think they do, so I shall have to study them a bit more.

Super Member
Re:Connecting 18f45k20 to a TSOP IR reciever 2011/01/22 11:31:16
The diode is probably dropping too much voltage to be detected as a low.  Just use a resitive divider to drop the 5V output to 3.3V and feed it directly into the input.  Do no use the weak pullup with that arrangement.