You know, I think I did not understand what Bruce was trying to explain to me in the old thread. Because this does compile for the PIC18F4520
So, I guess if you convert your configs to the style above you will be ok?Code:asm __CONFIG _CONFIG1H, _OSC_HS_1H & _FCMEN_OFF_1H & _IESO_OFF_1H __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H __CONFIG _CONFIG3H, _CCP2MX_PORTC_3H & _PBADEN_OFF_3H & _LPT1OSC_OFF_3H & _MCLRE_ON_3H __CONFIG _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L endasm ;@ 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




Bookmarks