Comment #9 on issue 157 by robhamerling: Loading OSCCAL with the value
provided by the manufacturer
http://code.google.com/p/jallib/issues/detail?id=157
It appears that the current compiler (2.4p) does not handle the required
bank selection properly (in this case), an update is underway. But when new
device files would be committed now with code to load OSCCAL these files
should work with the current unchanged compiler.
Therefore I suggest to use the following code for 12-bits PICs with 4 banks:
1 > var volatile byte __osccal at 0x5
2 > var volatile byte __fsr at 0x4
3 > asm bcf __fsr,5 -- select bank 0
4 > asm bcf __fsr,6 -- " "
5 > asm movwf __osccal -- calibrate oscillator
With 2 banks line 4 is not needed and with 1 bank lines 2,3 and 4 are not
needed, and these lines won't be in the device files of the appropriate
PICs.
For the 14-bits core we should not have OSCCAL loading in the device files
see comment #7. The documentation of the device files will explain
everything.
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.