Shop OBEX P1 Docs P2 Docs Learn Events
How do I load a program into a secondary EEPROM? (A0 address pin pulled high) — Parallax Forums

How do I load a program into a secondary EEPROM? (A0 address pin pulled high)

WBA ConsultingWBA Consulting Posts: 2,935
edited 2011-07-16 13:01 in Propeller 1
For my Thermistor Tester project, I utilized Mike Green's sdspiFemto to create an EEPROM Bootloader to boot from a secondary EEPROM (one with the A0 pin pulled high) if it was present. I have made a few "EEPROM Keys" for this purpose, but would like to make some full SMT versions and seal them with a potting material. This means I can't yank the DIP EEPROM out of the Key's 8 pin socket to drop into one of my M44D40+ modules to program it with the Propeller Tool. So.....

How do I load a program into an EEPROM that has the A0 address line pulled high?

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-07-15 01:31
    How about a reed switch and a magnet? The A0 could be pulled up by a resistor and the reed switch could go to ground. I don't know how small these get.

    Or even dafter, a mercury switch?? just program them upside-down.

    (I'll get back in my basket now)

    Alan.

    http://docs-europe.electrocomponents.com/webdocs/0244/0900766b80244371.pdf Some of these these are quite small.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2011-07-15 05:03
    Andrew, the thread at this link http://forums.parallax.com/showthread.php?130615-Slot-Programming-the-Propeller was inspired by your "EEPROM key" and if you don't have an aversion to Win OS and .Net there is a small EEPROM writer included that might do what you want. If you don't like DL'ing executables I could provide the source.

    Jeff T.
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-07-15 15:15
    Unsoundocde: That looks really nice, but if I am reading the readme file correctly from the zip file, it only works for loaded data into specific locations of base EEPROMs? I need to be able to do exactly that, but for an EEPROM that has A0 pin pulled high. Will that work as well? (glad something I did inspired your work, since it is now helping me!)

    Toby: Excellent idea, especially since I have a ton of these tiny reed switches and some of these with leads. I used one as a reset switch for my PlungeLogger so I wouldn't have to open the case. I'll have to figure out how to make it work with my adapter PCB I am using since the reed switch is longer.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2011-07-15 16:58
    Andrew, that is exactly right the example loads to A0 only. The application contains a Proptool binary and the Propellent dll. The Propellent dll loads and runs the binary to RAM and then the Win application transfers the required spin program as a binary serial stream.

    To work for your purpose the binary (actually the original spin file) would need to be edited to write to A1 instead of A0. So the Win program is not modified it is the embedded binary that is edited. Using RAM to run and write to the A1 EEPROM means the contents of A0 are never touched.

    I will modify a copy of the binary in case you would like to try it, if you decide on other means then nothing is lost.

    Jeff T.
  • WBA ConsultingWBA Consulting Posts: 2,935
    edited 2011-07-15 17:21
    Jeff, that makes complete sense now. I will take a look at using a reed switch tied to ground for pin A0 to magnetically change the address to a base EEPROM first, but if that doesn't work out to my liking, I will ask you to make the mod. Thanks!

    I will probably end up using your loader anyways for something else I am working on for my daughter. I have a device that can use 4 different programs and they are all small enough to fit in a single EEPROM so I just need to make a "boot select" option to pick one.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-07-16 13:01
    Andrew,

    The Propeller tool lets you choose between DTR and RTS to reset the Prop. You can use this to advantage, as in the following circuit:

    attachment.php?attachmentid=83037&d=1310846438

    When /DTR goes low and returns high, as in a normal PC-instigated reset, the main EEPROM's A0 will go low and the aux EEPROM's A0 will go high. When /RTS is low while /DTR is high, the situation will be reversed, but asynchronously, since it's connected to /PRESET. Upon power-up, the supervisor connected to /CLEAR makes sure that the startup program is loaded from the main EEPROM.

    Anyway, it's untested, but I think it would work.

    -Phil

    Addendum: Of course, a more general solution, over which you have the most behavioral control, would be to replace the ICs, transistors, and passive components in the circuit above with a single 8-pin AVR or PIC.
    493 x 480 - 5K
Sign In or Register to comment.