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

Modification on EX_FREQC

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



Joined: 03 Dec 2011
Posts: 27

View user's profile Send private message

Modification on EX_FREQC
PostPosted: Mon Mar 05, 2012 4:41 am     Reply with quote

Hi guys, EX_FREQC is great code to measure
input frequency period of 1 second but what modification
we need to take measurment for quarter of second thus
take reading for faster time ?
temtronic



Joined: 01 Jul 2010
Posts: 9162
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Mar 05, 2012 7:45 am     Reply with quote

There's probably a dozen different ways to accomplish the task.
Though without knowing which PIC it's impossible to tell you how.

You might actually open the CCS onscreen Help files..look in the FAQ section....

or

you could dump the listing, see what's being done , and edit a copy of the source to observe the results of your modifications

or

you could just replace the xtal with one 4 x faster

or

......
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

250ms period gate
PostPosted: Tue Mar 06, 2012 3:03 am     Reply with quote

I wrote code for maria100 in the topic titled "Internal Prescaler EX_FREQ.C" back in February this year. It's complete, compilable, and worked as expected when I tried & tested it with a 'scope.

I showed how to achieve a 100ms gate period using interrupts. I've slept since, bit believe it should be easy to modify for different clock speeds and gate periods.

When measuring high frequency inputs you have to deal with accumulator overflow. As often happens, I've had no feedback, so can't be certain there are no issues.

What the heck, it's a freebie, you can't complain. The CCS code is not straight forward to modify, mine ought to be piece of cake.

Mike
gpsmikey



Joined: 16 Nov 2010
Posts: 588
Location: Kirkland, WA

View user's profile Send private message

PostPosted: Tue Mar 06, 2012 9:45 am     Reply with quote

"As often happens, I've had no feedback, so can't be certain there are no issues." ... the least they could do is tell you what grade you got in their class for doing their homework :-)

mikey
_________________
mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3
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