IC2 problem with PIC16F877#

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
   Our laboratory recently purchased a MPLAB ICD2 programmer. Everytime
I try to program my PIC etheir by using the "Debugger" or the
"Programmer" mode I receive this error:

ICD0161: Verify failed (MemType = Program, Address = 0x0, Expected Val =
0x283A, Val Read = 0x0)

     I looked the forum and people seem to think that it is related to
the vdd voltage or maybe that the ICD 2 has a problem. Here are some
information that might help you:

-Target Vdd: 3.89V
-Target Vpp: 12.78V
-ICD2 Vpp: 12.70V
-Self Test: Pass everywhere
-Connected to USB
-I set the configuration bit in software like this:
    __CONFIG _HS_OSC & _WDT_OFF & _LVP_OFF & _BODEN_OFF & _PWRTE_ON
    & _CP_OFF & _WRT_ENABLE_OFF & _CPD_OFF & _DEBUG_ON
-Windows 2000 version 5.00.2195 (service pack 4)
-MPLAB IDE 6.50
-ICD2 can retrieve the ID from the target device

     I found today the ICDDebug.txt file in the MPLAB IDE\ICD2
directory.   Inside this file I saw that the data transmitted during
programmation was ok and I also tested it with an oscilloscope. On the
other hand, the data receive during a read operation was only zeros. So
I think the ICD2 can't write on my PIC. I looked and looked again my
target hardware and everything seem to respect the requirement for the
ICD2 programmer.

     Have you ever had this problem? Is it my hardware or the debugger?

Thank you very much
JS


Re: IC2 problem with PIC16F877#
Quoted text here. Click to load it

I believe this is the culprit. Remove it and hopefully all will be well.


Re: IC2 problem with PIC16F877#
The voltages look just fine. Is your PIC in a circuit when you are
trying to program it? You have to make sure that RB6 and RB7 do not
have any pullups on them. I've had programming problems in the past,
and that was usually because of components on my rb6 and rb7 pins. So
i'd take them off and things would be fine.

Quoted text here. Click to load it

Re: IC2 problem with PIC16F877#
Try unticking the "use FIFO buffers" for the serial port.
I seem to remember that the ICD2 won't work
correctly if FIFO (First In First Out) is enabled.

Phil

Quoted text here. Click to load it



Re: IC2 problem with PIC16F877#
Quoted text here. Click to load it

Do you use "A" suffix device in target?
On some of them debugging will not work if clock is >4Mhz

Best regards
Tsvetan
---
PCB prototypes for $26 at http://run.to/pcb (http://www.olimex.com/pcb )
PCB any volume assembly (http://www.olimex.com/pcb/protoa.html )
We've slightly trimmed the long signature. Click to see the full one.
Re: IC2 problem with PIC16F876A
Hello Everyone,
I am having a similar problem my teammate seems to not be able to progra
when the ICD2 supplies the Programming Voltage. I have no problems as
use an external source on the target board. His application makes i
inconvenient to use my method. How can I resolve this problem s
eventually in the field I can just use the PC via USB to reprogram a PI
16F876A?

Any suggestions would be welcome, incidentally programming using hi
method on my board does not work either. The Config Word seems to b
right
__CONFIG(UNPROTECT & DEBUGEN & WRTEN & LVPDIS & BORDIS & PWRTEN & WDTDIS
HS);

Thanks
Matt


        
This message was sent using the comp.arch.embedded web interface o
www.EmbeddedRelated.com

Re: IC2 problem with PIC16F877#
If you are using PIC16F877 your voltages are to low on pins 11 and 32. Yo
need at least 4 V with an External (XT) OSC but you are using a HS whic
requires 4.5V. If you are using a PIF16LF87X then these voltages woul
work. How to fix this is up to you.

Check out Page 152-153 of the datasheet to confirm my findings.

Your Post:
Quoted text here. Click to load it




Site Timeline