28560 Parallax Inc, 28560 Datasheet - Page 17

Interface Modules & Development Tools Mouse Sensor Kit

28560

Manufacturer Part Number
28560
Description
Interface Modules & Development Tools Mouse Sensor Kit
Manufacturer
Parallax Inc
Datasheet

Specifications of 28560

Interface Type
Serial
Operating Supply Voltage
5 V
Product
Interface Modules
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
WriteAddr:
' WriteAddr writes data to a sensor chip register.
'
'
WriteNeg:
' WriteNeg simulates the SHIFTOUT instruction, but with a
' negative-going (inverted) clock.
'
ReadNeg:
' ReadNeg simulates the SHIFTIN instruction, but with a
' negative-going (inverted) clock.
'
Copyright © Parallax Inc.
#ELSE
#ENDIF
RETURN
#IF (NEG_CLK) #THEN
#ELSE
#ENDIF
RETURN
OUTPUT sdio
FOR i = 0 TO 7
NEXT
INPUT sdio
RETURN
FOR i = 0 TO 7
NEXT
RETURN
sd = addr
GOSUB WriteNeg
GOSUB ReadNeg
SHIFTOUT sdio, sclk, MSBFIRST, [addr\8]
INPUT sdio
SHIFTIN sdio, sclk, MSBPOST, [dat\8]
Inputs:
sd = addr | $80
GOSUB WriteNeg
sd = dat
GOSUB WriteNeg
SHIFTOUT sdio, sclk, MSBFIRST, [addr|$80\8, dat\8]
Inputs: sd = data to write, MSB first.
sdio = sd.BIT7
PULSOUT sclk, 25
sd = sd << 1
Outputs: dat = data read from serial bus, MSB first.
dat = dat << 1
PULSOUT sclk, 25
dat.BIT0 = sdio
addr = address ($00 - $7F) to write.
dat
= data to write to the addressed register.
Mouse Sensor Kit (#28560)
v1.0 6/1/2010 Page 17 of 18

Related parts for 28560