No problem, we all like to help here

And thanks to Pupil also, now i can add another chip to my RAIDmonitor program

Regards,
Berikco
http://www.benny.zeb.be
Code: Select all
;I am not sure if the following four lines are really needed.
WriteIoPortByte($2E,$87)
WriteIoPortByte($2E,$01)
WriteIoPortByte($2E,$55)
WriteIoPortByte($2E,$55)
WriteIoPortByte($2E,$20)
SensorChipID.l = ReadIOPortByte($2F) & $FF
WriteIoPortByte($2E,$21)
SensorChipID = (SensorChipID << 8) | (ReadIOPortByte($2F) & $FF)
Debug Hex(SensorChipID)
;Switch to the sensor logical device
WriteIoPortByte($2E,7)
WriteIoPortByte($2F,4)
;Get the IO base address
WriteIoPortByte($2E,$60)
tmp.l = ReadIOPortByte($2F) & $FF
WriteIoPortByte($2E,$61)
tmp = (tmp << 8) | (ReadIOPortByte($2F) & $FF)
Debug Hex(tmp)
;Check the activation register and base address
WriteIoPortByte($2E,$30)
tmp1.l = ReadIOPortByte($2F) & $FF
If tmp1 & 1 = 0
If tmp
Debug "address " + Str(tmp) + ", but not activated"
Else
Debug "not activated"
EndIf
EndIf
If tmp = 0
Debug "no address specified"
Else
Debug "SUCCESS"
EndIf