没有合适的资源?快使用搜索试试~ 我知道了~
Implementing SMBus using MSP430 Hardware I2C
需积分: 9 0 下载量 179 浏览量
2020-03-31
09:36:07
上传
评论
收藏 59KB PDF 举报
温馨提示
This application report describes the implementation of the system management bus (SMBus) using the MSP430 hardware I2C peripheral. SMBus is used as a communication link for smart batteries, power related devices and a wide variety of other system devices. This report includes the support for master and slave protocols in a SMBus communication system.
资源推荐
资源详情
资源评论
1.1 Introduction
1.2 SMBus Protocols
SLAA249 – April 2005
Implementing SMBus using MSP430 Hardware I2C
Harman Grewal ................................................................................................................. MSP430
This application report describes the implementation of the system management bus
(SMBus) using the MSP430 hardware I2C peripheral. SMBus is used as a communi-
cation link for smart batteries, power related devices and a wide variety of other system
devices. This report includes the support for master and slave protocols in a SMBus
communication system.
SMBus is a two-wire serial interface based on the principles of I
2
C. The two lines are serial clock (SCL)
and serial data (SDA) which are tied to V
CC
using pull-up resistors. The devices communicating on this
bus can drive the lines low or release them to high impedance. This connection is a wired-AND
configuration. Multiple I
2
C/SMBus devices can be connected on the bus, but MSP430 pins should not be
pulled above V
CC
. For example, if the V
CC
of the MSP430 is at 3V, then all devices on the bus must be
pulled up to only 3V.
A device performing data transfers on the bus can be considered as a master or a slave. Each master and
slave device can either be a transmitter (send data) or a receiver (receive data), and the communication
on the bus is always initiated by the master by providing a valid start condition and the SCL signal.
Multiple master and slave devices may be connected on the bus, but only one device may master the bus
during a data transfer. Since more than one master may simultaneously attempt to take control of the bus
and start a transmission, the I
2
C/SMBus protocol provides an arbitration mechanism which relies on the
wired-AND connection of all devices to the bus. A master device that generates a logic high on the SDA
bus loses arbitration to a master that generates a logic low on the data bus. The MSP430 master
transmitter that loses arbitration switches to slave receiver mode and sets the arbitration lost flag, ALIFG
[1]. Each device on the bus has a unique 7-bit address, which allows a total of 128 devices to be
connected on the bus. Some addresses are dedicated SMBus addresses which are reserved and must
not be assigned to any SMBus device. For instance the SMBus Alert response address (0001 100b) [2].
The different communication protocols can be found in the System Management Bus specification [2]. The
communication always begins with a valid start condition from the master followed by a 7-bit slave
address and the read/write bit which defines the master as a receiver /transmitter respectively, except in
the quick command protocol. In quick command protocol, the read/write bit is used to turn a device on/off
or enable/disable a low power mode. The read/write bit is followed by an Acknowledge from the slave.
This is followed by 8-bit transfers which may be data, command or Packet Error Check (PEC). An
acknowledge is sent by the receiver after each byte is received. To end the transfer, a valid stop condition
is initiated by the master.
The SMBus standard introduced the Packet Error Checking (PEC) mechanism to improve communication
reliability. The PEC is a CRC-8 error check byte, calculated on all message bytes except the ACK, NACK,
START and STOP bits. The PEC is added to the message by the transmitter. The PEC in this application
report is calculated using a cyclic redundancy check (CRC-8) polynomial, C(x) = x
8
+ x
2
+ x
1
+ 1 and is
calculated bit by bit in the order of bits received. Refer to SMBus specification for details on the PEC.
Implementing SMBus using MSP430 Hardware I
2
CSLAA249 – April 2005 1
资源评论
gj_john_dx
- 粉丝: 0
- 资源: 25
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功