LBHB has nothing to do with azi.lb which the master tries to read.Hi J,
I'm not sure what you mean, but I added LBHB = 5 after the DIM, and nothing changed.
C.
slave:
lbhb = SSPBUF
If lbhb = 5 Then
SSPBUF = azi.LB' this value is read by the master and is zero
Else
Goto loop
Endif
master:
SPISend lbhb
WaitMs 100
SPIReceive azi. LB ' <---- azi.LB is 0
Hserout "AZI.LB ", #azi.LB, CrLf