Shop OBEX P1 Docs P2 Docs Learn Events
Anyone work with the 16F648 PIC chip the software lock function?? — Parallax Forums

Anyone work with the 16F648 PIC chip the software lock function??

mikedivmikediv Posts: 825
edited 2009-06-22 22:54 in General Discussion
Hey guys I was wondering if anyone here has worked with PIC chips and their software security feature. A long time ago I wrote code for a project that I was building and put it in a 16F648 chip and then locked it
well as time went on I have lost the original code its been so many years and as luck would have it I now found a use for the project but can not read the PIC chip I am pretty sure there is no way to hack this chip and I really wouldn't want to anyway because that would mean
it didn't work and anyone could read your code, but what I was wondering is there a way to copy the chip??? I need 4 more of this exact chip I built so if I could just clone or copy exact this chip that would work fine as well
the 16F code I wrote was an LCD interface for an MC68hc11 which I have forgton most of what I used to know ,,( it sucks to get old) and by accident realized that same interface works with the Parallax LCD and the BS2
I know I could just find another way to do this but if I could just copy my own chip it would make things easier for me.
I have searched online and found some stuff about resetting the security fuse, but if I ruin this chip I have no backups and it still works fine on the 68hc11 board

Comments

  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2009-06-22 17:19
    If you are looking for a way to control a standard LCD display via a Serial connection then you are probably better off using one of the ready made chips from here:

    http://www.phanderson.com/lcd106/lcd107.html

    There is a quantity discount so it may make sense to get a set of 10. I've used these chips in a few projects and they are excellent. Since you'd have to buy the plain PIC chips anyhow it shouldn't cost that much more to get these ready made ones.

    Alternately you could probably roll your own using one of the Parallax SX processors and I believe there may already be code written for that purpose if you ask on the SX forum.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-06-22 17:33
    Specifically, regarding your chip... You can't directly read the program. You can't directly copy the program. That said, there are people who, for a significant but otherwise reasonable fee given the amount of work involved, will remove the package around the chip and use an e-beam probe to read the bits programmed into the flash program memory.
  • LeonLeon Posts: 7,620
    edited 2009-06-22 18:07
    They use red fuming nitric acid to dissolve the epoxy, apparently. It's nasty stuff: our chemistry teacher made a mistake and put some yellow phosphorous instead of the red variety into RFNA, there was a massive explosion and lots of kids got acid burns and holes burnt in their clothing. I knew what was going to happen so I ducked. smile.gif

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2009-06-22 19:34
    Parallax's SX chips have a similar lock feature; the Propeller has no such feature as it dumps the PROM data to RAM for speed. Once it is all in RAM, it can easily be copied.

    Leon is describing the standard method of hacking into a locked chip. Of course, once you have something to look at, you need a good electron microscope and knowledge of what you are supposed to be looking for. Those logic gates are tiny and quite tedious to read for a few thousand lines of assembly code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Ain't gadetry a wonderful thing?

    aka G. Herzog [noparse][[/noparse] 黃鶴 ] in Taiwan
  • pwillardpwillard Posts: 321
    edited 2009-06-22 20:16
    Aren't these like Windowed EPROM devices when the epoxy is removed? Would you have to worry about erasure when the die is exposed?

    Was it a serial LCD interface? Dale Wheat published an article in Circuit Cellar a few years back that included the source code for his PIC'n LCD serial interface chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    There's nothing like a new idea and a warm soldering iron.
  • mikedivmikediv Posts: 825
    edited 2009-06-22 22:54
    Well I was actually simplifying what I use the Pic chip for ,, RobotWorkshop I have bought several of his LCD kits #117 , the guy is awesome and I plan to use his stuff as much as I do Parallax ,, I should give him a plug,
    http://www.phanderson.com/lcd106/lcd107.html a very decent place to buy LCD kits and other stuff and a very honest guy.

    I did read about some of the more exotic ways to hack these kinds of chips but to be honest was looking for somehting a bit more practical and simple LOL
    I guys I will just go back to the drawing board. But a thought had had crossed my mine, The 16F648 does allow single stepping and since I only program my PIC chips in Assembly machine code
    I guess I could hook up a bunch of LED's and single step through the address, Mike I wonder if that would betray the code locked inside?? But again even that is a more complicated effort than I am willing to do
    There is also some data online that claims these chips had a defect in the security and could be fairly easily hacked but of course the poster did not offer an example.

    Robot Workshop I believe Phanderson does in fact lock his PIC chips as well as do most commercial stuff.
    Oh pwillard I meant to try and answer you, no not like the old Eprom that you could erase with UV they are locked electronically and have no window , I have read like Mike said they can be etched away to read the links sounds like a huge amount of work
    it would have to be to get an unlock code to a vault with millions in it or somehting to even make the attempt thinkable. You can download the PICKIT#2 programmer software from Microchip and see the features we are talking about if you want
    you electronically burn fuses or links I am not sure how the security works but once you lock the PIC it will work as normal but when you try to read the code back in your programmer it just loads all 00 you can reset the chip and reset the security fuse and erase the chip for re-use but your code will be gone forever
    Mike

    Post Edited (mikediv) : 6/22/2009 11:02:11 PM GMT
Sign In or Register to comment.