Shop OBEX P1 Docs P2 Docs Learn Events
speed difference between reading EEPROM and SPRAM — Parallax Forums

speed difference between reading EEPROM and SPRAM

davejamesdavejames Posts: 4,047
edited 2012-11-13 11:41 in BASIC Stamp
Hi All,

Does anyone know what (if any) speed difference exists between reading a byte value from EEPROM and reading a byte value from SPRAM when using a BS2pe?

I've checked Mr. Allen's EME site, and it does not discuss this topic.


Thanks much.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-11-13 10:21
    I imagine that this has just not been measured. Given the mechanisms involved, I suspect that reading from SPRAM is somewhat faster than reading from EEPROM, but there shouldn't be a huge difference since most of the time is spent in overhead costs ... getting the parameters, setting up the operation, etc. and little of the time is spent in the actual read operation. SPRAM is built into the interpreter chip and the actual read (and write) would be as fast as most other internal operations. EEPROM, on the other hand, is external to the microprocessor and is accessed via I2C which operates at about 100KHz or slower. Initial setup takes about 4 bytes before any reading takes place. At 9 bits per byte, that's a minimum of 36 bits ... about 360us minimum before anything is read. For write operations, the EEPROM write time has to be accounted for. This can be as much as 10ms. For the BS2pe, the built-in I2C operations would give you an idea of the approximate times involved for EEPROM access.
  • davejamesdavejames Posts: 4,047
    edited 2012-11-13 11:41
    ...roger - thanks.
Sign In or Register to comment.