PDA

View Full Version : Can't remove code protection of 16F88!!!



flotulopex
- 17th December 2006, 12:50
Hello,

I just can't remove the code protection of my 16F88. Something must have gone wrong during a programming process since I never use this protection mode.

I'm using two different programmers: the AN589 (parallel) & and the VELLEMAN "8076'1" (serial). Both work usually fine.

I'm programming the chips using the ICSP method.

I have found some older threads about this type of issue and tried almost anything possible.

Is there any "master" reset possible for this chip?

sougata
- 17th December 2006, 16:06
Hi,

Have you tried erasing the MCU ? A bulk erase should remove the code protection bits as well.

Ron Marcus
- 17th December 2006, 16:31
Using internal oscillator and turning the MCLR into an input will make it very difficult to reprogram the chip. From the discussion with Melabs, and other threads on the list, it appears that the program starts running before the programmer can take control.
Without a way to reset, or control of the system clock, the exact timing needed to take control of the processor before the program starts running is hard to achieve.Powering the chip from the programmer, if possible, helps, but doesn't guarantee success. When I need to use all outputs and the internal oscillator, I will program the chip with MCLR active until the last moment. I check out all operations short of the one attached to the MCLR pin, and change the config after the final revision.
Hope this helps,
Ron

flotulopex
- 17th December 2006, 16:53
Okay,

I'm using WINPIC.

Ron,

I've heard about what you mention but never had this problem up to now.

I don't "touch" the original MCLR register settings because of this problem.

These are my settings (fuses & used registers):

@ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT,PROTECT_OFF,WDT_ON,PWR T_ON,MCLR_ON
@ DEVICE PIC16F88,BOD_ON,LVP_OFF,CPD_OFF,DEBUG_OFF,CCPMX_OF F
OSCCON = %01100000 'Internal RC set to 4MHZ
ANSEL = %00000000 'Disable Analogue Inputs
ADCON0 = %00000000 'A/D converter is OFF
TRISB = %11000000 'Buttons are Inputs / LEDs Outputs / BUZZER Output
OPTION_REG = %01010101 'Set TMR0 to interrupt every 16.384 ms & disable PORTB pullups
INTCON = %10100000 'Enable TMR0 interrupts

a.- Shall I consider my PIC as definitively dead?

b.- Is there any programming "artifice" (PAUSE or any other command on the top of your program) to avoid this?

Ron Marcus
- 17th December 2006, 17:10
If you have MCLR on, then totally disregard my above comment! :<) If the chip is soldered in, look for a cold solder joint, short, or there is too much load on the programming pins for the chip's liking. Also, I once had a processor in circuit, and it would only programming with power to it, because the larger than .1uF bypass capacitor on the Vdd pin caused the power to stabilize too slowly for the programmer's liking. I always find the problem after replacing the chip, most often realizing it was something simple, and the chip was fine.

Ron

flotulopex
- 17th December 2006, 17:13
Just an idea: would it be possible to overcome the code protection issue by programming the PIC with a Low Voltage method?

Actually, I've never done this so I don't know how to do and and if it would work.

BTW: I put the µC on my breadboard with "nothing" connected to it appart from a 0,1µF cap between Vdd and Vss.

flotulopex
- 22nd December 2006, 13:18
Hello,

Does anyone know what, in the PIC's programming process, is different if I program an application or if I just "bulk erase" it?

Is there a way to do some kind of "manual bulk erase" using another PIC programmed accordingly to the "Flash Memory Programming Specification"?

I just can't understand that the "bulk erase" command doesn't work if I can normally program the chip....