Quote Originally Posted by mister_e
In theory ... yes



One is good ... where the other 'I think' don't make sense at all

Let's say i just compile the config fuses bellow
Code:
ASM
    __CONFIG  _CONFIG1L, _CPUDIV_OSC1_PLL2_1L  
    __CONFIG  _CONFIG1H, _FOSC_XT_XT_1H
    __CONFIG  _CONFIG3H, _PBADEN_OFF_3H
    __CONFIG  _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
ENDASM
now, if i open the .LST file, i found
Code:
                      00097 
                      00098     __CONFIG  _CONFIG1L, _CPUDIV_OSC1_PLL2_1L  
300000 F0E7           00099     __CONFIG  _CONFIG1H, _FOSC_XT_XT_1H
300004 FDFF           00100     __CONFIG  _CONFIG3H, _PBADEN_OFF_3H
300006 FFBB           00101     __CONFIG  _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L
OK, cutting and pasting just the config lines into a blank page in Microcode studio, remming out the config lines in the 18F2550.INC file in the PBP folder so as not to get the warnings about overwritting values I can confirm that the LST file produces the same results as yours

Code:
                      00056     __CONFIG  _CONFIG1L, _CPUDIV_OSC1_PLL2_1L  
300000 F0E7           00057     __CONFIG  _CONFIG1H, _FOSC_XT_XT_1H
300004 FDFF           00058     __CONFIG  _CONFIG3H, _PBADEN_OFF_3H
300006 FFBB           00059     __CONFIG  _CONFIG4L, _LVP_OFF_4L & _XINST_OFF_4L

Where those numer comes from. Open the p18F2550.INC in the MPASM foler, scroll to the bottom and you'll discover
Code:
_CONFIG1L        EQU  H'300000'
_CONFIG1H        EQU  H'300001'
_CONFIG2L        EQU  H'300002'
_CONFIG2H        EQU  H'300003'
_CONFIG3H        EQU  H'300005'
_CONFIG4L        EQU  H'300006'
let's see CONFIG1L and CONFIG1H options
Code:
;----- CONFIG1L Options --------------------------------------------------
_PLLDIV_1_1L         EQU  H'F8'    ; No prescale (4 MHz oscillator input drives PLL directly)
_PLLDIV_2_1L         EQU  H'F9'    ; Divide by 2 (8 MHz oscillator input)
_PLLDIV_3_1L         EQU  H'FA'    ; Divide by 3 (12 MHz oscillator input)
_PLLDIV_4_1L         EQU  H'FB'    ; Divide by 4 (16 MHz oscillator input)
_PLLDIV_5_1L         EQU  H'FC'    ; Divide by 5 (20 MHz oscillator input)
_PLLDIV_6_1L         EQU  H'FD'    ; Divide by 6 (24 MHz oscillator input)
_PLLDIV_10_1L        EQU  H'FE'    ; Divide by 10 (40 MHz oscillator input)
_PLLDIV_12_1L        EQU  H'FF'    ; Divide by 12 (48 MHz oscillator input)

_CPUDIV_OSC1_PLL2_1L EQU  H'E7'    ; [OSC1/OSC2 Src: /1][96 MHz PLL Src: /2]
_CPUDIV_OSC2_PLL3_1L EQU  H'EF'    ; [OSC1/OSC2 Src: /2][96 MHz PLL Src: /3]
_CPUDIV_OSC3_PLL4_1L EQU  H'F7'    ; [OSC1/OSC2 Src: /3][96 MHz PLL Src: /4]
_CPUDIV_OSC4_PLL6_1L EQU  H'FF'    ; [OSC1/OSC2 Src: /4][96 MHz PLL Src: /6]

_USBDIV_1_1L         EQU  H'DF'    ; USB clock source comes directly from the primary oscillator block with no postscale
_USBDIV_2_1L         EQU  H'FF'    ; USB clock source comes from the 96 MHz PLL divided by 2

;----- CONFIG1H Options --------------------------------------------------
_FOSC_XT_XT_1H       EQU  H'F0'    ; XT oscillator, XT used by USB
_FOSC_XTPLL_XT_1H    EQU  H'F2'    ; XT oscillator, PLL enabled, XT used by USB
_FOSC_ECIO_EC_1H     EQU  H'F4'    ; External clock, port function on RA6, EC used by USB
_FOSC_EC_EC_1H       EQU  H'F5'    ; External clock, CLKOUT on RA6, EC used by USB
_FOSC_ECPLLIO_EC_1H  EQU  H'F6'    ; External clock, PLL enabled, port function on RA6, EC used by USB
_FOSC_ECPLL_EC_1H    EQU  H'F7'    ; External clock, PLL enabled, CLKOUT on RA6, EC used by USB
_FOSC_INTOSCIO_EC_1H EQU  H'F8'    ; Internal oscillator, port function on RA6, EC used by USB
_FOSC_INTOSC_EC_1H   EQU  H'F9'    ; Internal oscillator, CLKOUT on RA6, EC used by USB
_FOSC_INTOSC_XT_1H   EQU  H'FA'    ; Internal oscillator, XT used by USB
_FOSC_INTOSC_HS_1H   EQU  H'FB'    ; Internal oscillator, HS used by USB
_FOSC_HS_1H          EQU  H'FC'    ; HS oscillator, HS used by USB
_FOSC_HSPLL_HS_1H    EQU  H'FE'    ; HS oscillator, PLL enabled, HS used by USB

_FCMEN_OFF_1H        EQU  H'BF'    ; Fail-Safe Clock Monitor disabled
_FCMEN_ON_1H         EQU  H'FF'    ; Fail-Safe Clock Monitor enabled

_IESO_OFF_1H         EQU  H'7F'    ; Oscillator Switchover mode disabled
_IESO_ON_1H          EQU  H'FF'    ; Oscillator Switchover mode enabled
using our settings, we keep
Code:
_CONFIG1L        EQU  H'300000'
_CONFIG1H        EQU  H'300001'
_CPUDIV_OSC1_PLL2_1L EQU  H'E7'  
_FOSC_XT_XT_1H       EQU  H'F0'
combining both L and H we have F0E7... same for all other Config stuff.

It doesn't explain your config2 stuff... If it's a config fuse, it's not valid, well i don't see how we can have 1F... it could be a device programmer behaviour... i think
The programmer I'm using is a commercial version of the JDM serial programmer, with (as you have seen) several freeware applications to squirt the code to the PIC. Like I said, I'm a little out of my depth, so can't shed any light why or what the settings / numbers mean, I can only report them back to you. The only other programmer I have is a PicKit1, which doesn't support these devices

let's try to set ALL available config fuses BUT NOT the code protect stuff. And while we're at it, let's try a simple program too.
Code:
ASM
    __CONFIG  _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_1_1L 
    __CONFIG  _CONFIG1H, _FOSC_XT_XT_1H & _FCMEN_OFF_1H  &  _IESO_OFF_1H 
    __CONFIG  _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L &  _BORV_1_2L  & _VREGEN_OFF_2L 
    __CONFIG  _CONFIG2H, _WDT_OFF_2H 
    __CONFIG  _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_OFF_3H 
    __CONFIG  _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L 
ENDASM
ADCON1=$0F
TRISB=%00000000                  'set PORTB as all output
PORTB=0

ByteA   var byte
 
main:
    for bytea=0 to 7
        PORTB=DCD BYTEA
        PAUSE 250
        NEXT
    PORTB=255
    PAUSE 250
    goto main
OK copying and pasting that example into a blank page on Microcode studio and hitting F9 to compile produces an error. 113 (path and file name).asm59: symbol not previously defined (_FCMEN_OFF_1H)

now it give us those config values
Code:
                      00102     __CONFIG  _CONFIG1L, _PLLDIV_1_1L & _CPUDIV_OSC1_PLL2_1L & _USBDIV_1_1L 
300000 30C0           00103     __CONFIG  _CONFIG1H, _FOSC_XT_XT_1H & _FCMEN_OFF_1H  &  _IESO_OFF_1H 
                      00104     __CONFIG  _CONFIG2L, _PWRT_ON_2L & _BOR_ON_2L &  _BORV_1_2L  & _VREGEN_OFF_2L 
300002 FECE           00105     __CONFIG  _CONFIG2H, _WDT_OFF_2H 
300004 F8FF           00106     __CONFIG  _CONFIG3H, _MCLRE_ON_3H & _LPT1OSC_OFF_3H & _PBADEN_OFF_3H & _CCP2MX_OFF_3H 
300006 FFBB           00107     __CONFIG  _CONFIG4L, _STVREN_ON_4L & _LVP_OFF_4L & _XINST_OFF_4L & _DEBUG_OFF_4L 
                      00108
and it's still working here. here's the .HEX dump
Code:
:020000040000FA
:100000003EEF00F0010E09B0E84609B2E84609B239
:10001000E84609B4E83A1200046A036EFF0E0326AC
:10002000D8A00426D8A03BEF00F0030E026EDF0E2E
:1000300002D8F4D7026AE80F016E021EFC0ED8A0A7
:1000400003D00126D8B0FDD701260400023EF9D71F
:1000500001B000D001A202D0000000D01200096E51
:1000600002EC00F0016A026A09A6016E09B6026E8E
:1000700001503BEF00F00001040012000F0EC16EB2
:10008000936A816A1C6A0400080E1C5CD8B051EFA8
:1000900000F01C50E4DF816EFA0EBEDF1C2AD8A4EB
:0C00A000F2D7FF0E816EFA0EB7DFECD72E
:020000040030CA
:08000000C030CEFEFFF8BBFF8B
:00000001FF
compare with yours.
Regret that I can't see where the error is coming from as there is nothing in the INC file (BPB folder) or am I looking in the wrong place?

Wich adapter you're using JDM?

ICSP or not?
Yes - JDM as detailed above, with the chip pluged in to the programmer rathet than using ISCP

When you program your PIC, pull the PGM pin to GND, erase the chip firstm then retry and post your results.
I've tried grounding PGM with a wire whilst programming and leaving the jumper off, whilst programming the code in post# above the config settings in Winpic are displayed as FFFF and FFFF (config word 1 and 2), and with PGM grounded the programming failed. I erased and read back the PIC to make sure there was no code in the PIC. Disconnected the serial cable and re-connected, re-launched WinPIC and loaded the same code. Again it errored when programming. I then used PICpgm to program the code - it reported it programmed without errors (I did erase the PIC first). I then closed PICpgm and re-opened winpic and read the code back in to the application. Under Winpic the config words are reported as CF3F (word 1) and 1F3F (word 2)


I can't comment on JDM or else programmer like that, if you want a nice one and cheap, i buyed few months ago a Microchip PICKit 2 for some on-the road service job. For a <40$ and USB PIC programmer it's really nice.
I think I might invest in a decent programmer - I have a PICkit1 as mentioned above, and it works really well - maybe I'll treat myself to an early christmas pressy

Yeah it's kind of hard to know where the problem come from... The most strange thing... only one a single pin... and you tried on another board...

Don't give up!
I don't mind trying stuff and it helps learing what and how things work, I just don't want to take up too much of your time in trying to resolve my problem.

Many thanks as always