Problems with internal oscillator [PIC12F675]

Status
Not open for further replies.

joseflor

New Member
See code below for this thread...

When I simulate with MPLAM SIM the OSCCAL gets value 0 (zero) You can see that on the image attached. If you look the code, I have defined the calibration and use a RETLW 0xFC.

Also when I simulate with Proteus I get this message: "[PIC12 MEMORY] PC=0c000B. Effect of writing OSCCAL register not modelled"

Did I write the wrong code? What would be the problem with that?

Thanks
PS. Proteus file is attached in a zip file, if you need to see it.


 

Attachments

  • int_osc.JPG
    173.1 KB · Views: 295
  • telefonica.zip
    14.7 KB · Views: 151
MPLAB sim and proteus don't model the effect OSCCAL has on the operation. It will therefore work differently when physically implemented.
 
Thanks dougy83,
Besides proteus, I have MPLAM SIM problems, if you see the image you will see the OSCCAL with value 0x00
 
I had a problem with a lookup table (bunch of retlw) that extended to the end of the memory (say 0x3ff) in MPLAB SIM - it didn't return but instead the PC rolled over to 0 and started the program again. If the retlw 0xFC is in your .hex file, I'd just ignore the sim problems.
 
hi jose,
The OSCCAL load operation works ok in the Oshonsoft sim.

Look at this image, after stepping thru the OSCCAL statement.

 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…