Hi all,
I want to know how to use internal oscilator of PIC16F628A,the 4Mhz crystal oscilator?Which comand should I use to turn on the internal oscilator,I use PBP and MCS 2.60!
Thanks
Hi all,
I want to know how to use internal oscilator of PIC16F628A,the 4Mhz crystal oscilator?Which comand should I use to turn on the internal oscilator,I use PBP and MCS 2.60!
Thanks
I used something like this :
Code:@ DEVICE pic16F628A, INTRC_OSC, WDT_OFF, PWRT_OFF, BOD_OFF, MCLR_ON, LVP_OFF DEFINE OSC 4
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
how about the PCON register?Can I write PCON = $xx and to turn on the internal oscilator?
I don't think so, you want to specify the right one at the beginning. Some 18F allow to switch over the internal to external on the fly (or in case of a external clock fail), but I'm pretty confident you can't do it with grand'pa 16f628.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I'm stuck on a very similar (i think!) problem;
Using a PIC16F777 for the first time, which has an internal Osc. I'd like to get it running at 4MHz, but using fratello's DEFINE code modified to:
....as does not work. the 4MHz, seems much more like 4Hz.Code:@ DEVICE pic16F777, INTRC_OSC DEFINE OSC 4
Any help?! thanx!
Open the datasheet under OSCCON register, and see the default setting., from there change it.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thank you Steve - got it working... but i do not understand all the bits in that register;
IOFS: INTOSC Frequency Stable bit ?
SCS<1:0>: Oscillator Mode Select bits ?
Bookmarks