Continue to Site

Can't clear code protection!

Status
Not open for further replies.

xokolatecake

Newbie level 4
Newbie level 4
Joined
Feb 16, 2005
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Portugal
Activity points
1,334
hi,
i recently got myself a TK3 board and MK3 software to program a pic16F877A.
somehow the CP is on, and i can't clear it. I've tried to erase program and eeprom memory, but when i read-back the eeprom there's only zeros and the software tells me that CP seems to be on.

can anyone give me a hint on this?


thanks,
david
 

Hi,

Try to write a new code to the PIC. Not erase, just write a small program and try to write it to the pic. If you get any error, please past the complet error with all the lines that are beofre and after.
Good luck.
 

Code:
; setting Port B to output mode and turn on each led

                ORG 0          ; Reset Vector address
                GOTO 5         ; go to PIC address location 5
                ORG 4          ; Interrupt Vector address
                GOTO 5         ; go to PIC address location 5
                ORG 5          ; Start of Program Memory at location 5
                 
                clrf 6         ; set all Port B pins to logic 0
                bsf 3,5        ; instruct program that a Bank 1 command comes next
                clrf 6         ; set all Port B pins as outputs
                bcf 3,5        ; instruct program that a Bank 0 command comes next

                bsf 6,0        ; set Port B pin 0 to logic 1
                bsf 6,1        ; set Port B pin 1 to logic 1
                bsf 6,2        ; set Port B pin 2 to logic 1
                bsf 6,3        ; set Port B pin 3 to logic 1
                bsf 6,4        ; set Port B pin 4 to logic 1
                bsf 6,5        ; set Port B pin 5 to logic 1
                bsf 6,6        ; set Port B pin 6 to logic 1
                bsf 6,7        ; set Port B pin 7 to logic 1

                end            ; final statement


when i try to send this i get : "No response from PIC!"

what may the problem be?
 

Hi,

As i said before:
If you get any error, please past the complet error with all the lines that are beofre and after
.

I dont need the code, i need to see what you for from your MPLAB or any other program that you are using to program the PIC.

Thanks.
 

Code:
This file is named TK3verifylist.txt held in TK3
folder and may be read via your text editor. Use
Bin-Dec-Hex to determine the bit(s) affected

SENT	READBACK

All i get is this when i click 'Show errors', there are no error codes listed!
have a clue?
 

Ok,
I got to a point that i need to know more on the MK3 and i didnt find a ny relevent information on google.
2 things:
1. post the text that is writen inside the file TK3verifylist.txt taht you have posted.
2. Download and install MPLAB IDE 7.01 and use that do porgram the PIC. You will need to chose the PIC16F877A and then import your hex file and program. Thats all.

Let me know what happend.
 

will MPLAB software work with my TK3 board?
what configurations should i do?
 

hi i guss that you are working in less then 4.5v vcc
if so the code protection bit cant be erased try 5v vcc clear the CP bit and continu working
you can read more in the proggraming spec of the device

Added after 19 seconds:

hi i guss that you are working in less then 4.5v vcc
if so the code protection bit cant be erased try 5v vcc clear the CP bit and continu working
you can read more in the proggraming spec of the device
 

My board works at 5V...i was unable to program the pic through MPLAB IDE 7.01 as you suggested because there's no way the software would recognise my board!

if you have any other ideas please post!
 

Hi,

First reconnect your board to the MPLAB. you shouldnt ahve any problem. Unless you are using a strange programer for the PIC. In that case i cant help you any more.
If you can connect the programer to the MPLAB, Can you please post the error code that you got from the MPLAB.
Thanks.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top