03-13-2012 12:48 PM - edited 03-13-2012 12:50 PM
Please, tell me! Why my code output data from register sC instead sA?
LOAD sA, 01
OUTPUT sA, 00
LOAD sC, ff
sub sC, 01
jump nz, delay
Solved! Go to Solution.
03-13-2012 08:17 PM
How did you come to the conclusion that the data is coming from sC?
Is the data always zero?
What's the value of sA when this happens? From what I can see, it should
go to 0 after 8 passes through the loop.
03-14-2012 05:36 AM
So you're saying the LED's are changing even when you are not executing an OUTPUT
That sounds like you don't have the required register between the output bus and the LED's.
The out_port (write data) and port_id (address) are only valid on the cycle when the write_strobe
(write enable) is active. You need a register that only updates from the out_port on cycles
when port_id is zero and write_strobe is one.