4MHz to 8MHz and pulsin

Vmax

Member
If I change the Picaxe clock speed from 4MHz to 8Mhz and Pulsin is calibrated to 4MHz, should I devide calibrated pulsin results by 2?

:confused:
 

MartinM57

Moderator
I would divide by 2 - the internal clock is counting twice as fast, so the pulsin value will be twice as big as it would be at the lower speed
 

srnet

Senior Member
I would not think of it as being 'calibrated at 4Mhz", but that at 4Mhz it counts in 10uS units, 5uS units at 8Mhz etc.
 

SAborn

Senior Member
You could just change frequency for the pulsin back to 4meg and then back to 8meg after the reading, i do this a lot in the average programs.

Example..........

setfreq m4

Read the pulsin here

setfreq m8

carry on with the rest of the program.
 
Top