Comment #3 on issue 157 by robhamerling: Loading OSCCAL with the value
provided by the manufacturer
http://code.google.com/p/jallib/issues/detail?id=157
Thanks Patrick for your help solving this issue.
I think the different solutions don't depend on memory size but on the
contents of the calibration word (last word of code memory). This can be a
MOVLW or a RETLW instruction. In case of a RETLW instruction the
calibration word must be called (something like your second solution), and
this can be done any time.
In case the calibration word contains a MOVLW the first instruction of the
program (at address 0000) must be a MOVWF (to OSCCAL).
The setting of OSCCAL could be in the user program, but it could also be
implemented in the device file (advantage: always a calibrated internal
oscillator).
It could even become a compiler option, comparable to the bootloader
option. There won't be a conflict with the bootloader option, since these
PICs with OSCCAL don't support bootloaders.
Of the PICs for which we currently have device files the following have an
OSCCAL register:
10f200 10f202 10f204 10f206 10f220 10f222 12f508 12f509 12f510 12f519
12f529t39a 12f529t48a 12f629 12f675 16f505 16f506 16f526 16f527 16f630
16f676
When we decide to put the calibration in the device files we must be aware
that there may appear new device files for PICs with OSCCAL.
--
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.