Download Print this page

Parallax TSL1401-DB Instructions Manual page 48

Linescan camera module

Advertisement

' -----[ Program Code ]----------------------------------------------------
' Your program code goes here.
END
' -----[ Subroutines ]-----------------------------------------------------
' -----[ Ready ]-----------------------------------------------------------
' Wait for the driver to become not busy.
Ready:
DO
OWIN owio, 4, [busy]
LOOP WHILE busy
RETURN
' -----[ GetError ]--------------------------------------------------------
' Read the error flags from the driver.
GetError:
OWOUT owio, 0, [DUMPFLAGS]
OWIN owio, 0, [flags]
IF (flags = $FF) THEN
OWOUT owio, 1, [DUMPFLAGS] 'So reset and try again.
OWIN owio, 0, [flags]
ENDIF
RETURN
© Bueno Systems, Inc. • TSL1401-DB (2009.10.01)
'Read busy bit.
'Keep checking until it goes low.
'Read the error flags.
'If $FF, driver is waiting for a reset.
Page 48 of 52

Advertisement

loading