Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] PIC18F67K22 Code protect without config byte write disable

Status
Not open for further replies.

elt42at

Newbie level 6
Newbie level 6
Joined
Mar 26, 2011
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,387
Hi!

There is a device with pic18f67k22. In MPLAB, with pickit3, i am trying to read pic.
Code area fills with 0x00 from address 0x0 to 0x1FFFFF.

But i can see configuration data from menu "Configure->Configuration Bits" in MPLAB. Also i can change bits by removing the tick from "Configure Bits set in code."

I try to disable code-protection CPx bits and set pickit3 only configuration area from "Programmer->Settings->Program memory->memories"

Than pickit3 output secren says,
Address: 00300008 Expected Value: 000000ff Received Value: 00000000

So, i have to clean (set 0xFF) config bytes before program.

Pickit3.exe (Stand alone), mplab, mplabx programs permits chip erase only (bulk erase). But i want to clean only "CONFIG BYTES" from 300000 to 30000F

So a way is necessery to block to block erase command/method.

In microchips forum:
"http://www.microchip.com.edgekey.net/forums/m637187-print.aspx"

trevor
Total Posts : 515
Reward points : 0
Joined: 5/5/2010
Location: The LAN Downunder
Re:Slow Pickit3 - Thursday, March 01, 2012 2:38 AM
0 Indeed, the PIC18F67K22 has no Bulk Erase command, so it has to be erased block-by-block. The PICkit2 uses a scripting language for programming and this PIC has too many memory blocks to fit the number of required erase block commands in the memory reserved for the PICkit2 script.

how can i clear to program config bits only???. So i can disable code protect bits ????
 

The behaviour of code protection bits is described in datasheet paragraph 28.6.1 PROGRAM MEMORY CODE PROTECTION.

Common sense would tell why is it so.
 
Thanks for your reply "FvM"
I look the datasheet and find this:
Note:
Code protection bits may only be written to a ‘0’ from a ‘1’ state. It is not possible to write a ‘1’ to a bit in the ‘0’ state. Code protection bits are only set to ‘1’ by a full chip erase or block erase function. The full chip erase and block erase functions can only be initiated via ICSP or an external programmer. Refer to the device programming specification for more information.
So it is not possible to change CPx bits without a chip erase. Than the data will cleared which i want to get by changing CPx bits to disable state.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top