Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5377

MicroPython • Re: Frequency counter stops after while

$
0
0
It's the right place to change the gate time, no need for other changes. Now the gate time is 200 ms, which is more than enough for the rest of the code to do its thing. If you want to experiment with other gate times, the formula to calculate the value to enter into sm0.put(x) is:

Code:

x = state machine frequency * gate time (in seconds)
For example, to get the gate time of 100 ms when using the 250 MHz clock (MFREQ) it would be:

Code:

x = 250e6 * 0.1 = 25e6
so you'd use:

Code:

sm0.put(25e6)

As a side note, I should really get to uploading the newer, more refined version, shouldn't I?

Statistics: Posted by horuable — Fri Feb 23, 2024 9:20 am



Viewing all articles
Browse latest Browse all 5377

Trending Articles