F877 to F877A Brain transplant w/HEX


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231

    Default F877 to F877A Brain transplant w/HEX

    Hi all,
    I have an unusual problem that one of you may have run into.
    I have a couple of controllers on the bench for repair. Same board and configuration but one uses a 16F877 and the other used a 16C74A.
    The one with the '74A took a hit that blew it up.
    The rest of the board is the same and I can get the HEX out of the 877, but I only have 877A's here.
    I don't believe that I can load the '877 HEX file into the "A" and use it. It seems logical that the HEX could be disassembled and recompiled for the "A", but I haven't ever tried.
    I imagine I'm likely to run into a flood of people screaming that I'm trying to rip someone off, but I'm not. I just want to duplicate a burnt chip (in this case , with a newer version) and use it back in it's original device.

    I don't know if I can even get plain 877's any more.

    Any thoughts?

    UPDATE: Next Day Air'd a couple of plain 'ol 877's from Digikey. We'll see if I can transfer and run the code on a new chip without any problems.

    Thanks
    Bo
    Last edited by boroko; - 22nd December 2008 at 22:48. Reason: found parts

  2. #2


    Did you find this post helpful? Yes | No

    Default possible

    ---------------- deleted wrong assumptions -------------------

    wow, was i wayyyy off..
    Last edited by nomad; - 24th December 2008 at 15:50.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    The 'A' has Comparators and a Voltage Reference Module... switch them off and any code for the plain vanilla will run on the 'A' after recompiling.

  4. #4
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Wink

    Hi, Boroko and Mel

    The goal is just to find some free program lines at the very beginning of the program to place the 2 asm lines to disable comparators ... CVRCON default is Disabled ...

    or just a "GOTO past the program last line" , and here place the config lines ; another GOTO will drive back to the "classical" program following line ... That allows to change one existing line to a "GOTO" and re-place it in the config stubb.

    Alain
    Last edited by Acetronics2; - 24th December 2008 at 16:53.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  5. #5
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default

    Thanks all for the replies.

    As I mentioned in the update, I found and ordered a plain '877. I got it in and was able to burn a copy of the hex into it and it ran in the controller that originally had an '877. The one that ran a 16c74 still has issues (significant "smoke" leakage), so I can't tell if the upgrade to the '877 will work, but for now, the crisis is over, at least until I can't get obsolete parts anymore.

    A deeper question still looms. Is it possible to disassemble when you only have hex to start with? I am treading on a slippery slope here, as I realize the implications of being able to do that. Sorry, and I understand if no one chooses to dig into this.

    The changes to the code that you guys mentioned are the reasonable way to do that if you first have the code to reassemble. Obviously, a HEX file is a complete picture of the program, minus the chosen substitute names for

    variables and the like, but is there a legitimate way to reverse the process so that you could get into it and make the changes that you suggest? MPASM will only seem to work if you have the original. Probably for obvious reasons.

    I'm imagining that mapping out the register hex addresses would give you a place to start. You might be able to see what the original op-codes were, at least in the beginning and add your patch code, but it looks like it would get pretty murky pretty fast without a systematic approach.

    Like I said, this dragon has been slain, but I'm sure it has some relatives that will show up again. I'm not trying to steal someone's work, just trying to reasonably repair a multi-thousand dollar controller.

    BTW, I was quite excited to see that one of our sweet little PICs was the core of such an expensive device.

    Bo

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Post

    Quote Originally Posted by boroko View Post
    Thanks all for the replies.


    The changes to the code that you guys mentioned are the reasonable way to do that if you first have the code to reassemble. Obviously, a HEX file is a complete picture of the program, minus the chosen substitute names for

    variables and the like, but is there a legitimate way to reverse the process so that you could get into it and make the changes that you suggest? MPASM will only seem to work if you have the original. Probably for obvious reasons.


    Bo
    Hi,

    You DO NOT need to re-assemble the code ... simply told, you just use an HEX editor to modify existing lines or add some ASSEMBLER lines past the ones existing.
    In MPLAB, you can easily do it in the "Program window" ...

    The ABSOLUTE MUST is just not to modify the existing lines numbering ...

    I've done it mostly to change the menu language ( just changing letters HEX code ... ) or add some I/O functions ...

    Once more : do not worry ! ... turning to 877A is really easy. - turning to 887 would, of course, be a little trickier ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts