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

rc toys project

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



Joined: 09 Jun 2010
Posts: 3
Location: dunkerque, france

View user's profile Send private message

rc toys project
PostPosted: Sun Jun 20, 2010 10:19 am     Reply with quote

hye everebody,
since few weeks I've read this helpfull forums, very good and I've still a lot of things to learn.

ok right now it's time for me to ask a few questions. I'm not used to write in english so please could you be kind and patient with me.

I intend to build this following project for a static rc glow engine.
I'd like to monitor several things: motor temperature, external temperature, 1 battery voltage, motor rpm (from 0 to 25 000 rpm) and the number of revolutions (very important), knowing one servo pwm duty cycle.
And I need to manage another servo.
All of them connected to a rs232 interface for my old laptop.


I've have worked on temperature and voltage monitoring ( ctn is a ninear kty ctn and voltage will be read through the middle of two will be enough 0.1v is enough )
For reading rpm I use a hall sensor with an aop and a transistor in order to get a square wave from 0v to 5v.

Oops forget to tell you I must use the following µC in stock 16f88, 16f628, 16f877 and 18f2550.
So now that I've read plenty of this ccs discussions about a precise rpm(frequency) meter. And now I'm a little bit lost.

Many of frequency meter or pulse capture use all the µC time, remember I've so many analog conversion to do, or they use too many ccp input(I've to manage one servo using ccp1, and capture an another ccp2)

Can you help me in order to find the right freqency meter ?


regards. fred


Last edited by fredelek59 on Sun Jun 20, 2010 11:29 am; edited 1 time in total
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Sun Jun 20, 2010 10:43 am     Reply with quote

25K RPM is an interrupt every 40us. With interrupt overhead that doesn't
leave you with a whole lot of time for everything else.

Using the 2550 at 48MHZ you might be able to handle the RPM and the
analog but to add two PWM plus RS232 is asking a bit much for the lowly
PIC, even using the hardware UART.

If you use more than one processor or some other external counting
hardware it can be done. One option is to add a couple of decade counters
in series for the RPM and divide it by 100 to reduce the load on the
processor.
_________________
Google and Forum Search are some of your best tools!!!!
fredelek59



Joined: 09 Jun 2010
Posts: 3
Location: dunkerque, france

View user's profile Send private message

PostPosted: Sun Jun 20, 2010 11:36 am     Reply with quote

hye, very happy you understand me for my first message. Very Happy
how did you calculate 40µS ?
I've surely made a wrong calcul....
25k rpm / 60s =416.66 hz
1/416.66 hz = 0.0024s soit 2400 µS : Crying or Very sad
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jun 20, 2010 11:45 am     Reply with quote

The CCP on the 18F2550 has optional /4 and /16 prescalers on the
input signal. This will reduce the interrupt rate to a reasonable level.
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