Shop OBEX P1 Docs P2 Docs Learn Events
Largest size Variable Array the Propeller can handle? — Parallax Forums

Largest size Variable Array the Propeller can handle?

xanatosxanatos Posts: 1,120
edited 2013-06-16 19:41 in Propeller 1
I'm using i2cdriver from the OBEX and I see this line:

I2C.Read_page(I2C#EEPROM,$0123,@Array,500) Read 500 bytes from an EEPROM starting at address $0123 and store each byte in Array

This would be useful to me... and it got me wondering how big that array can be... could it be 1280 by any chance? And how can this information be determined by someone such as myself who doesn't even know what to look at to figure this out :-)

Thanks,

Dave

Comments

  • AribaAriba Posts: 2,690
    edited 2013-06-16 19:09
    The limit is the 32kB of hubram. All code and data must fit into these 32kB Ram.
    If you have only a little bit of code you can define a byte array of about 32700 bytes.

    The compiler will tell you when code+data not fits in hubram. So just try how far you can go before you get an error. Or press F8 (view info) and you get an Info-window which tells you how many longs are free. One long = 4 bytes.

    1280 bytes should not be a problem, if you not have some big video buffers reserved.

    Andy
  • xanatosxanatos Posts: 1,120
    edited 2013-06-16 19:41
    Muchas Gracias! I was hoping to hear that! 1280 bytes in an array... now I'm starting to feel the difference in power between the Propeller and the Stamps!

    Thanks,

    Dave
Sign In or Register to comment.