Not quite right Pic2008...
18F PICs require you to use the MPASM Assembler... and MPASM does not recognise the @ DEVICE syntax that configures the Config Fuses in the same way that the default PM Assembler does. Here is an example for a PIC18F2420...
Code:
'
' PIC Defines for PIC18F2420
' ==========================
@ __CONFIG _CONFIG1H, _IESO_OFF_1H & _FCMEN_OFF_1H & _OSC_XT_1H
' Oscillator Switch-over Disabled
' Fail-Safe clock Monitor Disabled
' Set for external XT Oscillator RA6 & RA7 disabled
@ __CONFIG _CONFIG2L, _BOREN_OFF_2L & _PWRT_ON_2L & _BORV_0_2L
' Brown-Out Reset Enabled
' Power-On Timer Enabled
' Brown-Out Trip set to 4.2v
@ __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_128_2H
' WatchDog is ON
' Watchdog Postscaler set to 1:128
@ __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H & _CCP2MX_PORTC_3H
' MCLR is ON (external) PortE.3 is DISABLED
' PortB 4:0 is digital on Reset
' CCP2 is Multiplexed with PortC.1
@ __CONFIG _CONFIG4L, _STVREN_ON_4L & _XINST_OFF_4L & _LVP_OFF_4L & _DEBUG_OFF_4L
' Stack Under/Overflow will Reset System
' Enhanced CPU Addressing Disabled
' Low-Voltage Programming is OFF
' DEBUG is Disabled
@ __CONFIG _CONFIG5L, _CP1_ON_5L & _CP0_ON_5L
' All Code Protect
@ __CONFIG _CONFIG5H, _CPB_ON_5H & _CPD_ON_5H
' EEPROM is Code Protected
' Boot Block code is Code Protected
Bookmarks