Shop OBEX P1 Docs P2 Docs Learn Events
Pull/Read program from SX? — Parallax Forums

Pull/Read program from SX?

MyYz400MyYz400 Posts: 11
edited 2009-11-16 18:50 in General Discussion
I bought a device that uses the SX28 chip a while back, and have lost all documentation for it and can seem to find any information online for it either. So as I was inspecting it, I saw on the board headers for the SX-key (which I have). I was wondering if one could pull /read the program on this chip. Then I could then understand how to use the device. Thank-you for any advice one could give.

MyYz400

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-11-16 16:24
    It depends on whether or not the Code Protect option has been set. If Code Protect is set, you can't read the program from the device and you can't turn off Code Protect. What you get when you try to do it is garbage.

    If Code Protect is off, you can read the contents of the program memory, but it's just binary instructions. You will find that it's very difficult at best to understand what the program does and how it does it. It's possible to "dis-assemble" the binary instructions, but the labels and variable definitions are not there and, of course, the comments don't exist.

    Post Edited (Mike Green) : 11/16/2009 4:30:38 PM GMT
  • MyYz400MyYz400 Posts: 11
    edited 2009-11-16 18:04
    Well thats what I was afraid of. Oh well. No worries. It was just a simple stepper controller, so I dont think it would be too hard to make one myself. Thanks!
  • ZootZoot Posts: 2,227
    edited 2009-11-16 18:50
    If code protection is not on, when you hook up an SX-Key to the programming header, go to DEVICE in the SX IDE. There is a "READ" button. Click it. This will read all the code (and the ID) from the SX which you can then save to your computer.

    As Mike mentioned, variables (registers) won't have names, and there won't be labelled, but that doesn't mean you can't pick out some of the important features of the app.

    Also there is a "disassembler" at SXLIST which will at least make the read code a little more human-readable. Whether or not this is helpful, I can't say.

    www.sxlist.com/techref/ubicom/disassemblers.htm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST

    1uffakind.com/robots/povBitMapBuilder.php
    1uffakind.com/robots/resistorLadder.php
Sign In or Register to comment.