Picomite/PicoMiteVGA V5.07.05 release candidates


Author Message
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4169
Posted: 07:27pm 06 Dec 2022      

Hi Peter,

I am running 126MHz for above test.
I am using the FIN function with a gate time of 1 second. I would expect it to count 1000000 pulses.
Are you measuring pulse width in the FIN mode and converting it to a frequency ?

EDIT: oh...the PWM is not accurate ? But I am measuring it with a scope to be stable (at least at 100kHz the scope frequency counter says 100.0kHz)


setpin gp0,pwm
setpin gp9,fin
dim integer n=100000, m

pwm 0,n,50

do
m=pin(gp9)
pause 2000
print n,m
'inc n,10000
loop


OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP14,GP15
OPTION AUTORUN ON
OPTION COLOURCODE ON
OPTION DISPLAY 40, 100
OPTION LCDPANEL ILI9341, LANDSCAPE,GP20,GP21,GP22
OPTION SDCARD GP17
OPTION AUDIO GP6,GP7, ON PWM CHANNEL 3
OPTION RTC AUTO ENABLE



another run of the same program
>
Time taken: 1752mS
RUN
100000 0

100000 99000
100000 99000
100000 99000
100000 99000
100000 99000
100000 99000
100000 99000
100000 99000
100000 99000


Volhout
Edited 2022-12-07 05:40 by Volhout