Enable-IT 895 Series Manual do Utilizador Página 1

Consulte online ou descarregue Manual do Utilizador para não Enable-IT 895 Series. AN-895 ADuC702x I2C® Compatible Interface Manual do Utilizador

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 16
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 0
AN-895
APPLICATION NOTE
One Technology Way P. O. Box 9106 Norwood, MA 02062-9106, U.S.A. Te l: 781.329.4700 Fax: 781.461.3113 www.analog.com
ADuC702x MicroConverter® I
2
C®-Compatible Interface
by Michael Looney
Rev. 0 | Page 1 of 16
INTRODUCTION
This application note describes the hardware master and slave
implementation of an I
2
C-compatible (inter-integrated circuit)
interface using the ADuC702x family of precision Analog
Devices, Inc. microcontrollers. This application note also
contains example code showing how a master and a slave can
communicate with each other using the I
2
C interface (see the
Implementation of the Serial EEPROM Protocol section).
The main features of the I
2
C bus are:
Only two bus lines are required, a serial data line (SDA)
and a serial clock line (SCL). Both of these lines are
bidirectional, meaning that both the master and the slave
can operate as transmitters or as receivers.
An I
2
C master can communicate with multiple slave
devices. Because each slave device has a unique 7-bit
address, single master/slave relationships can exist at all
times even in a multislave environment.
The master and slave can transmit and receive at up to
400 kbps.
On-chip filtering rejects <50 ns spikes on the SDA and the
SCL lines to preserve data integrity.
A typical block diagram of an I
2
C interface is shown in Figure 1.
SCL
SDA
SDA
SCL
3.3
V
ADuC702x
(MASTER)
ADuC702x
(SLAVE 1)
ADuC702x
(SLAVE 2)
SDA
SCL
PULL-UP
RESISTOR
PULL-UP
RESISTOR
06549-001
Figure 1. Single Master Multislave I
2
C Block Diagram
Vista de página 0
1 2 3 4 5 6 ... 15 16

Resumo do Conteúdo

Página 1 - APPLICATION NOTE

AN-895APPLICATION NOTEOne Technology Way • P. O. Box 9106 • Norwood, MA 02062-9106, U.S.A. • Te l: 781.329.4700 • Fax: 781.461.3113 • www.analog.co

Página 2 - TABLE OF CONTENTS

AN-895 Rev. 0 | Page 10 of 16 Slave Receive As the data is received by an I2C slave, an interrupt is generated as each byte of data is placed in th

Página 3

AN-895 Rev. 0 | Page 11 of 16 Master Receive In master mode, to read data from a slave, a similar approach is used. First, the number of bytes to b

Página 4

AN-895 Rev. 0 | Page 12 of 16 Slave Transmit The slave generates an interrupt on each request for data to be transmitted, the first occurring after

Página 5

AN-895 Rev. 0 | Page 13 of 16 I2C REGISTER DEFINITIONS The I2C peripheral interface consists of 15 registers in total: • Four registers that inclu

Página 6

AN-895 Rev. 0 | Page 14 of 16 I2CxCFG: I2C Configuration Register Table 3. I2CxCFG MMR Bit Descriptions Bit No. Description 31 to 15 Reserved. Th

Página 7

AN-895 Rev. 0 | Page 15 of 16 I2CxSSTA: Slave Status Register Note: reading the status register modifies its contents. Only read it once and save i

Página 8

AN-895 Rev. 0 | Page 16 of 16 IMPLEMENTATION OF THE SERIAL EEPROM PROTOCOL This section covers the implementation of the five commands supported by

Página 9

AN-895 Rev. 0 | Page 2 of 16 TABLE OF CONTENTS Introduction ...

Página 10 - AN-895

AN-895 Rev. 0 | Page 3 of 16 I2C INTERFACE OVERVIEW I2C is a 2-wire serial communication system developed by Philips that allows multiple masters a

Página 11 - AN-895

AN-895 Rev. 0 | Page 4 of 16 Data Transfer In the I2C interrupt service routine (ISR), or in a polled implementation, the slave decides whether or

Página 12

AN-895 Rev. 0 | Page 5 of 16 Repeated Start Condition A repeated start condition occurs when a second start condition is sent to a slave without a

Página 13

AN-895 Rev. 0 | Page 6 of 16 Clock Stretching In an I2C communication, the master device determines the clock speed. Unlike RS232, the I2C bus prov

Página 14

AN-895 Rev. 0 | Page 7 of 16 I2C IMPLEMENTATION ON THE ADUC702x SERIES MICROCONVERTER The ADuC702x series of parts contain two full hardware master

Página 15

AN-895 Rev. 0 | Page 8 of 16 Transmit FIFO To transmit data, the I2C0STX/I2C0MTX registers must be loaded. Writing a byte to the Tx register is equ

Página 16

AN-895 Rev. 0 | Page 9 of 16 Master Transmit In order to transmit a byte, the data must first be loaded into the transmit FIFO. The address of the

Comentários a estes Manuais

Sem comentários