Hi guys, i have a circuit which generates pulses and i need to calculate the frequency of the pulse. So far i have been able to count the number of pulses but i dont know how to convert it to frequency PLEASE HELP.
Below is the code to count the pulses
init: pause 500 ; wait for display to initialise
main:
count C.1, 1000, w1 ; count pulses in 1secs (at 4MHz)
serout B.6,N2400,(254,128) ; move to start of first line
serout B.6,N2400,(#w1,13,10, "rpm")
goto main ; loop back to start
Below is the code to count the pulses
init: pause 500 ; wait for display to initialise
main:
count C.1, 1000, w1 ; count pulses in 1secs (at 4MHz)
serout B.6,N2400,(254,128) ; move to start of first line
serout B.6,N2400,(#w1,13,10, "rpm")
goto main ; loop back to start