PDA

View Full Version : what does OSCCON = $60 mean exactly?



peterdeco1
- 19th December 2005, 11:35
I've been using 16F818 parts for a while with it's internal 4MHZ oscillator with no problems. The PBP manual lists OSCCON values for different speeds. OSCCON = $60 sets it to 4MHZ. But what does $60 mean? The datasheet shows the OSCCON register bits with, I think, bits 6 & 5 as 1, rest 0 @ 4MHZ. How does $60 enter the equation? Thank you. - Peter

arniepj
- 19th December 2005, 11:46
$60 is a hex representation.If you have Windows Xp,start the calculator application,set for scientific view,select hex and enter 60,then select bin.

peterdeco1
- 20th December 2005, 09:40
Thank you. It all makes sense to me now. $60 = 96. I replaced OSCCON = $60 with OSCCON = 96 and it compiled without errors. I haven't tried it yet but it should work the same right?