PDA

View Full Version : Programming Problem with PIC16F819



Dick Ivers
- 16th July 2007, 00:01
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

Archangel
- 16th July 2007, 01:19
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

Dick Ivers
- 16th July 2007, 01:28
Compile is okay. Programming n.g.

Dick Ivers
- 16th July 2007, 01:40
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

Andy Wood
- 16th July 2007, 01:46
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

Dick Ivers
- 16th July 2007, 02:14
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

Dick Ivers
- 16th July 2007, 15:33
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

mackrackit
- 16th July 2007, 15:50
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.

Dick Ivers
- 17th July 2007, 00:42
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

mackrackit
- 17th July 2007, 02:02
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/showthread.php?t=2187&highlight=MPLAB

Let us know how it goes.

Archangel
- 17th July 2007, 21:54
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.


@ 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

Dick Ivers
- 18th July 2007, 12:22
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

jason
- 24th July 2007, 18:42
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 ???