Jitter between two counters
Hey guys, using this code, pretty much copied from AN001 :
I get jitter between the two counters:
http://youtu.be/p_kTFzpMRdk
Is there a way to use one counter as a reference signal so I can use my scope to experiment with pulse width and phase on the counters? Any advice is greatly appreciated.
-ADZ
PUB NCO_single_ended_mode | i
' mode PLL BPIN APIN
repeat
ctra := %00100_000 << 23 + 8 << 9 + 20 'Establish mode and APIN (BPIN is ignored)
frqa := $80_0000 'Set FRQA so PHSA[31] toggles every clock
ctrb := %00100_000 << 23 + 8 << 9 + 19 'Establish mode and APIN (BPIN is ignored)
frqb := $80_0000 'Set FRQA so PHSA[31] toggles every clock
dira[19] := 1 'Set APIN to output
dira[20] := 1
I get jitter between the two counters:
http://youtu.be/p_kTFzpMRdk
Is there a way to use one counter as a reference signal so I can use my scope to experiment with pulse width and phase on the counters? Any advice is greatly appreciated.
-ADZ

Comments
-ADZ
test1.spin
Also, you should only setup the counters once. Doing it in a repeat loop is wasted effort and may affect current operation.
-ADZ
test1.spin