I had some routines that had come up from the 16f days and had such I/O instructions as bsf/bcf PORTx and when using them in a couple of 18f series, as they seemed to work OK I didn't get around to changing them to bsf LATx etc.
I recently went from a 18f2221 to a 18f23k22 and no I/O seemed to be working.
I attached a led strip to a port and did a bsf PORTx, 0 to 7, stepped in turn
The port LED would switch on, but any subsequent bsf PORTx would turn the bit on at the same time the previous one would turn off resulting in the last one only being on.
The bsf LATx cured the problem with all being on at the last step.
I just wondered what the difference would be between two very close chips?
Max.
I recently went from a 18f2221 to a 18f23k22 and no I/O seemed to be working.
I attached a led strip to a port and did a bsf PORTx, 0 to 7, stepped in turn
The port LED would switch on, but any subsequent bsf PORTx would turn the bit on at the same time the previous one would turn off resulting in the last one only being on.
The bsf LATx cured the problem with all being on at the last step.
I just wondered what the difference would be between two very close chips?
Max.