K8048 Code Protection(?) problem

Hi,

I’m new to the PIC family but not embedded coding. I have been trying to get my K8048 running with a PIC16F627 processor. I seem to be able to read the contents of the chip, but I don’t seem to be able to program it. Having looked around on the forum I have noticed that some mention has been made of the code protection, and how it can be turned off on later programmer devices. However, I didn’t note any work around for the K8048. Am I right in the assumption that there is no way to clear the code protection on this device when using the K8048? Does this mean that the PIC device is now unusable?

I don’t remember selecting the code protection, so this is kind of annoying. I am assuming that the code protection is the issue as when I “Read All Data” the Code protection comes back as “00”, or on. No error is reported and all the memory locations seem to be zero too.

I did note an issue regarding the internal oscillator, but a solution was only provided for another programmer device. It was not clear if there was a way to “hard reset” the PIC with the K8048. Looking at the spec sheet, mention is made of clearing the code protection via a “Bulk Erase”, but “erase all” didn’t seem to clear anything. I do get messages from version 3.0.0.4 of the PIC programmer indicating “The settings don’t match the Pic in the programmer”.

Am I using obsolete kit? Should this have not been on sale? Do I now need a new PIC? Does a PIC exist that does not suffer from this problem and is equivalent?

Thanks in advance,

Rob

Hi Rob,

it’s been a looooong time since I have used my K8048, but I still drop in from time to time…

Anyway, with that out of the way:
Code Protection does not render a PIC unusable, it only renders the contents unusable, i.e. intellectual property.
With CP on, a read attempt simply returns 00’s and nothing else. Erasing & re-programming the PIC with CP off will allow the contents to be read.

But returned 00’s can also signify connection problems and along with your “The settings don’t match the Pic in the programmer” message, I’d hazard a guess that this is your problem.

Is your power supply suitable?
How is your Serial cable constructed?
You aren’t using a USB/Serial converter, are you?
Are you SURE the board is populated correctly?
Etc…

There are a few tips in previous threads within this section, with regard to troubleshooting K8048 problems. Have a search back in time.

Below is the datasheet for your particular uC, bits 13 to 8 of the config word relate to Code Protection and section 14 has what you need to know (plus everything else you need to know):
ww1.microchip.com/downloads/en/D … 40300C.pdf

HTH,

Mick.