Searching \ for 'CCS Grouses about OSCCAL' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=ccs+grouses+about
Search entire site for: 'CCS Grouses about OSCCAL'.

Truncated match.
PICList Thread
'CCS Grouses about OSCCAL'
1999\04\26@105214 by Lawrence Lile

flavicon
face
I'm using a PIC part with an internal oscillator, and needing to calibrate
the internal oscillator with the factory programmed value.  As we all know,
in regular assembler you place

   org 0
   movwf OSCCAL

At the beginning of your code.

But ol' CCS Chokes on:

#DEFINE OSCCAL 5
#ASM
   org 0               <<<<<<<<<<ERROR
   movwf OSCCAL
#ENDASM

as well as

#DEFINE OSCCAL 5
#ASM
   movwf OSCCAL        <<<<<<<<<<<ERROR
#ENDASM

Any ideas?


'CCS Grouses about OSCCAL'
1999\05\04@121619 by John Payson
flavicon
face
|But ol' CCS Chokes on:

|#DEFINE OSCCAL 5
|#ASM
|    org 0               <<<<<<<<<<ERROR
|    movwf OSCCAL
|#ENDASM

Does CCS not by default place a MOVWF there for you?  What does it do as
its startup code prior to the first line of main()?

|as well as

|#DEFINE OSCCAL 5
|#ASM
|    movwf OSCCAL        <<<<<<<<<<<ERROR
|#ENDASM

|Any ideas?

#byte OSCCAL=5

And then at the start of main(), if W is intact (probably should be, but
check startup code), do:

       movwf OSCCAL

and you should be fine.

1999\05\04@184145 by Ian Cull

picon face
> Does CCS not by default place a MOVWF there for you?  What does it do as
>  its startup code prior to the first line of main()?
>
The (current?) version I have adds the instruction for the 12C508/9 but not
for the 16C505 ... so far more than two weeks since I contacted CCS, and no
fix as far as I can tell.

Ian C.

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...