-2
\$\begingroup\$

I'm using a Microchip ICD 3 to connect to my PIC chip and read the memory.

When I connect the ICD 3 as a "programmer" and then select "read" (from the "programmer" menu) and then "View-->"File Registers", all the file registers are zero.

However, when I connect the ICD 3 as a "debugger" and then select "read" (from the "debugger" menu) and then "View-->"File Registers", all the file registers are not zero, many of them are populated with non-zero values.

Does anyone know why there is this difference?

\$\endgroup\$
  • 1
    \$\begingroup\$ Can you comment the downvotes please. What gives? I feel like this is an appropriate and specific enough question for this forum... No? \$\endgroup\$ – hft Apr 14 '15 at 18:54
  • \$\begingroup\$ It shows you didn't read the manual or even think about what must be going on. \$\endgroup\$ – Olin Lathrop Apr 14 '15 at 19:28
  • \$\begingroup\$ While it's nice that we as a community encourage people to show work and learn themselves, I think it's assumptious to know OP should know something others take for granted. OP might not even know what binary or hexidecimal numbers are and how to interpret them. I think OP would be much more encouraged if someone posted a link to a basic guide. \$\endgroup\$ – lm317 Apr 14 '15 at 21:53
  • \$\begingroup\$ @lm317: MPLAB already comes with a basic guide. The problem appears to be lack of reading it. \$\endgroup\$ – Olin Lathrop Apr 14 '15 at 21:58
  • \$\begingroup\$ @Olin Lanthrop: I did read the manual, bro. It does not address my question, not does your answer. \$\endgroup\$ – hft Apr 14 '15 at 22:08
2
\$\begingroup\$

View File Registers is a debugging function, so it should not be surprising it only works when in debugging mode.

\$\endgroup\$
  • \$\begingroup\$ I see a "File Registers" as an option in the "View" menu regardless of whether I've connected a "programmer" or a "debugger". Do you think that when I connect the debugger the File Registers values I read are actually coming from the RAM on the chip? I'm just trying to understand why, for example for one register, the programmer would read "0x00" and the debugger would read "0x1a". I think you are telling me it's just that the programmer doesn't actually read anything from the registers when I tell it to "read". \$\endgroup\$ – hft Apr 14 '15 at 18:54
  • \$\begingroup\$ I don't recall what the PIC programming interface looks like but yes that is what Olin is saying. Unfortunately it's bad user interface design to show you that window when it doesn't serve a purpose. \$\endgroup\$ – lm317 Apr 14 '15 at 21:55
  • \$\begingroup\$ Also, what are you using the file register window for? Do you know about the Watch window? I think I've used the file register window maybe twice in well over 100 PIC projects, but the watch window every time. \$\endgroup\$ – Olin Lathrop Apr 15 '15 at 13:02
  • \$\begingroup\$ I'll try the watch window. But, really, I'm not trying to actually debug any code; I'm only trying to read the values of all the file register on a chip running pre-existing code. \$\endgroup\$ – hft Apr 15 '15 at 17:31
  • \$\begingroup\$ @hft: But that's a debugging feature, not a normal programming feature. Programming deals with the non-volatile memory in the chip, not the RAM. On some PICs, there is no way to access RAM from the programming interface. \$\endgroup\$ – Olin Lathrop Apr 15 '15 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.