Posted: 05:18pm 14 Apr 2026
Copy link to clipboard |
DigitalDreams Regular Member

|
|
|
My next challenge is to save signed integers to an I2c memory chip. They will only range from say -300 to +900 so will be saving as two bytes (high and low) as if a 16bit integer, not the incoming MMBasic 64bit.
For example -
Dim as integer Xmin,Dhi,Dlo Xmin=-298 ... ... I2c write &h50,0,4,1,0,Dhi,Dlo
I'm already writing small positive MMBasic 64bit integers as single bytes as MMBasic converts/truncates to 8bit in the i2c command itself.
Wondering what the fastest and most efficient way would be to do this ? |