27220 Parallax Inc, 27220 Datasheet - Page 189

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
EXPERIMENT #32: I2C COMMUNICATIONS
This experiment demonstrates the BASIC Stamp’s ability to communicate with other
devices through the use of the popular Philips I2C protocol. The experiment uses
this protocol to write and read data to a serial EEPROM using high- and low-level I2C
routines which can be used to communicate with any I2C device.
Building the Circuit
Program: SW21-EX32-24LC32.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Program Description ]---------------------------------------------
'
' This program demonstrates essential I2C interfacing by connecting to
' a 24LC32 EEPROM.
' I2CIN and I2COUT instructions.
' -----[ I/O Definitions ]-------------------------------------------------
SDA
SCL
' -----[ Constants ]-------------------------------------------------------
PIN
PIN
The connections in the program conform to the BS2p
8
9
' I2C serial data line
' I2C serial clock line

Related parts for 27220