CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

16f684 osccal value reading problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
deepakomanna



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

16f684 osccal value reading problem
PostPosted: Mon Sep 17, 2007 1:16 am     Reply with quote

Dear Sir,
here i am using 16f684, MPLAB 7.5 Ver. & CCS PCM C Compiler, Version 3.249, 34534.
here i want to read osccal value after programming the ic (code protect off)
but it is showing 0xff data at 2008 (osccal location) plz tell me how to read osccal value.
Also i checked my .lst file in this at the start up code it not adding the instruction to call the
osccal value.
Quote:
But when i used 12f629 the compiler adding these instruction at the start up,
....
....
....
....
003B: RETFIE
003C: CALL 3FF
003D: BSF 03.5
003E: MOVWF 10
003F: MOVLW 00
0040: MOVWF 0A
0041: GOTO 218

Plz tell me how can add osccal value by using 16f684.
_________________
Thank You,
With Best Regards,
Deepak.
Ttelmah
Guest







PostPosted: Mon Sep 17, 2007 2:16 am     Reply with quote

The 16F684, does not have an 'OSCCAL' value stored in the ROM.
On these chips, the oscillator is factory programmed to the specified frequency, and you can then use the 'OSCTUNE' register, to modify this by up to +/-12%. The factory calibration is independant of this register, and the chip doesn't have to load a value on bootup. Hence the compiler does not add any code for this, and there is no value for you to read.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group