Paul Borgmeier
Salt Lake City, UT
USA
__________________
These are the settings I use everyday:Fuses ending with "ON" or "OFF" can be set vice-versa.Code:' Oscillator ' EXTRC_OSC_CLKOUT, EXTRC_OSC_NOCLKOUT, EXTRC_OSC, INTRC_OSC_CLKOUT ' INTRC_OSC_NOCLKOUT, INTRC_OSC, EXTCLK_OSC, EC_OSC, HS_OSC, XT_OSC, LP_OSC @ DEVICE PIC16F88, INTRC_OSC_NOCLKOUT ' Program Code Protection ' Set to PROTECT_OFF for Development Copy ' Set to PROTECT_ON for Release Copy @ DEVICE PIC16F88, PROTECT_OFF ' Watchdog Timer @ DEVICE PIC16F88, WDT_ON ' Power-On Timer @ DEVICE PIC16F88, PWRT_ON ' Master Clear Options (Internal) @ DEVICE PIC16F88, MCLR_ON ' Brown-Out Detect @ DEVICE PIC16F88, BOD_ON ' Low-Voltage Programming ' If set to ON, RB3 is no longer available!!! see d.-s. @ DEVICE PIC16F88, LVP_OFF ' Data Memory Code Protect ' Set to CPD_OFF for Development Copy ' Set to CPD_ON for Release Copy @ DEVICE PIC16F88, CPD_OFF ' DEBUGGER @ DEVICE PIC16F88, DEBUG_OFF ' CCPM1 choice: ' Set OFF for function on RB0 (default) ' Set ON for function on RB3 @ DEVICE PIC16F88, CCPMX_OFF
Roger
I use this on my 'F88 program and it works without any problem.
OSCCON = $60 'set int osc to 4mhz
ANSEL = 0 'ANALOG INPUTS ALL DIGITAL
ADCON0 = 0 'AD MODULE OFF
CMCON = 7 'COMPARATORS OFF
@ DEVICE MCLR_OFF, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON
pic works fine with external osc
still having issues with internal pic manual seem to indicate it has 2 internal osc commands and three osc speed with 8 the defualt but does not list the
commands
1. LP Low-Power Crystal
2. XT Crystal/Resonator
3. HS High-Speed Crystal/Resonator
4. RC External Resistor/Capacitor with
FOSC/4 output on RA6
5. RCIO External Resistor/Capacitor with
I/O on RA6
6. INTIO1 Internal Oscillator with FOSC/4
output on RA6 and I/O on RA7
7. INTIO2 Internal Oscillator with I/O on RA6
and RA7
8. ECIO External Clock with I/O on RA6
4.5 Internal Oscillator Block
The PIC16F87/88 devices include an internal oscillator
block which generates two different clock signals;
either can be used as the system’s clock source. This
can eliminate the need for external oscillator circuits on
the OSC1 and/or OSC2 pins.
The main output (INTOSC) is an 8 MHz clock source
which can be used to directly drive the system clock. It
also drives the INTOSC postscaler which can provide a
range of six clock frequencies from 125 kHz to 4 MHz.
The other clock source is the internal RC oscillator
(INTRC) which provides a 31.25 kHz (32 µs nominal
period) output. The INTRC oscillator is enabled by
selecting the INTRC as the system clock source or
when any of the following are enabled:
• Power-up Timer
• Watchdog Timer
• Two-Speed Start-up
• Fail-Safe Clock Monitor
seems to have somethjing to do with the " fosc : " seting but have never seen this used
also i want to use the internal ad convertor
thanks for any help
Last edited by jcleaver; - 28th March 2007 at 17:16.
Look at the OSCCON register (it's in your post!).
You'll be able to select the desired frequency.
Roger
See if this forum thread helps.
http://www.picbasic.co.uk/forum/showthread.php?p=15901
-Adam-
Ohm it's not just a good idea... it's the LAW !
Bookmarks