PDA

View Full Version : OSC Calibration byte in wrong location?



ehoskins
- 4th October 2006, 00:09
PIC12F629 (IK word memory architecture)
Manual states place calibration byte for oscillator at address 3FFh.
After compiling the cal byte ends up at 7FFh in the hex file.
Why? Third line byte value 94h is at addr: 07FFh
All the addr. references is the file point to the word address so why is the calibration byte different? If I place addr 3FFh in PIC Basic shouldn't it be at 3FFh after compiling and assembling?

END OF HEX FILE

:10018000051083120F30A300A03002203028630036
:02019000C7287E
:0207FE00943431
:02400E00D43F9D
:00000001FF

Bruce
- 4th October 2006, 16:17
It is placing this at 03ff.

:0207FE00943431

The address in the .hex file is doubled because this format only supports
8-bits. To find the real address, divide the value by 2.

07FE / 2 = 03FF.

ehoskins
- 4th October 2006, 19:44
Thanks Bruce - that makes perfect sense!