Qacer, The internal 4 Mhz. oscillator does not use any external capacitor or resistor. The mode you speak of is RCIO or RC. These modes require the external components to for the oscillator. Check the data sheet....
Dave Purola,
N8NTA
Qacer, The internal 4 Mhz. oscillator does not use any external capacitor or resistor. The mode you speak of is RCIO or RC. These modes require the external components to for the oscillator. Check the data sheet....
Dave Purola,
N8NTA
Thanks again, Dave! I'm still immersing myself with the datasheet and PIC manual for midrange microcontrollers.
By the way, I have another question. I was reading the PIC12F675 data sheet and it states that the following code will calibrate the internal PIC oscillator:
bsf STATUS, RP0 ;Bank 1
call 3FFh ;Get the cal value
movwf OSCCAL ;Calibrate
bcf STATUS, RP0 ;Bank 0
Am I doing the right thing using my BASIC coding?
changed 12F675.inc
__config _INTRC_OSC_CLKOUT & _WDT_ON & _MCLRE_ON & _CP_OFF
My next question is: how do I implement the calibration code in BASIC?
Is this right?
OSCVAL equ 3FFh ; assign 3FFh to OSCVAL
call OSCVAL
OSCCAL = OSCVAL ; ??
Thanks!
just a tip
DEFINE OSCCAL_1K 1
DEFINE OSCCAL_2K 1
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Originally Posted by mister_e
Thanks, mister_e! I knew I saw this somewhere. I started flipping through my manual and found it on page 12. One line is definitely much shorter than a couple.![]()
Bookmarks