ECN Asia
  Mark as your homepage Bookmark us Print Subscription
               
Saturday, August 30, 2008
Home About Us Current Issue Archive RSS Free Subscription Trade Shows Media Kit Contact Us

Boards & Modules

Computers, Peripherals & Networking Devices

Digital Den

Electromechanical/Mechanical Devices

Embedded Systems & Networking

Integrated Circuits & Semiconductors

Microwave & RF Components

Optoelectronics & Displays

Packaging & Interconnects

Passive & Discrete Components

Power Sources & Conditioning Devices

Sensors & Actuators

Software

Test & Measurement

Search:
 
  Advanced Search
Product Info Search:
 
     
 
 
 
Issue > Oct 2007 > Cover Story
 
 
Ads by Google
 

Serial buses free I/O pins


( 01 Oct 2007 )

by Jon Titus, Senior Technical Editor, ECN

More times than designers might like to admit, they wish for just one more I/O pin on a microcontroller. Three chip-to-chip serial buses can help overcome I/O pin limits. The following information provides a quick overview and points you to sources of more information.



I SPY SPI

The Serial Peripheral Interface (SPI) provides basic communication between a master and one or more slave devices through synchronous-serial communications. The master initiates all communications with slaves and provides the clock signal that governs the bit rate. The SPI offers no high-level protocol, so communications between a master, say a microcontroller, and a peripheral, such as an ADC or a codec, do not require time for housekeeping tasks. The lack of a protocol means SPI-chip vendors come up with their own bit and byte arrangements. The simplest SPI interface requires three signal lines (clock, master-in slave-out and master-out slave-in) and ground.



SPI communications occur a byte at a time but lack an automatic acknowledgement of the receipt of data by a slave device. Also, communications cannot address a specific SPI chip, so each SPI slave must provide an active-low chip-select (/CS) input pin. The master selects a slave device by driving its individual /CS pin to a logic 0. If you have only one SPI slave, you could hardwire the chip-select pin to ground (and save an I/O pin); although an ADC, for example, might use the leading edge of the /CS signal to start a conversion.



SPI devices can quickly use up I/O pins needed to produce /CS signals. If you have more than three SPI devices, consider using a 3-line to 8-line decoder/demultiplexer to generate a /CS signal for as many as eight SPI devices from three or four I/O pins on the master. You also can use an SPI chip such as the Maxim MAX7317 to add 10 general-purpose I/O pins to a circuit.

SERIAL BUS GOES SQUARE

The Inter IC (I2C) communication link, developed by Philips Semiconductors in the 1980s, requires two bidirectional signal lines, one for a clock and another for data, plus ground. Unlike and SPI link, an I2C connection can include more than one controlling device in a multimaster configuration. Peripheral devices include real-time clocks, memories, LCD drivers and analog converters.



All I2C devices have preset unique addresses, so they require no chip-select lines. Manufacturers of I2C I/O devices may include programming pins that allow several of the same devices to operate on an I2C bus. The Analog Devices AD7991, a 2-channel 12-bit ADC, lets developers use as many as five of these chips on an I2C bus. To start, a committee assigned chip manufacturers unique 7-bit device addresses, which quickly ran out. The I2C specification now accommodates 10-bit addresses and engineers can mix chips with a 7- or a 10-bit address on an I2C bus.



Communications occur at one of three speeds, 100Kbps (standard), 400Kbps (fast), or up to 3.4Mbps (high speed). A maximum wire capacitance of 400pF limits the length of I2C communications, although companies offer bus extenders and repeaters. NXP Semiconductor, for example, offers 20 such ICs.



Unlike SPI slaves, the I2C protocol includes an acknowledgment. The wired-AND nature of the signal lines lets a receiving device pull the data line low for one clock period to acknowledge receipt of each byte. The I2C specification does not include error correction, although software can implement that capability.



1-WIRE BUS TAKES TWO

The proprietary 1-Wire technology from Dallas Semiconductor uses one wire for communications and power. (You need a ground wire, too.) Communications involve a master and one or more slave devices, such as sensors, EPROMs, and battery monitors. Asynchronous communications use carefully timed pulse-widths to represent data. A logic-1 condition pulls the data line low for 15µs or less and a logic 0 pulls the line low for at least 60µs (Peripherals can pull small amounts of power from the communication line when it is idle.)



Each 1-Wire device comes with a unique 64-bit ID number that supplies an 8-bit device-type identifier, a 48-bit address and an 8-bit CRC value. The 48-bit address ensures no conflict along devices on a 1-Wire line. Software in the master can discover the device types and their serial numbers. Dallas Semiconductor – part of Maxim Integrated Products – produces many 1-Wire devices. But as far as I know, no other manufacturer offers 1-Wire chips.



For further reading

“Overview of 1-Wire Technology and Its User,” Applcation Note 1796. Maxim Integrated Products. www.maxim-ic.com/appnotes.cfm/appnote_number/1796



“SPI Block Guide (V03.6),” Document Number S12SPIV3/D www.freesacale.com/files/microcontrollers/doc/ref_manual/SP12SPIV3.pdf



“The I2C Bus Specification,” Version 2.1, January 2000. NXP Semiconductor www.nxp.com/acrobat_download/literature/9398/39340011.pdf





Click here for Illustrations:



Figure 1

 

 
 
 
ADVERTISEMENT
 
 
 
Ads by Google
 
OUR SPONSOR
   
   
 
 
 
   
   
     
 
 
         
     
 
Related Articles
   
DVB cores for low-cost FPGA
Single-chip laser navigation system simplify mouse design, manufacturing
Has optical technology’s 13-year victory over Moore’s Law come to an end?
Low power platform meets next-generation multimedia apps
Ethernet switch enables auto-sensing
Development tool for 8- and 32-bit microcontrollers
Audio processor for mobile phones
SPICE-simulation tool suite features enhanced PWL
Tool kit for innovative SoC designs
Design suite offers breakthrough improvements in productivity
   
 
Product News
   
B&K Precision Introduces Compact Switching DC Power Supply
APEM Offers LPI Series ADA Compliant Pushbutton Switch
ESI Provides Optical Positioning System Featuring Zero Translation
Yaskawa's J1000 Drive with 1/8-7.5 hp
Sonar Transducer for Level Control from Hawk
Hoffer's HRT1 Rate Indicator/Totalizer
ASI Offers Spring Clamp Terminal Blocks
AAEON Releases Fanless Operator Panel PC-AOP-8120XT
SV Series Servo Drives from Applied Motion
Fairchild Introduces Voltage Translator for I2C Applications
   
  More News >>
 
     
     
 
         
 
 
     
         
 
spacer
Country Report
spacer
   
bullet

TAIWAN: Inductor technologies are developed independently

bullet

KOREA: Inductor manufacturers are highly competitive, but scarce

bullet

CHINA: World’s high-volume producer of transformer, coil and inductor

bullet

TAIWAN: Moderate but steady growth in LED market

bullet

KOREA: LED has a bright future in our homes

  more on country report >>
   
 
spacer
Our Sponsor
spacer
   
bullet
 
   
 
     
 
     
 
spacer
Features
spacer
   
bullet

DDR memories: Comparison and overview

bullet

Miniaturization in synchronous buck DC/DC applications employing DrMOS

bullet

SoC microcontrollers power portable medical device innovation

bullet

Part three: ESD protection

bullet

Switching power supplies go green

  more on features >>
   
 
Distribution
   

Value addition is the key in distribution

Distributors supply solutions, not just parts

Taiwan distributors compete by bolstering in-house R&D

“Nature of distribution is changing”

Top supply chain predictions in Asia Pacific for 2008

  more on distribution >>
   
 
     
         
 
 
     
         
 
Industry Focus
   

Ethernet adoption encourages open protocols

Managing Bluetooth profiles: A billion served

Enabling a true wireless multimedia home network

Bluetooth paves the way for truly wireless car interiors

Eliminating massive clock trees in SoC designs using GALS

  more on industry focus >>
   
 
Web Exclusives
   

Power-management solutions for telecom systems improve performance, cost, and size

Changing the network security playing field

WiMAX “personality pack” provides complete IEEE802.16 functionality

LED: A tiny light source with a bright future

SSDs: Carving a Niche in the Consumer and Enterprise Markets

  more on web exclusives >>
   
 
     
     
   
     
 
Semiconductors
   

Simulating the effect of blockers on data converter performance in wideband receivers

Decrease processor power consumption using a CPLD

Taking full advantage of new, low-power MCUs

Power train integration for 2007 and beyond: The true dawn of multi-chip modules

Wireless network options for industrial applications

  more on semiconductors >>
   
 
Field Applications
   

Test Equipment

Power Sources/Circuit Protection

Advanced Signal Processing Dramatically Improves Capability of Artificial Limbs

Voice Interface Technology for Hands-free Function in Automobiles

LXI: A Technology Leap for Test Instrumentation

  more on field applications >>
   
 
     
     
   
     
     
 
INDUSTRY LINKS
   
Photonics Association (Singapore)
bullet Singapore Industrial Automation Association (SIAA)