David Novak wrote: > On 6/10/2011 5:39 PM, Sergey Dryga wrote: > =20 >> David Novak dajac.com> writes: >> >> =20 >>> I'm using the ICD2 and MPLAB with a PIC18F4523. I was seeing odd >>> behavior while single-stepping, so I created the following, very simple >>> application. >>> >>> void main() >>> { >>> TRISB =3D0b11111101; >>> >>> while( 1 ) >>> { =20 >>> RB1 =3DRC1; >>> } >>> } >>> >>> The only other thing in the file are the Hitech macros to setup the >>> configuration registers. >>> >>> If I let the program run, RB1 follows RC1 as expected. However, if I >>> single step while watching the PORTC register, the debugger only update= s >>> the register value when I execute the RB1 =3DRC1 line. >>> >>> =20 >> I have not used ICD2 in a while, but from what you describe it behaves a= s >> expected. need to execute RB1 =3D RC1 to update registers, they are not= linked in >> any other way.=20 >> >> Sergey Dryga >> http://beaglerobotics.com >> >> =20 > > But shouldn't the refresh feature force an update without executing > anything? It's not much of a debugger if you can't get the correct > values for the registers that you are inspecting. > =20 So, you are saying that it is not updating RC1, even though the voltage=20 on that pin has changed? Of course it won't update RB1 until the line=20 runs, but it should update RC1. (I have never used that debugger) I did notice that you have RB1 as an output, and that there is no=20 TRISC. Is that right? Kerry --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .