![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
jfk1965
Joined: 21 Oct 2003 Posts: 58
|
RB Interrupt ? |
Posted: Thu Mar 30, 2006 3:19 am |
|
|
hi
I have a project to report the state of charge of a large battery pack, I can't use one of the commercially available gas guage type chips as there too many cells being used it will be out of there range.
Current Sensing will be done with a hall effect sensor and I had thought about feeding the output of that into a V to F convertor and then using a Pic to count the pulses.
The likely frequency is 1 - 100Khz will the RB interrupt be fast enough to count the pulses or would you recomend a different method?
The state of charge needs to be transmitted over a canbus (along with other info) so I immediately thought a pic would be the best solution.
I would appreciate your thoughts / comments
JFK |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Mar 30, 2006 3:52 am |
|
|
Use a CTC instead.
Whether RB would potentially be fast enough, depends on the speed of the processor, and what you do inside the interrupt. However, even on the fastest chip versions, at the highest rates, the processor will be spending almost all it's time in the RB interrupt handler, and not be able to do anything much else. The CTC, will happily count pulses to many MHz rates (exact ceiling, depends on the processor). Add an overflow handler to give you perhaps a 32bit counter, and you have reliable counting to high rates.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
jfk1965
Joined: 21 Oct 2003 Posts: 58
|
|
Posted: Thu Mar 30, 2006 3:58 am |
|
|
Thanks Ttelmah, excuse my ignorance but what do yo mean by a CTC? Not familiar with the abbreviation,
Edit
Sorry i did a search and found the answer to my question, really must get used to using that search facility more
thanks again
JFK |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Thu Mar 30, 2006 6:33 am |
|
|
You have already found the answer, but just to explain further,'CTC' was the name given to counter/timer modules on some other chips. CCS, elected instead to use 'CCP' as a name for their's. The CTC abreviation was for 'counter/timer/compare' modules. CCS, call their units 'capture/compare/PWM' modules, though they can also be used as timers. I supose if you were to design the abreviation to cover all their uses, they would actually be CTCP modules!. Unfortunately, because I use other processors, where these modules are called CTC's, I tend sometimes to use this name...
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|