MUXC for debugging purposes, trying but not working
peterz
Posts: 59
I have tried to generate a continuous·pulse of 1us on PIN0.
For this I have tried to use MUXC, as follows:
Test0
······················· ror···· mask_bits,#1 wc
······················· muxc··· outa,debug_mask
······················· mov t1, bitticks
······················· add t1, cnt
:WaitTick
······················· cmps t1,cnt wc
······················· if_nc jmp #:WaitTick
······················· jmp #Test0
debug_mask····· LONG %0000_0000_0000_0000_0000_0000_0000_0001
mask_bits········ LONG %1010_1010_1010_1010_1010_1010_1010_1010
bitticks············ LONG 80
Note: in my Spin code section I set PIN0 as OUTPUT.
However I dont get any pulse at all! I suppose my code is wrong, is it?
·
For this I have tried to use MUXC, as follows:
Test0
······················· ror···· mask_bits,#1 wc
······················· muxc··· outa,debug_mask
······················· mov t1, bitticks
······················· add t1, cnt
:WaitTick
······················· cmps t1,cnt wc
······················· if_nc jmp #:WaitTick
······················· jmp #Test0
debug_mask····· LONG %0000_0000_0000_0000_0000_0000_0000_0001
mask_bits········ LONG %1010_1010_1010_1010_1010_1010_1010_1010
bitticks············ LONG 80
Note: in my Spin code section I set PIN0 as OUTPUT.
However I dont get any pulse at all! I suppose my code is wrong, is it?
·
Comments