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

16F916 OSCCON Reg?

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



Joined: 08 Sep 2003
Posts: 105
Location: New Castle, DE

View user's profile Send private message

16F916 OSCCON Reg?
PostPosted: Mon Oct 08, 2007 8:43 am     Reply with quote

Hello All

I have a 16F916 and having some issues with timing.
This is a chip that I programmed at a min of 1 year ago.
So I have the code but I'm trying to check that the OSCCON got set correct.
I have down load the code from the 916 to a hex file.
But I'm not 100% that I'm reading the hex file correct.
I'm looking at address 0x8F this is the line from the file.

:1000800074342034433461346C340A340D34003415

The way I'm reading this is that 0x8F = 0x34
Is this small end first?
So 0x8F would be 0x43 or 0100 0011?
This does not make sense the default for 0x8F is ???? ?110.
What is what I think that it is set to.

Thank all in advances
Tom
Ttelmah
Guest







PostPosted: Mon Oct 08, 2007 8:53 am     Reply with quote

You are looking in the wrong place.
The OSCON register itself, does not appear in the hex file. The hex file represents the ROM, the OSCON register is in RAM.
On older chips, what did appear in the hex file, was a single extra instruction in the last word of program memory, to return the value that should be loaded into the OSCCON register. However on latter chips like yours, this is not done.

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