Sorry if I'm warming up old arguments, but I have not been here during that 
discussion.

> 1. the user must know there is an OSCCAL value stored somewhere in the memory 
> and the compiler has nothing to do with, else everything is written in the 
> micro definition file may be useless

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.

> 2. first time the user is programming the micro, he must save the OSCCAL 
> value by his own wish and store somewhere for further use, none of the 
> programmers are doing this automatically (as far I know) except maybe 
> generating a warning message about the existence of that value
> 3. within the compiler or without it, the stored value can be put again in 
> it's place and this is so simple that no matters how is done

So the user should replace the MOVLW instruction by a RETLW instruction? Or 
move the MOVLW to some other place, where it can be easily executed? This, IMO, 
is urging the user to change default settings. 

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.

Greets,
Kiste

-- 
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.

Reply via email to