Fredrick,
Unfortunately, no. You have to search the datasheet quite a bit as every PIC is a little bit different. However, here's a way to make it relatively quick:
Open the .INC file for your PIC. Assuming you're using Windows and installed everything in the default locations, go to: C:\PBP and open, in this case, 18F2550.INC. You'll see the following open in Notepad.
Here you see the default configurations PBP makes if you perform no changes. You have two options to change the config settings.Code:;**************************************************************** ;* 18F2550.INC * ;* * ;* By : Leonard Zerman, Jeff Schmoyer * ;* Notice : Copyright (c) 2007 microEngineering Labs, Inc. * ;* All Rights Reserved * ;* Date : 11/08/07 * ;* Version : 2.50a * ;* Notes : * ;**************************************************************** NOLIST ifdef PM_USED LIST "Error: PM does not support this device. Use MPASM." NOLIST else LIST LIST p = 18F2550, r = dec, w = -311, w = -230, f = inhx32 INCLUDE "P18F2550.INC" ; MPASM Header __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H __CONFIG _CONFIG3H, _PBADEN_OFF_3H __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L & 0DFh NOLIST endif LIST EEPROM_START EQU 0F00000h BLOCK_SIZE EQU 32
Method One: modify the config bits as needed (more on this below) and save the file. The only caveat is these settings will take effect in every PIC18F2550 you program unless you remember to change this file each and every time, so it's not typically recommended you do this. Additionally, doing this prevents having people help you with your code if a config setting is wrong or off.
Method Two: put a semi-colon in front of each and every __CONFIG, like so:
and save the file. All this does is comment out the default config settings so you can use your own in your program. Next, you need to set the config bits within you program, so use the following format at the beginning of your program:Code:;**************************************************************** ;* 18F2550.INC * ;* * ;* By : Leonard Zerman, Jeff Schmoyer * ;* Notice : Copyright (c) 2007 microEngineering Labs, Inc. * ;* All Rights Reserved * ;* Date : 11/08/07 * ;* Version : 2.50a * ;* Notes : * ;**************************************************************** NOLIST ifdef PM_USED LIST "Error: PM does not support this device. Use MPASM." NOLIST else LIST LIST p = 18F2550, r = dec, w = -311, w = -230, f = inhx32 INCLUDE "P18F2550.INC" ; MPASM Header ;__CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L ;__CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H ;__CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H ;__CONFIG _CONFIG3H, _PBADEN_OFF_3H ;__CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L & 0DFh NOLIST endif LIST EEPROM_START EQU 0F00000h BLOCK_SIZE EQU 32
What can I change is in the next post. Sorry, apparently this is too long for just one reply.Code:asm __CONFIG _CONFIG1L, _PLLDIV_5_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_2_1L __CONFIG _CONFIG1H, _FOSC_HSPLL_HS_1H __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H __CONFIG _CONFIG3H, _PBADEN_OFF_3H __CONFIG _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L & 0DFh endasm




Bookmarks