Hacked Gadgets Forum

September 26, 2006

Selecting a Serial Bus

at 8:25 am. Filed under Other

There is a good article about selecting the right microcontroller serial bus in this months Electronic Products magazine. Many people are like me, they use what they know. This article has a good explanation of the differences so that we can make a better informed decision for the next product.

“At the heart of most of today’s advanced electronic products is a microcontroller that communicates with one or more peripheral devices. At one time, microcontroller periphery was memory mapped and connected to the data and address bus.

Chip-select signals were decoded from address lines to give each component its unique location in the limited address range. The access time was short, but the overhead inflated the package size and overall cost. The obvious alternative is a serial interface, and there are some options in this area.

Key differences in available serial interfaces include data rate and operating voltage. One also needs to consider:

• How the peripheral device gets selected—by a hardware chip-select line (SPI, or Microwire) or by a software protocol (1-Wire, LIN, Sensorpath, CAN, USB, FireWire, I2C, or SMBus).

• How the peripheral device stays synchronized with the microcontroller—via a hardware clock line (I2C, SMBus, SPI, or Microwire) or via self-clocking using information embedded in the data stream (1-Wire, LIN, Sensorpath, CAN, USB, or FireWire).

• Transmission by a single unterminated line (1-Wire, LIN, Sensorpath, I²C/SMBus, or SPI/Microwire) or a two-line terminated differential connection (CAN, USB, or FireWire).

The application may add further requirements such as the maximum distance between microcontroller and peripheral device, the structure of the cabling, and immunity to noise or reversal of wires. This article focuses box level interconnect methods.

What makes for a good interface?
A serial bus system for peripheral functions should not add any significant burden on the system. In particular:

• The connection must be easy to route (the fewer signals the better).

• The protocol must be easy to implement in software (or natively supported by the chosen MCU/MPU).

• There needs to be an adequate selection of device functions.

• Expansion should be easy

I2C/SMBus
If the application can support a clock line, then the choice can include I2C and SMBus. The SMBus can be regarded as a variation of the original 100-kbit/s I2C bus specification with a timeout feature added. This timeout prevents the bus from becoming inoperable from a node that lost synchronization with the bus driver; an I²C system requires a power-on reset to recover from this situation.

Besides the clock line, I2C/SMBus uses an acknowledge bit for every byte sent. Transactions begin with a start condition followed by a device address and a data-direction bit and end with a stop condition.

SPI/Microwire
SPI and Microwire, a subset of SPI, require an additional chip-select line for each device. Due to the chip-select signal, the SPI protocol only defines commands such as read and write for memory addresses and the status register. It does not use an acknowledge function.

Typically, SPI devices have different pins for data input and data output. Since the data output is tri-stated (disabled) for anything except read functions, the two data pins may be tied together to form a single bidirectional data line. SPI is often chosen for special functions that only it furnishes and/or for its high data rate, which may be 2 Mbits/s or higher.

1-Wire, LIN, and Sensorpath
There are significant advantages to buses requiring only a single data wire such as 1-Wire, LINbus, and Sensorpath. Table 1 shows some further details.

In 1-Wire systems, the Reset/Presence detect cycle resets the communication interface to a defined starting condition.Also, transactions begin after requirements of the network layer are met (that is, selecting a particular device, search ROM, or broadcast); then data begins with a device-specific command code, which also affects the data direction.

The simple interface makes 1-Wire devices one of the best choices for functions such as identification and authentication of circuit boards/accessories, temperature sensors, and actuators. Further, 1-Wire devices with secure memory and challenge-and-response functionality provide two-way authentication and protect intellectual property.”


 


Related Posts

PIC based Serial Controlled RGB LED PWM Driver
Accessing serial console on the Fon
Tiny PC
iButton Electronic Lock
Temperature Logger using DS1820 and PIC 16L84 Microcontroller
RFID Front Door Lock
Rand McNally GPS Hack
Wind Gauge

 


 

One Response to “Selecting a Serial Bus”

  1. gps data logger Says:

    gps data logger

    Hi. Thanks for the good read.

Leave a Reply

 

Internal Links:


Categories:

Search:

Google
Hacked Gadgets
Web

Site Sponsors:

 

Recent Comments:

Alan Parekh on Name the Thing Contest - 63

kayne001 on Name the Thing Contest - 63

Berni on Name the Thing Contest - 63

Dom on Top 5 Coil Guns

Lucas Jeorgensen on Top 5 Coil Guns

joey on Air Powered Engines

Alan Parekh on Name the Thing Contest - 63

Alan Parekh on Name the Thing Contest - 63

Lego Motorcycle Model Fat Boy Drives Like a Real One | Walyou on Lego 8291 Fat Boy Motorcycle

ingiltere vizesi on Hacked Gadgets March Comment Contest

Berni on Name the Thing Contest - 63

Jonathan on IR LEDs used to defeat Security Cameras

Curtisbeef on Digital Caliper Serial Interface

Tony on Tachometer made from a Bicycle Computer

Kevin Luo on Interactive Dance Floor

Site Rating:

Technology blogs

Technology Blogs - Blog Flare

Technology Blogs - Blog Top Sites

Top Technology blogs

Technology Blogs

Best blogs on Technology and Science

More RSS Feed Options

Most Popular This Month:

Hacked Coke Machines
Hacked Ikea LED Mood Lamp
Rechargeable USB Battery
R/C Beetle Battle
Micro Mosquito Helicopter by Interactive Toy Concepts
Exploding Motherboards with 240 Volts
Pop Can Art
Homemade Flight Simulator
The Remember Ring
Sony Hyper Dragging Desktop

Site Sponsors:

 

Interesting Sites:

Sony Vaio SZ
ThinkGeek
Apple TV Hacks
Gadget India
Top HDTV Reviews
VoIP Phone
Technology Blog
Free Phone Number Trace
How To Hack
PSP Mods and Hacks

 

Site Videos:

Incoming Links:

Recent Readers:

Forum Activity:

Get this widget!