Rob, On Thu, 21 Apr 2011 17:55:30 +0200 Rob Hamerling <[email protected]> wrote:
> > True! And it has been discussed before here (or in Jallist). > > There is a section in 'devicefiles.html' about how to use the > calibration word in high memory (of some PICs) and the danger when > that word is not a RETLW instruction (anymore). > I don't remember when I last updated this OSCCAL section, so you may > have to download that file to get the latest state. > Maybe this section needs further instructions? The sequence for the 10fxxx devices differs, which would be worth documenting. The instruction at 0xff or 0x1ff has to be valid, since it is executed after reset on the 10fxxx family. PicKit 2 has also an option to regenerate the calibration value, if it gets lost somehow. > > > This issue affects all 10fxxx devices. In my opinion, the include > > files should be changed accordingly. > > No! By design a Jallib device file 'does' nothing (does not change > any register by itself), the user program may suppose it gets the PIC > in the state as after a reset. But the device file generates code, via the initialization of the shadow registers with default values, which overwrites w - this is the issue. As mentioned, the setting of OSCCAL on the 10fxxx devices has to be the first thing, before any user- or compiler-generated code overwrites the value. Greetings, Karin -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
