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

Measuring RPMs using PIC16F877

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



Joined: 12 Oct 2010
Posts: 12
Location: South Africa

View user's profile Send private message Send e-mail AIM Address

Measuring RPMs using PIC16F877
PostPosted: Sun Oct 24, 2010 9:26 am     Reply with quote

Hi,

I'm using a hall effect sensor to calculate the speed of a dc motor, I tried a couple of Examples listed in CCS with very little luck.

Please help.
_________________
Regards,
Brandon
jacqueskleynhans



Joined: 10 Apr 2008
Posts: 109
Location: Cape Town, South Africa

View user's profile Send private message

PostPosted: Sun Oct 24, 2010 9:38 am     Reply with quote

Hi Brandon, You have to be more clear than that.

Post your code that you have so far with your compiler v.
_________________
"THE ONLY EASY DAY WAS YESTERDAY"
siphorob



Joined: 12 Oct 2010
Posts: 12
Location: South Africa

View user's profile Send private message Send e-mail AIM Address

PostPosted: Sun Oct 24, 2010 9:41 am     Reply with quote

Hi,

I am using the example in EX_FREQC.C:

++++++++++++++++++++++++
Code removed.

Reason: Forum Rule #10

10. Don't post the CCS example code or drivers, or ask for such code and drivers.
http://www.ccsinfo.com/forum/viewtopic.php?t=26245

-- Forum Moderator
++++++++++++++++++++++++

_________________
Regards,
Brandon
siphorob



Joined: 12 Oct 2010
Posts: 12
Location: South Africa

View user's profile Send private message Send e-mail AIM Address

PostPosted: Sun Oct 24, 2010 11:31 am     Reply with quote

Was the information provided enough?
Please advise.
_________________
Regards,
Brandon
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Sun Oct 24, 2010 11:39 am     Reply with quote

When you say you had very little luck, what happened? What did it do that it should not have, or what didn't it do that it should have? Did it hang? Did it give bad numbers? Zeros? Etc.
_________________
The search for better is endless. Instead simply find very good and get the job done.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Oct 24, 2010 12:07 pm     Reply with quote

siphorob,
Use the forum's search page to find code for this. There is a link to
the Search page at top of the forum. Search for this:
Quote:
measure frequency

Make sure you select "Search for all terms".

You will find both software and hardware (using PIC peripheral modules)
solutions.
biozen



Joined: 08 Sep 2010
Posts: 10

View user's profile Send private message

PostPosted: Mon Oct 25, 2010 1:53 am     Reply with quote

We use Allegro gear tooth sensors for a product. The sensors produce a square wave which 'reflects' when the gear tooth passes across the sensor. Use the External Interrupt on the PIC to catch the rise/fall that indicates a gear tooth just passed. Using a timer you can measure the time between the two (or more) gear teeth. Do the maths there after to get the RPM...

We use a gear of 16 teeth. Start the timer and start counting the teeth. At the end of 16 counts of gear, stop and read timer. Average this over a few readings. This is the time for one rotation.

HTH,
Mohit.
siphorob



Joined: 12 Oct 2010
Posts: 12
Location: South Africa

View user's profile Send private message Send e-mail AIM Address

PostPosted: Mon Oct 25, 2010 5:33 am     Reply with quote

Dear PCM programmer,

I have tried a variety of samples found on the search results, the problems I have with code is very vague, or does not work completely.
Some of the treads are left with no conclusions. Is there a thread that maybe has a good solution?

Kind Regards,
Brandon

siphorob@gmail.com
siphorob



Joined: 12 Oct 2010
Posts: 12
Location: South Africa

View user's profile Send private message Send e-mail AIM Address

PostPosted: Mon Oct 25, 2010 5:55 am     Reply with quote

I also tried using the count.c program on this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=41877
_________________
Regards,
Brandon
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