As they say, there are no dumb questions.
Take a look at FIGURE 4-6 in the data sheet. The internal OSC is always running, the WDT works from it. The OSCCON is not ignored when HS is selected, just the internal OSC is not used as the main clock. The OSCCON bits do not matter when anything but the internal OSC is used.when i changed the DEFINE from
INTRC_OSC_NOCLKOUT
to
HS_OSC
it got me wondering what exactly happens with the OSCCON register ?
is it now ignored?
i looked at the data sheet and perhaps missed it but i could not see where it says anything about this the operations of the internal oscillator when an external xtal is used
(i did determine by other means that the chip is running at 20MHz)
is the int osc shut down or gated out entirely ?
do any of the OSCCON bits now matter ?
HS is the correct selection with resonators.also with a 20MHz resonator (w/ internal caps) when i probe either pin with a scope it kills the oscillation, this is not hugely surprising but it got me wondering about whether for a resonator i should be using XT_OSC rather than HS_OSC
as far as i know the HS is not for speed per se but rather for a drive level more appropriate for a higher freq xtal
EC is for when an external clock source is used. Look at section 4.3 in the data sheet.and lastly in the M16F81X.INC file i notice
EC_OSC
what is that ? i don't recall that one
thanks
Bookmarks