Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 16:19 11 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Measuring frequency on Micromite/maximite

Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 12:05am 25 Jul 2014
Copy link to clipboard 
Print this post

What are the limitations to measuring frequency on the micromite/maximite?
The only specs I can see in the documentation is the frequency range.
Specs I would like to know are:
What duration does the frequency need to be presented to the chip to be sampled and what is the minimum amplitude that is needed?Edited by Graeme Meager 2014-07-26
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 12:13am 25 Jul 2014
Copy link to clipboard 
Print this post

Sampling is done once a second to the signal needs to be there for a second (I hope to add different sampling times in the future). The the signal needs to be TTL levels for a normal input as documented in the manual.

Geoff
Geoff Graham - http://geoffg.net
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 12:16am 25 Jul 2014
Copy link to clipboard 
Print this post

Thanks Geoff, That information explains a lot. Hope you are enjoying your travels.
Best regards
GM
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 05:01pm 25 Jul 2014
Copy link to clipboard 
Print this post

@Graeme Meager

The PIC32 clock on a uMite is NOT an xtal, so the accuracy of the frequency measurement must be necessarily limited.

On a Maximite, which has a crystal, the accuracy should be much, much better. Ideally some means of calibrating the clock should be implemented in your s/w (for the Maximite).

Since the clock on the uMite is in effect an RC network, its temperature sensitivity would make calibration a hopeless task IMHO.

So in sum, if your want to measure low frequencies (ie without a pre-scaler), and can accept loss of accuracy, then using the inbuilt RC clock of the uMite would be acceptable. If, however, U want Frequency Counter performance, then you MUST use the Maxi/Mini-mite, IMHO.

73

Peter


The only Konstant is Change
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6220
Posted: 06:31pm 25 Jul 2014
Copy link to clipboard 
Print this post

AS far as I could tell, once the pin is set to 'frequency' the micromite does a background count and every second, updates a register. Whenever you request a frequency reading, the most recent register value is returned.
As well as taking a full second to do the count, the value returned could be as 'old' as just under one second.

This is evident if you do a read just after setting the port state.

I find the frequency reading good for things that change slowly but not a lot of use for rapid changes.

Jim
VK7JH
MMedit
 
robert.rozee
Guru

Joined: 31/12/2012
Location: New Zealand
Posts: 2400
Posted: 05:44am 26 Jul 2014
Copy link to clipboard 
Print this post

a useful 'enhancement' for functions that update in the background is an 'updated' flag that is set whenever the measured value is updated and cleared whenever the value is read out by the user program.

this could be implemented as something like a set of variables called MM.PINnnUD, where nn is the pin number from 01 up to 28. perhaps something for the next revision of mmbasic?


rob :-)
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3269
Posted: 06:27am 26 Jul 2014
Copy link to clipboard 
Print this post

  robert.rozee said   a useful 'enhancement' for functions that update in the background is an 'updated' flag that is set whenever the measured value is updated and cleared whenever the value is read out by the user program.


That sounds like a great idea, I will add it to the list for further investigation.

Geoff
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025