Hi Kiste,
On 2011/04/22 08:35, Oliver Seitz wrote:
The datasheet states that on startup, the default value of the w
register is the calibration value. So you could argue that, by
modifying the w register, the definition file violates the rule not
to change defaults.
Agreed (one of the exceptions!).
The compiler supports bootloaders. That is no job for a compiler,
that is user program. But, for technical reasons, it is easy for the
compiler to handle the bootloader code, while it is hard or
impossible to do that in a user program. The same, IMO, applies to
setting the OSCCAL value on PIC10xx devices. I wouldn't bet on the
compiler never to produce code before the first user program
statement. The compiler decides in which order machine statements are
executed, and setting OSCCAL must be the first thing done. This is
why I favour that the compiler should handle this.
Good point that only the compiler has control over the sequence of
statements! A compiler option (e.g. -osccal), comparable to the
bootloader options looks to me like a good solution.
There won't be a conflict between the two since all PICs with OSCCAL
register have no self-write capability, thus won't have a bootloader.
So -osccal option and bootloader options will be mutually exclusive.
Only a few flash PICs have an OSCCAL register (I counted 18, of which
six 10Fs). When the use specifies the -osccal option and the PIC has no
OSCCAL register an error message will inform the user of his fault.
Regards, Rob.
--
R. Hamerling, Netherlands --- http://www.robh.nl
--
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.