27220 Parallax Inc, 27220 Datasheet - Page 190

BOOK STAMPWORKS

27220

Manufacturer Part Number
27220
Description
BOOK STAMPWORKS
Manufacturer
Parallax Inc
Datasheet

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
Ack
Nak
EE24LC32
' -----[ Variables ]-------------------------------------------------------
slvAddr
devNum
addrLen
wrdAddr
i2cData
i2cWork
i2cAck
test
outVal
inVal
fails
' -----[ Initialization ]--------------------------------------------------
Reset:
Setup:
' -----[ Program Code ]----------------------------------------------------
Main:
#IF ($STAMP >= BS2P) #THEN
#ENDIF
devNum = %000
slvAddr = EE24LC32 | (devNum << 1)
addrLen = 2
DEBUG CLS,
fails = 0
FOR wrdAddr = 0 TO 4095
#ERROR "Please use BS2p version: SW21-EX32-24LC32.BSP"
DEBUG CRSRXY, 11, 2, DEC4 wrdAddr
"24LC32 Demo
"---------------", CR,
"Address...
"Output....
"Input.....
"Status....
"Errors....
CON
CON
CON
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
VAR
0
1
%1010 << 4
Byte
Nib
Nib
Word
Byte
Byte
Bit
Nib
Byte
Byte
Word
", CR,
", CR,
", CR,
", CR,
", CR,
"
' acknowledge bit
' no ack bit
' device ID
' I2C slave address
' device number (0 - 7)
' bytes in word addr (0 - 2)
' word address
' data to/from device
' work byte for TX routine
' Ack bit from device
' chip select (%000 - %111)
' setup slave ID
' 2 bytes in word address
' test all locations

Related parts for 27220