What happen if you change your High & red definition with
Code:Red var LATB.5 Green var LATB.4
What happen if you change your High & red definition with
Code:Red var LATB.5 Green var LATB.4
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
...magically all my problems seem to go away now. I've never needed to use LATX before. Maybe you can educate me a little on why I needed to this time. The datasheet seems to imply that writing to the latch is just a more direct way of writing to the port, but maybe I'm not catching the nuance.
Thanks
David
You should also do it with PIC18 and with all PIC having LATx register. This is to avoid the R-M-W issue. The datasheet explain it, like you said. For further details you may want to have a look at this document
http://www.cornerstonerobotics.org/c...mw_problem.pdf
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks