Shop OBEX P1 Docs P2 Docs Learn Events
External Code Execution??? — Parallax Forums

External Code Execution???

andrew1232333andrew1232333 Posts: 2
edited 2009-04-22 13:45 in General Discussion
Does anyone know how or if it is possible to read code from say an eeprom and then execute it on a sx28 any help would be useful im pretty new and could use some help.

Comments

  • JonnyMacJonnyMac Posts: 9,213
    edited 2009-04-22 01:15
    Not SX machine code. If the SX was programmed with a bytecode interpreter you could run those -- but then, you'd have a BASIC Stamp.
  • andrew1232333andrew1232333 Posts: 2
    edited 2009-04-22 01:29
    What about the propeller is it possible to do with that?
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2009-04-22 03:13
    If you want any kind of meaningful answer you need to provide some more specifics on what you want to do, what type of eeprom it is, and what you think the contents are.

    An eeprom could contain anything. What is the eeprom used for? Is it just a dumping ground to store data? Or, as Jon suggests would you be trying to have something execute a tokenized BASIC Stamp program? If so then you need to get a pre-programmed OEM Stamp chip from Parallax since that would have the Interpreter program already programmed in by Parallax. You would also need to ensure that the Stamp is the correct type since there are differences in what each stamp can do and the speed that they run.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2009-04-22 13:45
    The Propeller copies the contents of an external EEPROM (i.e. the program code) into its internal RAM memory when the system starts up and then runs the program by reading the internal RAM and no longer the external EEPROM.

    The SX has an internal EEPROM containing the program code, and it runs the program by reading this internal EEPROM. There are no provisions to read and execute program code from external memory. To do this at high speed, the system would need to address and read data in parallel, like microprocessors, i.e. via address and data busses.

    Nevertheless, you are free to program the SX in a way that it reads "pseudo program code" (tokens) from an extermal memory, like an EEPROM with I²C interface, and then interpret and execute such tokens.

    BTW, this is how the BASIC stamps work. You write the program on a PC where it is translated to tokens. The tokens are stored in an EEPROM on the BS, and the microcontroller on the BS reads, interprets, and executes such tokens at run-time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    Günther
Sign In or Register to comment.