On Fri, Jun 11, 2010 at 11:24 PM, RANDY ABERNATHY < randyabernathy@bellsouth.net> wrote: > I was told you couldn't disassemble the HEX code when read from the PIC. > From what you are telling me I can. That would enormously helpful if I can. > This code is so old that the original You may can give a go with this tool I wrote a while back: http://www.mcuhobby.com/articles.php?article_id=9 Tamas > source code no longer exists but I do have, what I have told, is an > unprotected OTP chip. My Melabs programmer also indicates it is unprotected > so I am assuming it is. I also had a typo in the post to which you > responded, when I said I tried burning it into "another PIC16F72A" I meant > "another PIC16C72A" of course. > > I will see if I can do what you suggest, that would be fantastic if I can. > Please bear with me, I am pretty new to the PICs and have been finding out > they are somewhat different from the older MCUs I have worked with like the > 8051 - 8052 stuff. > > Many thanks to you and everyone for all the suggestions and help. > > Randy Abernathy > CNC and Industrial Machinery > service, repair, installation and > design > > 4626 Old Stilesboro Rd NW > Acworth, GA 30101 > Fax: 770-974-5295 > Phone: 678-982-0235 > E-mail: > randyabernathy@bellsouth.net > > --- On Thu, 6/10/10, Oli Glaser wrote: > > > From: Oli Glaser > Subject: Re: [PIC]Copy from unprotected PIC then programming another PIC > To: "Microcontroller discussion list - Public." > Date: Thursday, June 10, 2010, 8:34 PM > > > > > -------------------------------------------------- > From: "Isaac Marino Bavaresco" > Sent: Thursday, June 10, 2010 11:29 PM > To: "Microcontroller discussion list - Public." > Subject: Re: [PIC]Copy from unprotected PIC then programming another PIC > > > Em 10/6/2010 19:11, RANDY ABERNATHY escreveu: > >> I copied the HEX code directly from the PIC16C72A. Then I tried just > >> burning it into another PIC16F72A and when I put the chip back into the > >> circuit, nothing worked. I also tried burning it into a PIC16F72 and > >> that didn't work either. > >> > > > > Did you save the file in the HEX file format? It is not just a binary > > image, it is a formated text file with hexadecimal number in it, with a > > definite structure. > > > > Did you read back the PIC that you just programmed? Did the file compare > > with the original? > > > > Try opening the original hex file in MPLAB and check in the program > > memory window to see if the instructions make sense. > > If you are doing this remember to set the correct processor in > configure->select device, otherwise it may interpret the opcodes > incorrectly > IIRC. Then you can step through the dissassembly using MPLAB SIM if you > wish, to see if the code runs correctly. > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- int main() { char *a,*s,*q; printf(s="int main() { char *a,*s,*q; printf(s=%s%s%s, q=%s%s%s%s,s,q,q,a=%s%s%s%s,q,q,q,a,a,q); }", q="\"",s,q,q,a="\\",q,q,q,a,a,q); } -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist