Pics

Páginas: 68 (16753 palabras) Publicado: 15 de enero de 2013
I2C™ Master Mode
Overview and Use of the PICmicro® MSSP I2C Interface with a 24xx01x EEPROM
v 0.40
Getting Startred: I2C Master Mode © 2001

Welcome to the Microchip Technology Presentation on using the MSSP module in Master I2C mode. In this presentation, we will look at what I2C is and how it is used to communicate data to and from a PICmicro Microcontroller and a serial EEPROM. We will beconnecting a device from the popular family of PIC16F87x microcontrollers to a 24x01 serial EEPROM. Both of these devices are manufactured by Microchip Technology Inc and can be found on the popular PICDEM 2 Demonstration Board. I2C is a popular protocol and is supported by many devices. This presentation answers some questions about I2C and explains with a full example how to connect a PICmicroMSSP module to an EEPROM.

1

Topics
l

Covered Topics:
l l l l

Overview of I2C Using I2C on the PICmicro Microcontroller Example: A code walk-though for connecting a 24x01x to a PIC16F87X Finding More Information

Getting Startred: I2C Master Mode

© 2001

In this presentation, we will cover the following topics: We will first cover an Overview of I2C. This chapter of thepresentation will introduce you to the I2C Protocol and its concepts. Next, we will examine the use of I2C on the PICmicro microcontroller. The details of how SPI is implemented on a PICmicro device will be examined. We will look at the MSSP module, which is available on a wide selection of popular PICmicro microcontrollers. We will then examine a code walk-though. The walkthough will explore code forboth writing and reading a serial EEPROM. The example sends sample data to the EEPROM, then reads back the data and displays it. The code to do this looks rather long, but it is not complex. We will break the code down into smaller and easy to understand sections. Finally, there will be a few resources given at the end of the presentation. These resources will allow you to explore in more detailthe I2C interface.

2

Overview
l

l l l

Used for moving data simply and quickly from one device to another Serial Interface Synchronous Bidirectional

Getting Startred: I2C Master Mode

© 2001

I2C stands for Inter-Integrated Circuit Communications. I2C is implemented in the PICmicro by a hardware module called the Master Synchronous Serial Port, known as the MSSP module . Thismodule is built into many different PICmicro devices. It allows I2C serial communication between two or more devices at a high speed and communicates with other PICmicro devices and many peripheral IC’s on the market today. I2C is a synchronous protocol that allows a master device to initiate communication with a slave device. Data is exchanged between these devices. We will look at this more indetail as we progress though this presentation. I2C is also bi-directional. This is implemented by an “Acknowledge” system. The “Acknowledge” system or “ACK” system allows data to be sent in one direction to one item on the I2C bus, and then, that item will “ACK” to indicate the data was received. We will look at this in detail later, as you can see, this is a powerful feature of I2C. Since aperipheral can acknowledge data, there is little confusion on whether the data reached the peripheral and whether it was understood.

3

Overview
l

I2C is a Synchronous protocol
l l l

The data is clocked along with a clock signal (SCL) The clock signal controls when data is changed and when it should be read Since I2C is synchronous, the clock rate can vary, unlike asynchronous (RS-232 style)communications

Getting Startred: I2C Master Mode

© 2001

I2C is a synchronous protocol that allows a master device to initiate communication with a slave device. Data is exchanged between these devices. Since I2C is synchronous, it has a clock pulse along with the data. RS232 and other asynchronous protocols do not use a clock pulse, but the data must be timed very accurately. Since I2C...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • PICS
  • Pics
  • pics
  • Pics
  • Pics
  • Pics
  • Pics
  • Pics

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS