Joined: 08 Sep 2003 Posts: 105 Location: New Castle, DE
16F916 OSCCON Reg?
Posted: Mon Oct 08, 2007 8:43 am
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
Posted: Mon Oct 08, 2007 8:53 am
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.
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