Hi,
I am experiencing this problem with both PIC18F4520 and PICF4515. I am using the following code to define the osc frequency. Each time I try to compile I get a compiler error of
Error[176] c:\pbp\...... 204: CONFIG Directive Error: (setting "32" not found for the processor 18F4515)
code:
@ CONFIG OSC = INTIO67 ;config for internal osc
@ CONFIG PBADEN=OFF ;turn of port b analog inputs
@ CONFIG MCLRE=ON ;activate master clear
@ CONFIG WDT = OFF ;turn off watchdog timer
@ CONFIG STVREN = OFF ;turn off reset on overflow/underflow
@ CONFIG LVP = OFF ;turn off low voltage programming
Include "modedefs.bas"
define OSC 32
OSCCON = %01110000 'set internal oscillator to 8 mhz and select it as system clock
OSCTUNE= %11000000 'turn on pll frequency is now 32
INTCON = %00000000 'turn off all interupt functions
ADCON0 = %00000000 'turn off adcs set to digital i/o
ADCON1 = %00001111 'turn off adcs set to digital i/o
TRISA = %00000000 'set port A to all outputs
TRISB = %00000000 'set port B to all outputs
TRISC = %10001011 'set port C
TRISD = %00000000 'set port D to all outputs
TRISE = %00000000 'set port E to all outputs
PORTA = %00000000 'set all outputs on port a to 0
PORTB = %00010000 'set outputs on port b to 0
PORTD = %00000000 'set all outputs on port d to 0
PORTE = %00000000 'set all outputs on port e to 0
WDTCON = %00000000 'turn off wdt
Any help would be greatly appreciated. Thanks.
Bookmarks