AN001 questionable
Harley
Posts: 997
I'm questioning AN001, page 18 PASM code.
Shouldn't the ':loop' label be two lines above (at the 'mov cnt_, cnt' lline? (Is there no reason to reload 'cnt' value prior to the following 'waitcnt' events?)
Thanks for all comments on this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
Shouldn't the ':loop' label be two lines above (at the 'mov cnt_, cnt' lline? (Is there no reason to reload 'cnt' value prior to the following 'waitcnt' events?)
DAT org entry mov ctra, ctra_ 'establish mode and start counter mov frqa, #1 'increment for each edge seen mov cnt_, cnt 'setup time delay add cnt_, cntadd :loop waitcnt cnt_, cntadd 'wait for next sample mov new, phsa 'record new count mov temp, new 'make second copy sub new, old 'get delta mov old, temp 'set next delta's base wrlong new, par jmp #:loop ctra_ long %01010 << 26 + 7 'mode + APIN cntadd long 80_000_000 'wait 1 second, answer in Hz cnt_ res 1 'next count to wait on new res 1 old res 1 temp res 1
Thanks for all comments on this.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Harley Shanko
Comments
-Phil