The Cubesat Internal bus: The I2C

Similar documents
Handson Technology. I2C Specification and Devices. 1

DESIGNING OF INTER INTEGRATED CIRCUIT USING VERILOG

Development and research of different architectures of I 2 C bus controller. E. Vasiliev, MIET

Serial Peripheral Interface. What is it? Basic SPI. Capabilities. Protocol. Pros and Cons. Uses

An Efficient Designing of I2C Bus Controller Using Verilog

CprE 488 Embedded Systems Design. Lecture 4 Interfacing Technologies

Raspberry Pi - I/O Interfaces

Growing Together Globally Serial Communication Design In Embedded System

Introduction to I2C & SPI. Chapter 22

1.3inch OLED User Manual

GT24C02. 2-Wire. 2Kb Serial EEPROM (Smart Card application)

Laboratory 5 Communication Interfaces

Microcontroller Systems. ELET 3232 Topic 23: The I 2 C Bus

How to Implement I 2 C Serial Communication Using Intel MCS-51 Microcontrollers

McMaster University Embedded Systems. Computer Engineering 4DS4 Lecture 6 Serial Peripherals Amin Vali Feb. 2016

DS1845 Dual NV Potentiometer and Memory

Implementation of MCU Invariant I2C Slave Driver Using Bit Banging

AN-895 APPLICATION NOTE

Serial Buses in Industrial and Automotive Applications

RW1026G Revision History Version Date Description

Fremont Micro Devices, Inc.

DESIGN AND IMPLEMENTATION OF I2C SINGLE MASTER ON FPGA USING VERILOG

or between microcontrollers)

SILICON MICROSTRUCTURES

GT24C WIRE. 1024K Bits. Serial EEPROM

The I2C BUS Interface

FM24C Kb FRAM Serial Memory Features

Temperature Sensor TMP2 PMOD Part 1

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING. EE Microcontroller Based System Design

DS1676 Total Elapsed Time Recorder, Erasable

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

Embedded Workshop 10/28/15 Rusty Cain

Theory of Operation STOP CONDITION

Fully Integrated Thermal Accelerometer MXC6225XU

INTEGRATED CIRCUITS DATA SHEET. PCF2119x-2 LCD controllers/drivers. Product specification File under Integrated Circuits, IC12

Exercise 2 I 2 C Management 1/7

I 2 C Application Note in Protocol B

IMAGE COMPRESSION ON FPGA AND TRANSFER USING ZIGBEE/I2C PROTOCOL

Tutorial for I 2 C Serial Protocol

Win-I2CUSBDLL. Software User s Manual. The Boardshop

THE INTERNATIONAL JOURNAL OF SCIENCE & TECHNOLEDGE

Prototyping of On-chip I2C Module for FPGA Spartan 3A series using Verilog

DS WIRE INTERFACE 11 DECOUPLING CAP GND

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Application Note: AZD025 IQ Switch - ProxSense TM Series I2C Example Code for the IQS222

INTEGRATED CIRCUITS DATA SHEET. PCF2119X LCD controllers/drivers. Product specification Supersedes data of 2002 Jan 16.

34 Series EEPROM Application Note. 1. Introduction. 2. Power supply & power on reset

Hello, and welcome to this presentation of the STM32 I²C interface. It covers the main features of this communication interface, which is widely used

I2C interface Tutorial

ORDERING INFORMATION. OPERATION Measuring Temperature A block diagram of the DS1621 is shown in Figure 1. DESCRIPTION ORDERING PACKAGE

RM24C64AF 64-Kbit 1.65V Minimum Non-volatile Fast Write Serial EEPROM I 2 C Bus

GT24C256 2-WIRE. 256K Bits. Serial EEPROM

ACE24AC128 Two-wire Serial EEPROM

JTAG and I 2 C on ELMB

DS1625. Digital Thermometer and Thermostat FEATURES PIN ASSIGNMENT

DATA SHEET. PCF2113x LCD controller/driver INTEGRATED CIRCUITS Apr 04

GT34C02. 2Kb SPD EEPROM

Application Note. Utilising the E2 Interface

In this section, we are going to cover the Silicon Labs CP240x family features.

FM24CL04 4Kb FRAM Serial Memory

Shanghai Belling Corp., Ltd BL55028 zip: Tel: Fax:

Debounced 8 8 Key-Scan Controller

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5092 P-DIP-8-1

21. TWI Two-Wire Interface

Using the Finisar GBIC I 2 C Test/Diagnostics Port

ACE24AC64 Two-wire Serial EEPROM

DS 1682 Total Elapsed Time Recorder with Alarm

FT24C K-bit 2-Wire Serial CMOS EEPROM. Description V. Self time write cycle with auto clear

BL24C02/BL24C04/BL24C08/BL24C16

Shanghai Belling Corp., Ltd BL55077 zip: Tel: Fax:

Interfacing to Digital Potentiometers

CARDINAL COMPONENTS. Specifications: Min Typ Max Unit

VBattery 7 VCC V DD IRLED IS31SE5001 SDA SCL INTB SDB. Figure 1 Typical Application Circuit

ST Sitronix ST7565P. 65 x 132 Dot Matrix LCD Controller/Driver

AN-1159 APPLICATION NOTE

AC : INFRARED COMMUNICATIONS FOR CONTROLLING A ROBOT

CARDINAL COMPONENTS. FREQUENCY A MHz. Specifications: Min Typ Max Unit

Interfacing Techniques in Embedded Systems

CARDINAL COMPONENTS. Specifications: Min Typ Max Unit

MACHINE BREAKDOWN DETECTION SYSTEM

8. SED1565 Series. (Rev. 1.2)

DS1682 Total-Elapsed-Time Recorder with Alarm

Preliminary Data MOS IC. Type Ordering Code Package SDA Q67100-H5096 P-DIP-8-1

I2C a learn.sparkfun.com tutorial

Freescale Semiconductor, Inc.

Interconnection Structures. Patrick Happ Raul Queiroz Feitosa

DS Wire Digital Thermometer and Thermostat

FM24C16C-GTR. 16Kb Serial 5V F-RAM Memory. Features. Description. Pin Configuration NC NC NC VSS VDD WP SCL SDA. Ordering Information.

Introduction the Serial Communications Parallel Communications Parallel Communications with Handshaking Serial Communications

512K bitstwo-wire Serial EEPROM

Basics of UART Communication

18-349: Introduction to Embedded Real-Time Systems

Win-I2CUSB. Software User s Manual

TB2669. I²C Slave Mode. Introduction. Author: Christopher Best, Microchip Technology Inc.

DS28CM00. I²C/SMBus Silicon Serial Number

Manual iaq-engine Indoor Air Quality sensor

FPGA Implementation Of SPI To I2C Bridge

FM24C16B-GTR. 16Kb Serial 5V F-RAM Memory. Features. Pin Configuration. Description. Ordering Information NC NC NC VSS VDD WP SCL SDA.

Parallel Data Transfer. Suppose you need to transfer data from one HCS12 to another. How can you do this?

I2C Demonstration Board I 2 C-bus Master Selector

Transcription:

The Cubesat Internal bus: The I2C Description: The purpose of this document is to describe the internal bus on the Cubesat. The internal bus has been chosen to be the I2C bus Interconnected Integrated Circuit. The document will describe the purpose of the I2C and the design of a suitable Protocol for the data link layer. Responsible group: OBC 732, 01gr732@control.auc.dk, paen00, Subsystem: On Board Computer & Camera Unit. Date: 12.11.01 Rev.: 1.5 File name: I2C bus_v_1.5pdf Path: ftp://??????.auc.dk/documentation Literature: http://www us.semiconductors.philips.com/i2c/facts/

Internal bus on Cubesat (I2C) In order to obtain communication between the different subsystems on the AAU cubesat, the Philips I2C bus has been selected. I2C or Interconnected Integrated Circuit was developed by Philips in 1992, it has now become the world standard, and is currently implemented in over 1000 different ICs. Here are some of the features of the I2C bus: Only two bus lines are required; a serial dataline (SAD) and a serial clock line (SCL) Each device connected to the bus is software addressable by a unique address and simple master/slave relationships exist at all times; masters can operate as master transmitters or as master receivers. It s a true multi master bus including collision detection and arbitration to prevent data corruption if two or more masters simultaneously initiate data transfer Serial 8 bit oriented bi directional data transfers can be made at up to 100 kbit/s in the Standard mode, up to 400 kbit/s in the Fast mode, or up to 3.4 Mbit/s in the High speed mode On chip filtering rejects spikes on the bus data line to preserve data integrity Extremely low current consumption. High noise immunity. Wide supply voltage range. Wide operating temperature range. The I2C bus supports any IC fabrication process (NMOS, CMOS, bipolar). Two wires, serial data (SDA) and serial clock (SCL), carry information between the devices connected to the bus. Each device is recognized by a unique address (whether it s a microcontroller, LCD driver, memory or keyboard interface) and can operate as either a transmitter or receiver, depending on the function of the device. Obviously a LCD driver is only a receiver, whereas a memory can both receive and transmit data. In addition to transmitters and receivers, devices can also be considered as masters or slaves when performing data transfers (see Table 1). A master is the device which initiates a data transfer on the bus and generates the clock signals to permit that transfer. At that time any device addressed is considered a slave.

Table 1 Definition of I2C bus terminology Term Transmitter Receiver Master Slave Multi master Arbitration Synchronization DESCRIPTION The device which sends data to the bus The device which receives data from the bus The device which initiates a transfer, generates clock signal and terminates transfer. The device addressed by a master More than one master can attempt to control the bus at the same time without corrupting the message Procedure to ensure that, if more than one master simultaneously tries to control the bus, only one is allowed to do so, and the winning message is not corrupted Procedure to synchronize the clock signals of two or more devices The I2C bus is a multi master bus. This means that more than one device capable of controlling the bus can be connected to it. As masters are usually micro controllers, let s consider the case of a data transfer between two microcontrollers connected to the I2C bus (see Fig.1). Figur 1 If two or more masters try to put information onto the bus, the first to produce a "1" when the other produces a zero will lose the arbitration. The clock signals during arbitration are a synchronized combination of the clocks generated by the masters using the wired AND connection to the SCL line. Generation of clock signals on the I2C bus is always the responsibility of master devices; each master generates its own clock signals when transferring data on the bus. Bus clock signals from a master can only be altered when they are stretched by a slow slave device holding down the clock line, or by another master when arbitration occurs.

The Cubesat structure consists internally of five different modules (COM, OBC, ACS, PSU and Payload). The last module on figure 1 is an external PC which is used for testing and simulation of the system. I2C Protocol The I2C protocol consists of the following. Start: The start condition is produced by a master, who wants to use the bus. It is made by holding the SCL line high, while changing the SDA line form high to low. Address: Every device on the I2C Bus has its own unique 7 bit address. The first 4 bit of the address is determined by the type of device connected to the I2C Bus and is set by the manufacture of the IC. The last three bits are programmable, which allows 8 identical devices to be connected to the I2C Bus. R/W: Read/Write is set by the Master, and determines whether the master wants to read from the slave or write to it. 1 for read and 0 for write.

Acknowledge: Data transfer with acknowledge is obligatory. The acknowledge related clock pulse is generated by the master. The transmitter releases the SDA line (HIGH) during the acknowledge clock pulse. The receiver must pull down the SDA line during the acknowledge clock pulse so that it remains stable LOW during the HIGH period of this clock pulse, in order to confirm that it is willing to communicate. Header: Length: The first three bits of the header determine how many data packages the header will be followed by (up to 8 * 8 bit data packages). Header No of data Packages 000xxxxx 1 001xxxxx 2 010xxxxx 3 011xxxxx 4 100xxxxx 5 101xxxxx 6 110xxxxx 7 111xxxxx 8 Module: The device module number. E.g. The PSU temp probe nr. 2 (2*8 bit data) [00100010]. The total amount of modules you can address is 2^5 = 32 Data: The data on the SDA line must be stable during the HIGH period of the clock. The HIGH or LOW state of the data line can only change when the clock signal on the SCL line is LOW Stop: A LOW to HIGH transition on the SDA line while SCL is HIGH

defines a STOP condition. Checksum: The data package following the header is an 8 bit CRC Checksum. The checksum is calculated in the following way. All the data packages send in one transmission is added together, the 8 bit result of this calculation yields the CRC checksum. The received data is calculated in the same way and the last calculated checksum is subtracted from the original checksum. The result now indicates weather the transmitted data is corrupted. If the result is different from 0 the data is corrupted and will be retransmitted. Send data Received data [01101101] [01101101] + + [10110101] [10110101] = = 1[00100010] 1[00100010] = 0 The data is ok. Communication Master Slave Slave Master: Possible data transfer formats are: Master transmitter transmits to slave receiver. The transfer direction is not changed (see Fig.2). Master reads slave immediately after first byte (see Fig.2). At the moment of the first acknowledge, the master transmitter becomes a master receiver and the slave receiver becomes a slave transmitter. This first acknowledge is still generated by the slave. The STOP condition is generated by the master, which has previously sent a not acknowledge (A). Combined format (see Fig.2). During a change of direction within a transfer, the START condition and the slave address are both repeated, but with the R/W bit reversed. If a master receiver sends a repeated START condition, it has previously sent a not acknowledge (A). NOTES: 1. Combined formats can be used, for example, to control a serial memory. During the first data byte, the internal memory location has to be written. After the START condition and slave address is repeated, data can be transferred. 2. All decisions on auto increment or decrement of previously accessed memory locations etc. are taken by the designer of the device. 3. Each byte is followed by an acknowledgment bit as indicated by the A or A blocks in the sequence.

4. I 2 C bus compatible devices must reset their bus logic on receipt of a START or repeated START condition such that they all anticipate the sending of a slave address, even if these START conditions are not positioned according to the proper format. 5. A START condition immediately followed by a STOP condition (void message) is an illegal format. FIGUR 2 Possible data transfer formats Conducting housekeeping When collecting housekeeping from the different units the master only needs to address a unit and set the R/W condition to Read, The unit then delivers all its housekeeping da ta to the MCU. Each sensor on a unit is identified by the module number transmitted in t he header. Controlling Units When controlling a unit from the MCU, the MCU will of course have to send data along with the address, header and checksum. Further information about the I2C bus can be found at. http://www us.semiconductors.philips.com/i2c/facts/