AN2352 Cypress, AN2352 Datasheet

no-image

AN2352

Manufacturer Part Number
AN2352
Description
I2C USB Bridge Usage
Manufacturer
Cypress
Datasheet
www.DataSheet4U.com
Application Note
Abstract
This Application Note, which is included in the CY3240-I2USB kit available in the Cypress Online Store, details several
examples using the I2C-USB bridge design. It is also a supplement to the I2C-USB Bridge Quick Start Guide reference [2] at
the end of this document, also available in CY3240-I2USB. The Application Note contains details about implementing an I
interface into existing projects and using I
Introduction
The normal capabilities of a PC can be well expanded
upon by using the new I2C-USB bridge and its supporting
software. A PC with I2C-USB bridge can be useful for
following tasks:
This Application Note details the following examples of
bridge usage:
1.
2.
3.
4.
5.
9/22/2006
Debug existing projects (using I
instead of UART, for example).
Acquire and manipulate data from various I
devices, such as ADCs, DACs, IO expanders,
sensors with I
Program EEPROM, SRAM devices.
Train users and demonstrate I
Monitoring CapSense CSR User Module operation.
Monitoring tachometer operation.
Working with a 20-pin IO port expander with
EEPROM.
Programming 24Cxxx serial EEPROM devices.
Working with a PSoC-based 3-channel potentiometer.
2
C interfaces, etc.
2
C device capabilities.
2
C communication
2
C communication to test, debug and tune device designs.
I2C-USB Bridge Usage
2
C
CY3240-I2USB, CY3242-IOX >> Available in Cypress Online Store
Revision **
The simplest way to implement I
and attach the device to the bridge will also be looked at
closely. This document does not describe the internal
structure and protocol of the bridge. For this information
refer to the I2C-USB Bridge Guide reference [1] at the end
of this document, also available in CY3240-I2USB. The
USB2IIC.exe program was used in all examples. Details of
this program are described in [2].
Attach Device to Bridge
Execute the following steps to connect the device to the
I2C-USB bridge:
1.
2.
3.
4.
5.
6.
Associated Application Notes and Kits: AN2304,
Connect GND of the device to GND of the bridge.
Connect the SDA, SCL lines to the bridge (Figure 1).
Bridge has 2.2k pull-up resistors connected to +5V.
Power the device from the Vdd pin on the bridge if it
does not have its own power supply. Note that the
connection of Vdd between the bridge and target
board is REQUIRED, even if the board is self-
powered. The bridge can (optionally) provide 3.3V or
5V, or it can work with an externally powered board
using 2.4V to 5.6V.
Connect the bridge to USB.
Run USB2IIC.exe program from PC.
Select the bridge in the list at the bottom center of the
screen.
Software Version: PSoC Designer™ v. 4.3
Associated Part Family: CY8C24894
Associated Project: Yes
Author: Valeriy Kyrynyuk
2
C into a PSoC project
AN2352
- 1 -
2
C

Related parts for AN2352

AN2352 Summary of contents

Page 1

... C device capabilities Revision ** AN2352 Author: Valeriy Kyrynyuk Associated Project: Yes Associated Part Family: CY8C24894 Software Version: PSoC Designer™ into a PSoC project Connect GND of the device to GND of the bridge. Connect the SDA, SCL lines to the bridge (Figure 1). ...

Page 2

... The 2 address of the I C buffer is set by MyI2C_Regs, which is the third argument communication. The EzI2Cs 2 C slave is the offset into the 2 C buffer. If the size buffer. Without such AN2352 2 C interrupt - 2 - ...

Page 3

... Step Sends LSB Byte of WORD Value Current buffer index interrupt service 01 00 256 2 WORD type variable into I C buffer Revision ** Sends 00 h This is MSB Byte of WORD Value 2 C Buffer Sends 00 h This is LSB Byte of WORD Value AN2352 - 3 - ...

Page 4

... The Slave_Addr parameter is 0. The command line for the USB2IIC.exe program, which reads tachometer values follows xk3 xk2 xk1 xk0 p 9/22/2006 2 C slave implementation // Set up RAM buffer // Turn on interrupts // Turn on I2C Figure 3 shows a diagram of data collected from the tachometer. and prepare reports. Revision ** AN2352 - 4 - ...

Page 5

... The command line of this example is as follows xk1 xk0 xl1 xl0 xm1 xm0 xn1 xn0 p Figure 4. CSR Keypad Period Samples 100 150 200 250 Revision ** 300 350 400 AN2352 - 5 - ...

Page 6

... The following command string will read samples from the device in high-speed BURST mode xk0 xl0 xm0 p The samples were recorded at about 10 seconds. A diagram of the received data is shown below (Figure 5). Figure 5. Three Channel ADC Samples Revision ** 2 C buffer should be set first at: AN2352 - 6 - ...

Page 7

... Once this command string executes, EEPROM is available at address 0x80+Expander Address, or 0xA2, in this case. Let’s write 8 bytes to EEPROM address of 0x0020 Now, we will read 4 bytes from address 0x0024: sA2 Revision ** AN2352 //set PWM pin 2 C master. To enable - 7 - ...

Page 8

... Three Channel ADC Example Project PC Software for I2C-USB Bridge PC Software for Binary Data Conversion Valeriy Kyrynyuk Title: Engineer Eight years experience with fieldbus and communication device designs. lopik@lviv.farlep.net Cypress Semiconductor 198 Champion Court San Jose, CA 95134-1709 Phone: 408-943-2600 Fax: 408-943-4730 http://www.cypress.com AN2352 - 8 - ...

Related keywords