Todd Peterson wrote: >Thanks to all who answered my 12C508 JW question. There have been a >large >number of posts concerning the matter, so let me summarize the answer: >you >must read the calibration constant out of the last location (0x01ff in >the >12C508) and write it down somewhere PRIOR to the first UV erase cycle >or you >will loose it. > > >My problem seems to be different; In the last location I have 'movlw >0xcd', >and in the first location I have 'movwf 0x5'. As the 12c508 has a 5x >core, >it should vector on power-up to the last loaction, which will place >the >calibration constant in W. Then the PC should roll over and write >this >value into OSCCAL because of the instruction in the first byte of >memory. >An increment (or decrament) of the calibration constant by one is >supposed >to change the period by 4ns, according to the specs. However, I have >tried >many different calibration values (FF, E0, CD), and none of them seem >to >change the period of a pin I am toggling on an output port and >watching with >a scope. A one ms signal is .8 ms long. > >I am using a CCS compiler, and am beginning to think the problem might >lie >within its delay routine, as I cannot see what else might be wrong. >However, the compiler's delay routines have worked well before, and it >is >odd that changing the cal. constant wouldn't change the pin toggle >rate. > >Suggestions, anyone? > > >Thanks to all who responded previously; this list truly is effective! > > >-Todd Peterson > Just something to think about: A scope is only about 3% accurate, maybe less depening on model. That's about + or - 4.17us or 240khz, if it's in calibration. When was the scope last calibrated? It might be better to use a frequency counter. And again, check the calibration. Carl Watley WB2ZSG