kk serious question, no jokes.
how do you find elapsed time? either with timers or RTC?
thanks!!
Tags:
the 'proper' way is the timer/counter that's built into the PIC
I'm sure you can hack together a way to do it with RTC though if you really wanted to
probably beats no time at all, do you just subtract minutes and seconds? or something?
I reset the RTC at the start of my test, which starts it counting from zero, and then I just read the time at the end of the test
hats genius. so basically it's under like 59sec
Well, I have a minutes display, in case it goes over
I did it with subtraction but with pic18 I can multiply
Endtenmin - startten min
Mult by ten
Add end min
Subtract start min
Mult by sixty
Store in memory
Clr w, movf end ten sec
Minus start ten sec
Multiply by 10
Plus endsec
Minus start sec
You could probably write a loop to add rather than multiply (2 x 10 is adding 10 2 times)
© 2024 Created by PML. Powered by