Shop OBEX P1 Docs P2 Docs Learn Events
what kinds of information can you store in a eeprom? — Parallax Forums

what kinds of information can you store in a eeprom?

paulm81paulm81 Posts: 7
edited 2009-09-30 03:19 in BASIC Stamp
What·kind of data you save to a eeprom.

Comments

  • SRLMSRLM Posts: 5,045
    edited 2009-09-29 06:04
    Theoretically, you can store any kind of data that you want. An EEPROM is no different (at a high level) than your computer hard disk. Practically, however, the EEPROM has much more limited memory so you won't be storing Independence Day on it.
  • dev/nulldev/null Posts: 381
    edited 2009-09-29 07:12
    An EEEPROM is a raw data device. It does not have any data types, like you find in PBASIC. It will just store whatever bit sequence you send, and return the same. So if you have HEX or DEC or STR formatted data, the EEPROM won't care. It will store what you send to it, and return exactly the same.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • IroneIrone Posts: 116
    edited 2009-09-29 09:27
    Ones and zeros. All you have are a bunch of transistors. They can be turned on or off. There are programs that make sense of how they are turned on, but you only store whether a transistor is on or off.
  • dev/nulldev/null Posts: 381
    edited 2009-09-29 14:30
    Like Irone says, an EEPROM is a raw data device. That means that it doesn't support data types, and will store whatever you send to it as it is sent (ones and zeroes).

    In PBASIC, you can format a byte as different data types with the DEC, BIN, HEX, and STR directives.

    Another way of saying this is that the EEPROM only supports byte data. You can store any number or character in the EEPROM. You can also store strings, but then you have to send each character to it in sequence.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • paulm81paulm81 Posts: 7
    edited 2009-09-29 20:31
    okay I think I understand. So you cant save small *.bs2 programs in the eeprom to call apon randomly?
  • SRLMSRLM Posts: 5,045
    edited 2009-09-29 20:43
    Sure, you can save your programs to EEPROM. There are a couple of caveats though. First, the program must be tokenized. Second, you'll need some way of returning control to the main program that is calling these smaller programs. Third, you'll need to have some sort of table or something so that you can locate these programs. Fourth, you'll to make a compromise between the size of the "small" programs and you management program. I don't think this will be an easy project.
  • paulm81paulm81 Posts: 7
    edited 2009-09-29 22:14
    Okay when you want to store a program that has ben tokenized. How do you send it to the eeprom when your dealing with vista. I cant use any of the old serial dos tools. I was thinking of using two bs2. One will always have the master program running? I have a bs2p 40 and two bs2. I was wanting to try to create a small program library on a eeprom.
  • SRLMSRLM Posts: 5,045
    edited 2009-09-29 22:44
    Probably the easiest way would be to buy a EEPROM programmer from somewhere. Otherwise, you could write a program on the BS2 that simply receives data from the computer and transfers it to the EEPROM. Note that most EEPROMs use the I2C protocol. A bit of clarification here: I have been thinking about external EEPROMs, rather than the internal BS2 EEPROM.
  • paulm81paulm81 Posts: 7
    edited 2009-09-29 23:00
    I was thinking the same thing external eeprom. In actuality an eeprom would not understand that it contains a bs2 program. It would only understand that it has a string of binary data that constitutes a bs2 file?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-30 03:19
    You're correct. An external EEPROM would not understand that it contains a BS2 program. What you can do is to make a copy of what would be in the BS2's EEPROM, but in an external EEPROM. It turns out that you would have to copy it to the BS2's EEPROM to execute it. This is hard to do on the BS2 since there has to be a program already on the BS2 that does the copying. It works better on the other BS2 models (BS2p/pe/px) that have multiple 2K program slots. These can execute a program in one slot while reading and writing information in any of the other slots. It's a slow process (5-10ms per byte) to write information to any EEPROM including the BS2's EEPROM, but it does work.
Sign In or Register to comment.