beautypg.com

8 i²c implementation, 1 general recommendations, 2 i²c baud rates and clock stretching – HID Hi-O iCLASS Installation Guide User Manual

Page 32: 3 i²c message transmission, I²c implementation, General recommendations, I²c baud rates and clock stretching, I²c message transmission

background image

iCLASS OEM75 Integration Guide, 3141-907, Rev. B.0

Page 32 of 49

January 2014

HID GLOBAL CONFIDENTIAL AND/OR PROPRIETARY INFORMATION. This document contains confidential and/or proprietary

information, which may not be duplicated, published, disseminated or disclosed, or used for any purpose, without the written

consent of HID Global Corporation. If you are an unintended recipient of this information or are unwilling to accept the above

restrictions, please immediately return this document to HID Global Corporation, 15370 Barranca Pkwy, Irvine, CA 92618-3106.

6.8 I²C Implementation

To enable I²C operation and set a Slave Address, first present a configuration card to the OEM75.
For the OEM75, use the Inter-Integrated Circuit (I²C) as the underlying protocol for message

transfers. I²C is a master/slave multi-drop serial data link invented by Philips. It uses two signal

lines, SDA (Serial Data) and SCL (clock). SCL is driven by the master to control transfers.
The OEM75 processor is the I²C slave. Any host communicating with the OEM75 must operate as

an I²C master and use the 7 bit address space reference design. For details on this communication

method, see the following URL:

http://en.wikipedia.org/wiki/I²C

.

6.8.1 General Recommendations

For I²C operation, an external 10k pull-up resistor is required on the I²C-SCK signal.
Note: The OEM75 already contains internal 10k pull-up resistors on the I²C SDA signal.
CAUTION: The pull-up resistors voltage source (+3.3V Read) on the I²C inputs is switched OFF

during Ultra Low Power Mode. Do not hold I²C input signals high during Ultra Low Power Mode.

Doing so causes erratic operation.

6.8.2 I²C Baud Rates and Clock Stretching

I²C Write Function is when the external host master I²C is sending messages to the OEM75 slave

I²C. I²C Read Function is when the external host master I²C is querying for messages from the

OEM75 slave I²C.
The OEM75 slave I²C is tested with a master CPU driving the clock, resulting in a clock rate of

115.2 K Baud. The OEM75 has a crystal frequency of over 27 MHz, and therefore significantly

higher baud rates (230.4 K Baud, 460.6 K Baud) are attainable. However, these higher baud rates

have not been tested.
Clock stretching is implemented on the OEM75. This allows the OEM75 to stop the transmission

clock while processing the I²C interrupt. While higher burst speeds of greater than 115.2 K Baud are

possible for individual bytes, there may be clock-stretching activity occurring on the OEM75 that

slows down the overall effective baud rate of a multi-byte transmission.

6.8.3 I²C Message Transmission

An I²C Write Function is when the external host master I²C is sending messages to the OEM75

slave I²C. I²C Read Function is when the external host master I²C is querying for messages from

the OEM75 slave I²C.

Host I²C Master Write Function

1. The master CPU issues an I²C bus Start.
2. The master CPU sends the OEM75 address with the least significant bit set to zero. This

indicates the address is a write address.

3. Send a byte to the OEM75 indicating the number of bytes in the pending message.
4. Send all message bytes.
5. The master CPU issues an I²C bus Stop.