27220 Parallax Inc, 27220 Datasheet - Page 192
27220
Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet
1.27220.pdf
(230 pages)
Specifications of 27220
Accessory Type
Booklet
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
StampWorks
Lead Free Status / RoHS Status
Lead free / RoHS Compliant, Not applicable / Not applicable
- Current page: 192 of 230
- Download datasheet (3Mb)
' Random location read
' -- pass device slave address in "slvAddr"
' -- pass bytes in word address (0, 1 or 2) in "addrLen"
' -- word address to write passed in "wrdAddr"
' -- data byte read is returned in "i2cData"
Read_Byte:
' -----[ Low Level I2C Subroutines ]---------------------------------------
' *** Start Sequence ***
I2C_Start:
Clock_Hold:
' *** Transmit Byte ***
I2C_TX_Byte:
GOSUB I2C_Start
IF (addrLen > 0) THEN
ENDIF
i2cWork = slvAddr | %00000001
GOSUB I2C_TX_Byte
GOSUB I2C_RX_Byte_Nak
GOSUB I2C_Stop
i2cData = i2cWork
RETURN
INPUT SDA
INPUT SCL
LOW SDA
DO : LOOP UNTIL (SCL = 1)
RETURN
SHIFTOUT SDA, SCL, MSBFIRST, [i2cWork\8]
SHIFTIN SDA, SCL, MSBPRE, [i2cAck\1]
RETURN
i2cWork = slvAddr & %11111110
GOSUB I2C_TX_Byte
IF (i2cAck = Nak) THEN Read_Byte
IF (addrLen = 2) THEN
ENDIF
i2cWork = wrdAddr.BYTE0
GOSUB I2C_TX_Byte
GOSUB I2C_Start
i2cWork = wrdAddr.BYTE1
GOSUB I2C_TX_Byte
' send Start
' send slave ID (write)
' wait until not busy
' send word address (1)
' send word address (0)
' send slave ID (read)
' I2C start bit sequence
' wait for clock release
' send byte to device
' get acknowledge bit
Related parts for 27220
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: