Convert small 64bit signed integer into a high and low byte ?


Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3273
Posted: 08:42am 16 Apr 2026      

It appears you can trim some time off, depending on the chip.

> d$ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345" '32 bytes
> d$= bin2str$(uint16,48,big)+d$
> i2c2 write &H57,0,len(d$),d$ :t=timer :do :i2c2 read &H57,0,26,d$ :loop until MM.I2C=0 :t= timer-t :?t
2.379
> i2c2 write &H57,0,len(d$),d$ :t=timer :do :i2c2 read &H57,0,26,d$ :loop until MM.I2C=0 :t= timer-t :?t
2.372
>