Barry Gershenfeld gmail.com> writes: > > Is your debugger MPLAB? I was just reminded that CCS has their own debugger > also. In MPLAB, if something has been optimized away, you won't be able to > set a breakpoint on it. Also, you can View the File Registers and see the > variable there, and you can View the Program Memory window and watch it > execute the instructions machine code. And a CCS thing, you can generate a > .lst file and see what it generated for each line of code. > > >From your explanation, though, it sounds like somehow it is hardware. We > got batch of boards here, where the 4 MHz crystal was 40 MHz instead. That > can make lights look like they are not blinking; it can also cause > Read-Modify-Write problems that don't exist at the normal speed. > > Oh, one more thing about the debugger. I relies heavily on the generated > COFF file. When in doubt, I recompile just to be sure everything is in > sync. Thanks Barry, I use CCS-ICD40 debugger/programmer and can step through and see variables in the "watch" tab. The problem is that I have 2 boards and PICs behave differently with the same firmware. That is what bugs me. The internal clock runs at 8MHz on both chips, and CCP2/PWM frequency is the same. Is it possible that the PIC got zapped by static and shows this behavior? -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist