27297 Parallax Inc, 27297 Datasheet - Page 194
27297
Manufacturer Part Number
27297
Description
KIT STAMPWORKS WITH BS2-IC
Manufacturer
Parallax Inc
Datasheet
1.27297.pdf
(230 pages)
Specifications of 27297
Lead Free Status
Contains lead
Product
Microcontroller Accessories
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 194 of 230
- Download datasheet (3Mb)
The I2C specification actually allows for multiple Masters to exist on a common bus
and provides a method for arbitrating between them. That's a bit beyond the scope
of what we need to do so we're going to keep things simple. In our setup, the BS2
(or BS2e or BS2sx) will be the Master and anything connected to it will be a Slave.
You'll notice in I2C schematics that the SDA (serial data) and SCL (serial clock) lines
are pulled up to Vdd (usually through 4.7 kΩ). The specification calls for device bus
pins to be open drain. To put a high on either line, the associated bus pin is made
an input (floats) and the pull-up takes the line to Vdd. To make a line low, the bus
pin pulls it to Vss (ground).
This scheme is designed to protect devices on the bus from a short to ground. Since
neither line is driven high, there is no danger. We're going to cheat a bit. Instead of
writing code to pull a line low or release it (certainly possible – I did it), we're going
to use SHIFTOUT and SHIFTIN to move data back and forth. Using SHIFTOUT and
SHIFTIN is faster and saves precious code space. If you're concerned about a bus
short damaging the BASIC Stamp's SDA or SCL pins during SHIFTOUT and
SHIFTIN, you can protect each of them with a 220 ohm resistor. If you’re careful
with your wiring and code this won’t be necessary.
Low Level I2C Code
At its lowest level, the I2C Master needs to do four things:
A Start condition is defined as a high-to-low transition on the SDA line while the SCL
line is high. All transmissions begin with a Start condition. A Stop condition is
defined as a low-to-high transition of the SDA line while the clock line is high. A Stop
condition terminates a transfer and can be used to abort it as well.
•
•
•
•
Generate a Start condition
Transmit 8-bit data to the Slave
Receive 8-bit data from Slave – with or without Acknowledge
Generate Stop condition
Related parts for 27297
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: