PDA

View Full Version : intrc question



garryp4
- 9th February 2007, 07:15
I have a question about the intrc options with the meProg setup. The internal
osc has 2 options, INTRC and INTRC clockout. The help offers no information
on what the options do. The 18F2520 has an internal osc and a PLL to do a 4x.
The data sheet also says the internal osc is 8mhz and with a 4x it is 32mhz.
Math even I can do. So, if I use the INTRC for 8mhz and then set the PLLEN,
so I need to DEFINE OSC 8, or DEFINE OSC 32.

Thanks in advance.

Garry

Melanie
- 9th February 2007, 08:17
Oscillator options like INTRC and INTRC clockout are described in the PICs Datasheet as it is a function of the individual PICs hardware. If it's in the Datasheet, don't expect to find it in the PICBasic documentation which is where a lot of people seem to take issue with this.

The DEFINE OSC setting is for the frequency your PIC is going to be executing at... eg 10MHz Xtal with PLLx4 means you're running your program at 40MHz and that is what PICBasic needs to know. So in that example it's DEFINE OSC 40.