Using one External Interrupt

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
Hi, so just had a little thought, been trying to figure out a way of letting my uP know when the user interface has been touched/changed, but only having one or two interrupts left on my pic32 has left me a little.. confused how to do this, i have attached (hopefully) a schematic of a circuit that might solve my problem, can someone have a look and "thumbs up" or "thumbs down"?
or if you have an alternate method?
Cheers in advance
Chris
 

Attachments

crutschow

Joined Mar 14, 2008
25,269
That scheme should work in general.

A 1k resistor to ground will give a low level of 1/11 * 3.3V = 0.30V when a button is pushed which I assume is well below the low-level logic threshold of the μP (?).
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
its ttl and cmos pins..
ttl Input low level is 0.8V and cmos the same apparently.
so yes that would work.. so hook it up like the attached image?
 

Attachments

ErnieM

Joined Apr 24, 2011
8,053
I've done similar things and they do work well.

Do keep in mind that as wired if the user pressed say button 2 while button 1 is pressed it will not re-trigger the interrupt.
 

crutschow

Joined Mar 14, 2008
25,269
its ttl and cmos pins..
ttl Input low level is 0.8V and cmos the same apparently.
so yes that would work.. so hook it up like the attached image?
I had assumed that your interrupt input was CMOS. It won't necessarily work with those resistor values for TTL since you must sink current from the input to create a logic low. You can just remove the 1k resistors and replace with a direct connection to the switches. The 1k resistors serve no real purpose. That will give a solid logic low for any logic family.
 

Thread Starter

chrisw1990

Joined Oct 22, 2011
551
I've done similar things and they do work well.

Do keep in mind that as wired if the user pressed say button 2 while button 1 is pressed it will not re-trigger the interrupt.
they would only be momentary switches and the interface would only require one button to be pressed at a time
 
Top