Advice please - Warning message


Closed Thread
Results 1 to 40 of 51

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default Additions images

    If it helps here are the captures from the other tabs

    I've also tried taking of the checks for OSCAL etc and that made no difference
    Attached Images Attached Images   

  2. #2
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Last post tonight as its getting late

    I've tried another version of winpic, Winpic800 and it has the settings as shown in the attached image - and this too errors when programming.

    Gut feeling, its something to do with hardware / config settings in the programmer - I just don't have the experience to understand what it is.
    Attached Images Attached Images  

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by malc-c
    The PICpgm appliaction doesn't have any options to change, so I assume it takes the fuse settings etc from the code / inc / dev files.
    In theory ... yes

    Reading the code back into WinPIC, gives the following info in the log
    ''''
    '
    '
    '
    '
    I Then loaded the same HEX file that gets compiled from your code that I previously loaded with PICpgm into Winpic and it reported the following under device config

    Config word #1 = F0E7 (hex)
    Config word #2 = 1F3F (hex)
    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
    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

    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
    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.

    In both cases nothing is else is listed listed (see images attached) If I try programming having loaded this file it errors
    Wich adapter you're using JDM?

    ICSP or not?

    When you program your PIC, pull the PGM pin to GND, erase the chip firstm then retry and post your results.

    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'm really out of my depth here as I have no idea what all these numbers are - I opted for the PICpgm program because it auto detected the PIC and had less setting to change - it also seemed to work as it reported no errors
    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!
    Last edited by mister_e; - 11th December 2006 at 04:56.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    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

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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)
    I don't know wich version of MPASM you're using, but i use the latest 5.06 (well i think it's the latest... ) could it be the problem?

    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?
    compare/post your fileName.HEX file with the one i posted, those last bytes (in color) are the config fuses. It may reveal some interesting stuff. if they're different, just edit the .HEX file 'till it's the same, retry to program your PIC.

    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)
    Double check that both VSS are tied together, and place a 0.1uF between Vdd and Vss on your ZIFF socket. Keep PGM to gnd. If you still have some errors, try increasing the capacitor and use tantalum type if you reach over 1uF. So begin with 0.1uF, then 0.22, 0.47, 1uF, 2.2uF, 4.7uF maybe it will work. Also measure the voltage on MCLR pin while programming. it should be over 12 volts.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Steve,

    Ok I've downloaded the latest version of MPLAB so now I'm running ver 5.06 of MPASM and that cured the previous error (FC_MEN_OFF) so the following code compiled fine

    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
    The resulting LST file is attached (steve.txt as .lst won't upload) - However when programming it with winpic it errors - here's the log

    Code:
    Device has been erased.
    Programming...
    Erasing ("bulk" or "chip") ...
    Programming CODE, 0x000000..0x0000B4
    Verifying CODE, 0x000000..0x0000B4
    Verifying 0x000000..0x0000B4
    Programming CONFIG, 0x300000..0x300006
    Verifying CONFIG, 0x300000..0x300006
    Verifying 0x300000..0x300006
    Verify Error: 300000: read 000000, wanted 0030C0, mask 00FFFF  ==> diff=0030C0
    Verify Error: 300002: read 001E0E, wanted 00FECE, mask 00FFFF  ==> diff=00E0C0
    Verify Error: 300004: read 008000, wanted 00F8FF, mask 00FFFF  ==> diff=0078FF
    Verify Error: 300006: read 0000A1, wanted 00FFBB, mask 00FFFF  ==> diff=00FF1A
    ERROR: Programming FAILED !
    On checking the config setting winpic reports 30C0 and FECE as the device config word (#1 and #2 respectively) - see attached image (config.jpg).

    When programming MCLR is taken to around +13v by the programmer. Both Vss are connected and grounded.

    Lastly here is the resulting HEX file that is compiled

    Code:
    :020000040000FA
    :1000000043EF00F00850070B1A0FF66EF76A000E68
    :10001000F722F86A0800F5501200010204081020C7
    :100020004080036A026EFF0E0226D8A00326D8A0E5
    :1000300040EF00F0030E016EDF0E02D8F4D7016A24
    :10004000E80F006E011EFC0ED8A003D00026D8B029
    :10005000FDD700260400013EF9D700B000D000A271
    :1000600002D0000000D01200086E02EC00F0006A1E
    :10007000016A08A6006E08B6016E005040EF00F05D
    :100080000001040012000F0EC16E936A816A1C6A9F
    :100090000400080E1C5CD8B056EF00F01C50E4DFE2
    :1000A000816EFA0EBEDF1C2AD8A4F2D7FF0E816E35
    :0600B000FA0EB7DFECD7E9
    :020000040030CA
    :08000000C030CEFEFFF8BBFF8B
    :00000001FF
    Comparing the last but one line that was hilighted in your previous post there isn't any difference

    Code:
    Your code
    :08000000C030CEFEFFF8BBFF8B
    
    My code
    :08000000C030CEFEFFF8BBFF8B
    I therefore tried loading the HEX file via the PICpgm program and that loaded the code to the pic without errors. I then shutdown PICpgm and launched Winpic and read the code back. The log reported the following:
    Code:
    Info: Loading definitions for "PIC18F2550" from devices.ini .
    Info: Support for some newer PIC18F devices added by Martin v.d. Werff 2005
    Couldn't find "C:\Program Files\Microchip\MPLAB IDE\PIC18F2550.dev", please borrow/copy from MPLAB !
    PIC18F: family='21'=4550, WriteLatch=32 bytes, EraseLatch=64 bytes .
    Initialising PIC-Programmer: Success.
    Testing: delay(500ms) took 0.50 seconds, timer_freq=3.5795 MHz ... ok
    Reading 0x3FFFFE - 0x3FFFFF ...
    Reading 0x300000 - 0x30000D ...
    Reading 0xF00000 - 0xF000FF ...
    Reading 0x000000 - 0x007FFF ...
    Reading PIC ok.
    The device config words were reported as CF3F and 1F3F. However the resulting dump of the PIC isn't anything like the original file (see dumped.txt attached).

    Unless you can see anything glaringly obvious then the only other area must be hardware and until I get a different programmer I can't prove that one way or another. The only thing I can see in the logs is

    Couldn't find "C:\Program Files\Microchip\MPLAB IDE\PIC18F2550.dev", please borrow/copy from MPLAB !
    Could this be the problem, as the dev files are in C:\Program Files\Microchip\MPLAB IDE\Device folder ??

    As always mate, I appreciate your continued help and advice on this one !

    EDIT:

    Oh and this is the programmer I'm using
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by malc-c; - 11th December 2006 at 21:27.

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    It's clear now, it a device programmer OR device programmer software problem. Here's the dump of the PIC when i reload it
    Code:
    :020000040000FA
    :100000003EEF00F0010E09B0E84609B2E84609B239
    :10001000E84609B4E83A1200046A036EFF0E0326AC
    :10002000D8A00426D8A03BEF00F0030E026EDF0E2E
    :1000300002D8F4D7026AE80F016E021EFC0ED8A0A7
    :1000400003D00126D8B0FDD701260400023EF9D71F
    :1000500001B000D001A202D0000000D01200096E51
    :1000600002EC00F0016A026A09A6016E09B6026E8E
    :1000700001503BEF00F00001040012000F0EC16EB2
    :10008000936A816A1C6A0400080E1C5CD8B051EFA8
    :1000900000F01C50E4DF816EFA0EBEDF1C2AD8A4EB
    :1000A000F2D7FF0E816EFA0EB7DFECD7FFFFFFFF2E
    
           **** and later we get *****
    :0200000400F00A
    :08000000FFFFFFFFFFFFFFFF00
    :08000800FFFFFFFFFFFFFFFFF8
    :08001000FFFFFFFFFFFFFFFFF0
    :08001800FFFFFFFFFFFFFFFFE8
    :08002000FFFFFFFFFFFFFFFFE0
    :08002800FFFFFFFFFFFFFFFFD8
    :08003000FFFFFFFFFFFFFFFFD0
    :08003800FFFFFFFFFFFFFFFFC8
    :08004000FFFFFFFFFFFFFFFFC0
    :08004800FFFFFFFFFFFFFFFFB8
    :08005000FFFFFFFFFFFFFFFFB0
    :08005800FFFFFFFFFFFFFFFFA8
    :08006000FFFFFFFFFFFFFFFFA0
    :08006800FFFFFFFFFFFFFFFF98
    :08007000FFFFFFFFFFFFFFFF90
    :08007800FFFFFFFFFFFFFFFF88
    :08008000FFFFFFFFFFFFFFFF80
    :08008800FFFFFFFFFFFFFFFF78
    :08009000FFFFFFFFFFFFFFFF70
    :08009800FFFFFFFFFFFFFFFF68
    :0800A000FFFFFFFFFFFFFFFF60
    :0800A800FFFFFFFFFFFFFFFF58
    :0800B000FFFFFFFFFFFFFFFF50
    :0800B800FFFFFFFFFFFFFFFF48
    :0800C000FFFFFFFFFFFFFFFF40
    :0800C800FFFFFFFFFFFFFFFF38
    :0800D000FFFFFFFFFFFFFFFF30
    :0800D800FFFFFFFFFFFFFFFF28
    :0800E000FFFFFFFFFFFFFFFF20
    :0800E800FFFFFFFFFFFFFFFF18
    :0800F000FFFFFFFFFFFFFFFF10
    :0800F800FFFFFFFFFFFFFFFF08
    :020000040020DA
    :08000000FFFFFFFFFFFFFFFF00
    :020000040030CA
    :0E00000000000E1E0080A1000FC00FE00F4098
    :00000001FF
    as you see, it far different from yours...

    Yours can't work, let's see the first lines... wich are supposed to be the program stuff
    Code:
    :1000000000000000000000000000000000000000F0
    :1000100000000000000000000000000000000000E0
    :1000200000000000000000000000000000000000D0
    :1000300000000000000000000000000000000000C0
    :1000400000000000000000000000000000000000B0
    :1000500000000000000000000000000000000000A0
    :100060000000000000000000000000000000000090
    :100070000000000000000000000000000000000080
    :100080000000000000000000000000000000000070
    :100090000000000000000000000000000000000060
    :1000A0000000000000000000000000000000000050
    totally blank

    and the lasts lines...
    Code:
    :0800C800FFFFFFFFFFFFFFFF38
    :0800D000FFFFFFFFFFFFFFFF30
    :0800D800FFFFFFFFFFFFFFFF28
    :0800E000FFFFFFFFFFFFFFFF20
    :0800E800FFFFFFFFFFFFFFFF18
    :0800F000FFFFFFFFFFFFFFFF10
    :0800F800FFFFFFFFFFFFFFFF08
    :020000040020DA
    :08000000FFFFFFFFFFFFFFFF00
    :020000040030CA
    :0E00000000000E1E0080A1000FC00FE00F4098
    :00000001FF
    those are good so far. If i program my PIC here with the dump you sent... i have nothing working... same thing as you get on your side.

    So use another device programmer AND/or another software to fix the problem.

    Woohoo we got it

    Did your tried the capacitor stuff?
    Last edited by mister_e; - 11th December 2006 at 22:33.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. PIC16F690 PBP boundary crossing warning message
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 9th May 2008, 12:17
  2. Micro Code Studio - Warning message
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2006, 22:17
  3. MicroCode Studio Boundary Warning Message
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2006, 10:13
  4. Message String Table using Readcode
    By mytekcontrols in forum Code Examples
    Replies: 2
    Last Post: - 11th July 2005, 00:17
  5. warning message
    By pic beginner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 23rd July 2004, 03:53

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts