A 16f628 hangs on entering programming mode

Started by gabrielszb September 11, 2003
I have programmed a 16f628 with code generated by PICC lite and after
succesfull programing the chip now cannot be reprogrammed again - it
hangs after entering programming mode.

I use Wouter's Wisp628 incircuit programmer and have been using it
for half a year without any problems with programs created by MPLAB
assmbler - till I have started playing with PICC compiler. I can post
you the .hex code so you can reproduce this. This is a very simple C
program that does nothing just blinks a led on RA4 (my first test).

After programming the program runs happily but the chip cannot be
programmed again. The program is configured to use internal
oscilator. I have also tried to play with MCLR config - with a sad
result of three unusable chips.

These are the basic facts I have fugured out:

- the Wisp628 hardware (programmer) is OK becouse I can succesfully
program other chips with my older programs (MPLAB assembler)
- the chip enters programming mode (I guess) becouse it stops
blinking the led
- the chip runs the program after dropping the programming voltage on
MCLR pin
- the programmer always reads 0x0000 from any location on the chip
even the chip ID (0x2006)
- when the program is configured to use external oscillator then the
chip can be reprogrammed after removing the crystall, then
disconnecting and reconnecting the power and programming the chip
without crystal (unfortunately the internal RC oscillator ca not be
removed :(.
- I can not revive or reset these chips although two times happened
that the chip *suddenly* started to program - but I can not reproduce
this anymore

Anyone knows what is happening? I have three unusable chips now and
don't want to damage more chips. Either there is a solution to this
or I will not use PICC compiler and continue use MPLAB assembler.

Any help is welcome.
Thank you
Gabriel Szabo