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 support@ccsinfo.com

int_ext and time required to detect falling/rising edge

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



Joined: 21 Nov 2006
Posts: 129

View user's profile Send private message

int_ext and time required to detect falling/rising edge
PostPosted: Thu Nov 05, 2009 11:45 pm     Reply with quote

Assuming a 10mHz 16F88. Since I know PCM Programmer will ask (Very Happy), I'm using PCM 4.032.

When using #int_ext, what would the constraints be to detect an incoming pulse (either rising or falling edge, whatever the interrupt was set up for). For example, detecting a falling edge. Would it matter how long the pulse stayed low? If there was a falling edge, but 1us later, the signal went high again, would it still fire the interrupt?

I know I could test it empirically, but for future reference of others (and to save me time testing it out), I thought it would be worth asking here. I did search the forum for the answer already.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Nov 06, 2009 2:43 am     Reply with quote

It's normally given at the end of this table, in the Electrical Specifications
section of the data sheet:
Quote:
CLKOUT AND I/O TIMING PARAMETERS

For the 16F88, the minimum External Interrupt pulse width is 1 instruction
cycle (1 Tcy):
Quote:
INT Pin High or Low Time: Tcy (Min)

With a 4 MHz oscillator, 1 Tcy is 1 usec. At 20 MHz, it's 200 ns.

Several other data sheets for similar PICs specify it as 25 ns (min).
See the 16F690 and 16F887.
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Nov 06, 2009 4:16 am     Reply with quote

Some interrupts sources can operate also in sleep mode. In this case, the respective part of the interrupt logic can't use a system clock source and works asynchronously, reacting faster than an instruction cycle.

Last edited by FvM on Fri Nov 06, 2009 4:17 am; edited 1 time in total
Ttelmah
Guest







PostPosted: Fri Nov 06, 2009 4:16 am     Reply with quote

You'll find the 'short' time (25nSec typically, - but not tested), is present on all chips that support 'clock switching'. Makes sense if you think about it, since otherwise the interrupt detection time would change when you switched clocks.

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