CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Interrupt on change not working with low current EX trigger

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
pulurumbuluruciu



Joined: 06 Nov 2013
Posts: 27

View user's profile Send private message

Interrupt on change not working with low current EX trigger
PostPosted: Mon Jan 06, 2014 4:43 pm     Reply with quote

When I'm using a low-power (5V , ~10 mah) external trigger source my PIC wont "See" the interrupt. I tested with the logic-analyzer and the rising edge generated by the external trigger is there. How come the PIC does not "see" it and the logic analyzer do!? Another story is if I use a higher current external trigger, is working as it should. What could be the problem?
(I'm using a LED blink with decent lighting time to see if the INT fired).
The PIC setup is with a 10K pull-down resistor for the EXT int pin, as I want to detect the rising edge.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jan 06, 2014 5:36 pm     Reply with quote

Post your schematic and a detailed description of the circuits and
also post your test program.
If you look at your post and several of the other posts made at the
same time, you notice that very little information is given to us.

Post the details. Then we have a chance to understand your problem
and maybe help you to solve it.
jgschmidt



Joined: 03 Dec 2008
Posts: 184
Location: Gresham, OR USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Jan 06, 2014 8:10 pm     Reply with quote

I ran into something similar recently trying to get a 12LF1822 to wake up from sleep via a signal from a PIR sensor. I saw the same thing on my scope - a nice clean rising edge but apparently not enough "umph" to trigger the hardware interrupt. (Woke up just fine with a 1K to positive.) The PIR sensor only draws 1uA when idle and 100uA when triggered. Rather than dig through the specs I just amplified it with a PN2222 transistor to see if that would work, and it did. Everything works fine now.
_________________
Jürgen
www.jgscraft.com
Ttelmah



Joined: 11 Mar 2010
Posts: 19535

View user's profile Send private message

PostPosted: Tue Jan 07, 2014 4:56 am     Reply with quote

Key thing is that on many chips the INT_EXT pin has a Schmitt buffer.

So (for instance), on a 18F4520, at 5v, the signal has to go up to 4v, before it is seen as 'high' (0.8*Vdd).
Now on this chip if instead you use the 'interrupt on change' on RB4 to RB7, this triggers at 2v.

It's designed so that signals carrying significant noise won't cause erroneous triggers.
Odds are your logic analyser uses buffers that switch at perhaps 2 to 2.4v.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group