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


Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11447
Posted: 08:29am 17 Apr 2026      

  Quote  his line, instead of a Pause...
Do :I2C2 read I2C.addr,0,1,Re$:Loop Until MM.I2C<>1
will let the chip take as much time as it needs but no more.

This is a bad idea. This could wait for the default I2C timer to expire (1 second) before returning depending on what the device does with the early request.
If you have a device that needs a 5mSec wait then you need to wait 5mSec. The way to do this without blocking would be a settick callback timer
Edited 2026-04-17 18:32 by matherp