![]() |
Forum Index : Microcontroller and PC projects : Measuring frequency on Micromite/maximite
Author | Message | ||||
OA47 Guru ![]() Joined: 11/04/2012 Location: AustraliaPosts: 982 |
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? |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3269 |
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: AustraliaPosts: 982 |
Thanks Geoff, That information explains a lot. Hope you are enjoying your travels. Best regards GM |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@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: AustraliaPosts: 6220 |
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 ZealandPosts: 2400 |
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: AustraliaPosts: 3269 |
That sounds like a great idea, I will add it to the list for further investigation. Geoff Geoff Graham - http://geoffg.net |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |