Programming Problem with PIC16F819


Closed Thread
Results 1 to 13 of 13
  1. #1

    Default Programming Problem with PIC16F819

    I'm using PBP v2.46. Programmer is PICkit 2 with v2.10 firmware. My program uses about 1950 words. Error message received after a programming attempt is:
    "Verification of configuration failed". Here are the configuration lines I'm using:

    @ device pic16f819,intrc_osc_noclkout,wdt_on,pwrt_off,mclr_ off,bod_off
    @ device cpd_off,ccpmx_off,debug_off,wrt_off,protect_off,lv p_off

    If I comment out the configuration lines the part programs successfully. Any ideas?
    Richard
    Last edited by Dick Ivers; - 16th July 2007 at 01:25.

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Richard,
    something in one of those statements probably is in error, try removing individual statements until you find the one or more errors. Looking into the data sheet makes me suspect the capture compare statements.ccpmx_off. Does it compile but fail to program or does it fail to compile?
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Compile is okay. Programming n.g.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Joe, Okay.... I tried your suggestion. The item that causes the programming failure is: intrc_osc_noclkout
    Do you see anything wrong with this?
    Richard

  5. #5
    Join Date
    Apr 2007
    Posts
    53


    Did you find this post helpful? Yes | No

    Default

    Hello Dick,

    I notice there is an added space in the lvp_off config in the second line (you have: lv p_off). Could this be the problem?

    Andy

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Hi Andy,

    The extra space in lvp was added automatically by this forum's editor software. The space is not there in the actual program. Otherwise, the program would not compile. Thanks for the observation.

    Richard

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Update: I think the error message I'm getting is an anomaly of the PICkit firmware. Reason: The programmed 819's work correctly in my application even though the above programming error message appears at programming time.
    I'll check with Microchip Support for their advice.

    Richard

  8. #8
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I still use the PICKIT1 for little things. If I use the PICKIT and import the hex the same happens, but the device works.

    If I use MPLAB and the PICKIT everything works like it should.

    Maybe the same with 2.
    Dave
    Always wear safety glasses while programming.

  9. #9


    Did you find this post helpful? Yes | No

    Default

    Dave, Thanks for your input. When I get a chance I'll try the MPLAB assembler, just out of curiosity. Microcode Studio has a box to check to use MPLAB.... I never used it before. Please help a little. I think the configuration lines have to be written differently...right? Anything else?

    Richard

  10. #10
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Well... I do not use MicroCode Studio very often. In fact the version I have is copyright 2001,2003. I could never get it to work correctly with my programmer (PICKIT1 when I started and soon after PICSTART PLUS). Would use MicroCode Studio set up to compile with with Micro Chip MPASM, then use MPLAB to burn the chip. A pain but...

    Then MPLAB 7.00 came out and microEngineering Labs came out with this
    http://melabs.com/support/mplab.htm
    All was well now, PBP inside of MPLAB!!

    As for the configuration, I make the changes I need in the PBP *.inc file for that chip. Most often for me on any given chip this will stay the same and if a change is needed for a certain project I will make a note of it.

    In the PBP *.inc file you will find a line for the PM header and another line for the MPASM header.

    Thats how I do it, but I am sure there are other ways. Here is an interesting thread. http://www.picbasic.co.uk/forum/show...ighlight=MPLAB

    Let us know how it goes.
    Dave
    Always wear safety glasses while programming.

  11. #11
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Dick Ivers View Post
    Joe, Okay.... I tried your suggestion. The item that causes the programming failure is: intrc_osc_noclkout
    Do you see anything wrong with this?
    Richard
    Hi Richard,
    Try using it this way using PM as assembler, I'm still trying to get MPASM version to compile.
    Code:
    @ DEVICE PIC16F819, INTRC_OSC_NOCLKOUT, WDT_OFF, LVP_OFF, PWRT_OFF, PROTECT_OFF, MCLR_OFF, BOD_OFF
    
    @ DEVICE CPD_OFF,CCPMX_OFF,DEBUG_OFF,WRT_OFF
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  12. #12


    Did you find this post helpful? Yes | No

    Default

    Programmer fixed with the following changes as suggested by Microchip support:
    1. Upgrade PICkit 2 programmer software to v2.40
    2. Under "Tools" set "Use Vpp First Program Entry"
    3. Set Vdd PICkit2 "ON"
    4. Set voltage to 5.0

    Richard

  13. #13
    Join Date
    Jun 2007
    Posts
    26


    Did you find this post helpful? Yes | No

    Default same problem

    I have the same prob.

    But his solution dosn't work for me. heres my inc file for this device

    NOLIST
    ifdef PM_USED
    LIST
    "Error: PM does not support this device. Use MPASM."
    NOLIST
    else
    LIST
    LIST p = 18F4682, r = dec, w = -311, w = -230, f = inhx32
    INCLUDE "P18F4682.INC" ; MPASM Header
    __CONFIG _CONFIG1H, _OSC_ECIO_1H ;_OSC_XT_1H
    __CONFIG _CONFIG2H, _WDT_ON_2H & _WDTPS_512_2H
    __CONFIG _CONFIG3H, _MCLRE_ON_3H & _PBADEN_OFF_3H
    __CONFIG _CONFIG4L, _XINST_OFF_4L & _LVP_OFF_4L
    NOLIST
    endif
    LIST
    EEPROM_START EQU 0F00000h
    BLOCK_SIZE EQU 64


    I even tried external +v5 with the pickit 2

    I have updated both firmware and software. i just got this programmer a week ago and have only tried it with a few chips. it seemed to work fine with those, but with a 18f4682 its a no go. keeps saying verification of configuration bits failed.

    any ideas ???

Similar Threads

  1. Programming Problem PIC12F683
    By StoneColdFuzzy in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 2nd June 2009, 21:39
  2. 16F676 programming problem
    By Christopher4187 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 18th May 2009, 17:39
  3. PIC18F4620 Programming problem
    By JavPar in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 6th December 2008, 04:21
  4. RFID medicine teller!! problem with programming
    By sknee8787 in forum mel PIC BASIC Pro
    Replies: 22
    Last Post: - 18th November 2008, 17:31
  5. Problem programming the PIC16F648A
    By Edgardo_2 in forum General
    Replies: 2
    Last Post: - 29th December 2006, 00:02

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