StudentSA Member May 24, 2011 #1 Good Day, I am using a PIC16F690 Microprocessor, PICKit2 and MPLab IDE to write assembly code. I would like to find out if the order in which you set your registers is important? Especially the IO port configuration registers. Eg, would it make a difference if I was to set the ANSEL then TRIS as apposed to TRIS then ANSEL? Regards, StudentSA
Good Day, I am using a PIC16F690 Microprocessor, PICKit2 and MPLab IDE to write assembly code. I would like to find out if the order in which you set your registers is important? Especially the IO port configuration registers. Eg, would it make a difference if I was to set the ANSEL then TRIS as apposed to TRIS then ANSEL? Regards, StudentSA
P Pommie Well-Known Member Most Helpful Member May 24, 2011 #2 It depends what you have connected to the ports. The safe order is ANSEL, PORT and then TRIS. That order ensures you don't get a spurious high or low on the port. Mike.
It depends what you have connected to the ports. The safe order is ANSEL, PORT and then TRIS. That order ensures you don't get a spurious high or low on the port. Mike.