Shop OBEX P1 Docs P2 Docs Learn Events
Can you read prop ram or eeprom back into the IDE?? — Parallax Forums

Can you read prop ram or eeprom back into the IDE??

mikedivmikediv Posts: 825
edited 2009-09-28 00:04 in Propeller 1
Hi guys I never had to think about this before but I now have a situation where I would like to read the code that was loaded into my prop proto board. Is this possible? here is the scenario.
I wrote a spin program used F11 to load it into my prop proto board. Everything is working fine. Now I want to be able to read the code I loaded into eeprom I don't care if its spin or asm I just want to be able to read it back then save it and use the program to load into another prop board. Thanks

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-25 00:51
    Search the Hydra forum for a program called HAM, with it you can
    download the contents of the EEPROM to a .bin file and write that to another board.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • mikedivmikediv Posts: 825
    edited 2009-09-25 00:58
    Thank you OldBit
  • mikedivmikediv Posts: 825
    edited 2009-09-25 01:06
    OldBit I found a file called hamver1.09 but its for the asset manager am I on the right path?
  • kuronekokuroneko Posts: 3,623
    edited 2009-09-25 01:13
    Looks like it, just get it from here (main thread).
  • mikedivmikediv Posts: 825
    edited 2009-09-25 01:41
    Thanks guys. If anyone knows I got the program and it works just fine on the Hydra system however I can not get it to work on my proto board or any other prop boards except the Hydra
    Does anyone know what I have to do to use it with other prop based boards?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-25 01:54
    You may not be able to use it on anything except a Hydra.· It depends on the original program and what I/O pins it used and what it used them for.· Those correspondences are built into the compiled program.· You also would have to change the clock speed.· It may be possible to change the long value at location zero and the clock mode byte value at location 4(?), but that's not easy ... you have to change the checksum also.

    In any event, it's a bit of work.· It would be possible to get a 10MHz clock crystal and plug it into your Protoboard or Demo Board or whatever and run the Propeller as if it were on a Hydra board, but the I/O pin part isn't as easy to fix.
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-25 01:58
    IIRC, I've been able to get it to work on my Protoboard setup by changing the
    video pins and the speed. No issues otherwise.

    Given a day, I think I still have the copy I modified on my basement PC and
    I'll hook it up and locate it if needed.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • mikedivmikediv Posts: 825
    edited 2009-09-26 01:40
    Thank you oldbit I would be very thankful. I tired to modify ham 1.07 I found the clock section in the spin portion of the code but it did not work Mike I also tried changing the clock crystal to 10 Meg that did not work either its such an great program
    I am really surprised no one has modified it
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-09-26 02:33
    I wonder how hard it would be to just capture the data flow
    from the eeprom to the prop at bootup?
    Then store it into a file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Where am I? Where am I going? Why am I in a handbasket?"
  • mikedivmikediv Posts: 825
    edited 2009-09-26 03:03
    Holly do you mean by putting some type of eeprom in line, like a data logger if you will??? My goal is this . I wrote a spin program for my proto boards after it loads it goes and reads some sensors and changes the data in the original program so now if I re-boot the board it comes up with the original program but slightly modified I have a need to now load that modified program into new proto boards , So the way it works now I have to load the spin program let it run through the sensors and modify the program on each and every board I want to use.
    So if I could just read back the modified program into a file "mikesnewblah blah""" then I would only have to load one spin program into a new prop board in one step and it would have this new version of my code.. It sounds simple but I have not found a way to load an image of the eeprom. I have used Ham on my Hydra and it works great but the other prop boards are not Hydra's they are just prop proto boards no video or keyboard.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2009-09-26 04:23
    I was speculating about connecting a pc or another controller
    to the i2c lines to capture the data as it was sent to the prop.

    But perhaps you could just create a small subroutine that would run
    in a prop cog and just read the eeprom data and send it to a pc using serial??
    Then once your slightly modified program is stored into the eeprom you
    could just tell the program to read and send over the contents for re-use.

    If you write this and get it to work I'd sure like a copy smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Where am I? Where am I going? Why am I in a handbasket?"
  • kuronekokuroneko Posts: 3,623
    edited 2009-09-26 04:45
    mikediv said...
    I tired to modify ham 1.07 I found the clock section in the spin portion of the code but it did not work Mike I also tried changing the clock crystal to 10 Meg that did not work either its such an great program
    This works for the demo board. Grab the 1.0.9 source for the HAM. In benson_ham_driver_1_09.spin apply the following changes:
    • sort out your clock setup (16/5 vs 8/10)
    • use TV.spin for the TV driver and Graphics.spin for the graphics driver (i.e. the propeller tool built-in drivers, the Hydra drivers only work there)
    • change tvparams.tv_pins to %001_0101
    Upload the HAM driver to the board, start the PC frontend, select your max EEPROM size and download.

    There are potentially other places which need attention when you don't run at 80MHz (e.g. the serial driver has a hard-wired 80MHz system rate). Graphics can be removed (I didn't even know until now that it displays anything at all [noparse]:)[/noparse]
  • localrogerlocalroger Posts: 3,452
    edited 2009-09-26 19:21
    mikediv: I wrote a spin program for my proto boards after it loads it goes and reads some sensors and changes the data in the original program so now if I re-boot the board it comes up with the original program but slightly modified I have a need to now load that modified program into new proto boards

    Would it be possible to make a version of the program that reads the sensors and outputs the data somehow so that you could manually insert the modified values into the Spin source code?· It seems like that would be a lot more convenient long-term.
  • mikedivmikediv Posts: 825
    edited 2009-09-26 19:40
    Thanks guys for the info. I should explain further. I am sure you are all onto something with your suggestions unfortunately most of that would be way past my level of experience with programing even this little piece of code I wrote in spin that I am referring to is embarrassingly simple. I can figure out basics in spin like where the clock code is maybe even some of the I/O statements and a loop or two but to write something that would intercept the code being loaded into eeprom and move it would be very difficult.

    localroger, I may just have to look into doing that but to be honest I thought it would be fairly easy to save a bin of the eeprom I did not foresee the complexity.
    Holly that is not a bad idea I am very familiar with using sniffers I never thought about trying to capture the data like that . I still think this Ham program is greatly under used it seems ot me that it has so much potential I am really surprised everyone is not using it to some degree.
    For the time being I am going to expend some effort on trying to get Ham to work you guys should try it out
    Thanks guys
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-27 02:37
    mikediv,

    Try the attached. I think it will do what you want. It will even adjust the checksum to accommodate any data that you've stored in EEPROM. But, best of all, it doesn't require any of that bloated .NET nonsense to run! smile.gif

    Please let me know how it works out for you.

    -Phil

    Note to developers: If your apps require .NET to run, please consider switching to a different development platform. You're doing your users an extreme disservice by requiring it, and there are plenty of free alternatives that are at least as functional. I prefer Perl, but other choices abound in profusion. Thanks.

    Update: The original program wasn't deleting all of its temporary files, especially when interrupted. This has been fixed, and SIGs are now being trapped for a more graceful exit.

    Post Edited (Phil Pilgrim (PhiPi)) : 9/27/2009 5:02:54 AM GMT
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-09-27 14:46
    @kuroneko

    Thanks for posting that! I hadn't had a chance to pull the hard drive out of my old machine
    and run down the changes. That sounds exactly like what I did to get HAM running over here.

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Visit the: The Propeller Pages @ Warranty Void.
  • KyeKye Posts: 2,200
    edited 2009-09-27 14:59
    Parallax should add this to their downloads page.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • mikedivmikediv Posts: 825
    edited 2009-09-27 21:42
    Phil your the man,,lol,, between you rayman, jazzed, heater, clusso, Bill H forgive me if I have forget to mention you by name there are so many of you .. I should put you guys on my pay role .. Thank you very much everyone Phil this did the trick

    But I still think everyone should take a look at Ham its a heck of a program
  • jazzedjazzed Posts: 11,803
    edited 2009-09-27 21:55
    @Phil, Perhaps you can contribute a GUI to the test fest thread.
    Also, I would like to know how many users can successfully run the upload program.
    Works for me after removing one of my com ports.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-27 22:36
    Steve,

    What features would you want in a GUI? I could do it, but it would become more heavyweight as a result. Did you have a Prop connected to more than one com port? The unload program is not fussy about which one it chooses. I could add a port parameter to the command line if it's a problem.

    -Phil
  • jazzedjazzed Posts: 11,803
    edited 2009-09-27 23:09
    Phil Pilgrim (PhiPi) said...
    Steve,

    What features would you want in a GUI? I could do it, but it would become more heavyweight as a result. Did you have a Prop connected to more than one com port? The unload program is not fussy about which one it chooses. I could add a port parameter to the command line if it's a problem.

    -Phil

    Phil, the link is here: http://forums.parallax.com/showthread.php?p=841845

    The goal: compare the same simple GUI application and user experience for platforms produced by different development environments. So far we have comparable entries for Java, Python PyQT, and PBasic. Pending are C++Qt and C++wxWidgets. Someone mentioned Perl and I thought you might show up at some point. Would be nice if you do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Propeller Tools
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-09-28 00:04
    Steve,

    How did I miss that thread?!! (Maybe I saw the ".net" in the title and just drove by. smile.gif ) Okay GUI coming up.

    -Phil
Sign In or Register to comment.