Hi,
I went back to 'GO' and checked the Magmaster PCB for anything iron, and all of the PINS I've been using are steel, plus 1x switch. I've just removed all of them, and will connect another way.
How is this for SELF TEST MODE?
C.
___________________________________________________________________________________
'SELF TEST'+++++++++++++++++++++++++++++++++++++++++++
SPICSOn
compss = 0 'CHIP SELECT COMPASS ON
SPISend 0x0a 'CONFIG CNTL1
SPISend 0x00 'POWER DOWN
SPISend 0x0c 'ASTC
SPISend 0x40 'SELF BIT= 1
SPISend 0x0a 'CONFIG CNTL1
SPISend 0x08 'SELF TEST MODE
SPISend 0x89 'ST1 0x09
SPIReceive drdy
drdy = 1 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
While drdy = 0
Wend
SPISend 0x0c 'ASTC
SPISend 0x00 'SELF BIT= 0
SPISend 0x0a 'CONFIG CNTL1
SPISend 0x00 'POWER DOWN
compss = 1 'CHIP SELECT COMPASS OFF
SPICSOff
For i = 0 To 5
compss = 0 'CHIP SELECT COMPASS ON
addr = 82 + 1
SPISend addr
SPIReceive data
b(i) = data
compss = 1 'CHIP SELECT COMPASS OFF
Next i
x_raw.LB = b(0) 'BYTE
x_raw.HB = b(1) 'BYTE
y_raw.LB = b(2)
y_raw.HB = b(3)
z_raw.LB = b(4)
z_raw.HB = b(5)
Hseropen 9600 'After initialisation'??????????????????????????????????
Hserout "Ready!", CrLf
Hserout "SELF TEST ", #x_raw.LB, " ", #x_raw.HB, " ", #y_raw.LB, " ", #y_raw.HB, " ", #z_raw.LB, " ", #z_raw.HB, CrLf
'END SELF TEST'++++++++++++++++++++++++++++++++++++++
____________________________________________________________________________________________________________________________________