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

frequency measuring

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



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

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

frequency measuring
PostPosted: Wed Jun 26, 2019 8:00 am     Reply with quote

Hello there,
1- I want to something ask. I want to measure the frequency with the incoming pulse.
2- Can I measure frequency directly from an inside ?
I using microprocessor dsPIC33EP256MC502. I using crystal 16mhz with clock 120mhz.
_________________
Es
gaugeguy



Joined: 05 Apr 2011
Posts: 303

View user's profile Send private message

PostPosted: Wed Jun 26, 2019 8:30 am     Reply with quote

What is the frequency range of the signal you want to measure?
Will the signal be conditioned to a square wave input 0-VDD?
ertansuluagac



Joined: 13 Jul 2017
Posts: 135
Location: IZMIR

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

PostPosted: Wed Jun 26, 2019 8:34 am     Reply with quote

I do not know that. It is flow meter. I will calculate according to the incoming pulse. I only get a pulse from a Vout. This is constantly changing. So I can't say anything clear.
_________________
Es
temtronic



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

View user's profile Send private message

PostPosted: Wed Jun 26, 2019 8:57 am     Reply with quote

'Flow meters' tend to be low frequency devices though the mfr of it will have charts/data of flow rate vs frequency (PPS). Even the cheap ones from China have data on the website. There will be a relationship of volume of water to pulse (1 revolution) so you could create an ISR to count pulses and calculate both flow and volume.

Jay
Mike Walne



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

View user's profile Send private message

PostPosted: Wed Jun 26, 2019 3:58 pm     Reply with quote

Have a look at your input pulse with a 'scope. If it's not close to being a 0 to Vdd square wave then you will need to process it.

There are two general ways of measuring frequency:-

1) Count the No. of pulses in a fixed time (say 1s).
2) Measure the period of one (or several) pulse(s) and convert.

For a flow meter you will probably use the 2nd method.

Mike
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