Here is a little know fact (not really) – On the PIC10F322 – If you are using the internal oscillator for the system clock – following any Reset, the IRCF<2:0> bits of the OSCCON register are set to ‘110’ and the frequency selection is set to 8 MHz.
That means, until you change the OSCCON Register INTOSC (FOSC) Frequency Select bits in software – the device is running at 8Mhz.
OSCCON: OSCILLATOR CONTROL REGISTER
bit 6-4 IRCF<2:0>: INTOSC (FOSC) Frequency Select bits
111 = 16 MHz
110 = 8 MHz (default value)
101 = 4 MHz
100 = 2 MHz
011 = 1 MHz
010 = 500 kHz
001 = 250 kHz
000 = 31 kHz (LFINTOSC)
The easiest way to change the system clock speed is by…
OSCCONbits.IRCF = 0bxxx (xxx) is the bit selection from the above list.
Say, you want to set it to the full 16Mhz.
OSCCONbits.IRCF = 0b111;
Maybe you want to go – 1 Mhz..
OSCCONbits.IRCF = 0b101;
Have a Project or Idea!?
I am Available for Freelance Projects
My skills are always primed and ready for new opportunities to be put to work, and I am ever on the lookout to connect with individuals who share a similar mindset.
If you’re intrigued and wish to collaborate, connect, or simply indulge in a stimulating conversation, don’t hesitate! Drop me an email and let’s begin our journey. I eagerly anticipate our interaction!