简体   繁体   English

I2C地址格式

[英]I2C Address format

I'm working on writing/reading data across i2c to the USB to i2c board UMFT201 . 我正在通过i2c向USB至i2c板UMFT201写入/读取数据。 The data sheet says the default i2c address is "22h". 数据表显示默认的i2c地址为“ 22h”。 I can't figure out what that means. 我不知道那是什么意思。 When I use the general call address it seems to be able to write data to the board; 当我使用通用呼叫地址时,似乎可以将数据写入电路板。 so I think my code is working. 所以我认为我的代码正在工作。 I'm new to C programming; 我是C编程的新手。 thus not sure what that "22h" means. 因此不确定“ 22h”是什么意思。

There is a trick to understand about the FTDI UMFT201 and FT201X chip. 了解有关FTDI UMFT201和FT201X芯片的技巧。

It is an I2C slave chip. 它是一个I2C从芯片。

Therefore it is not a master, obvioulsy. 因此,它不是高手,很笨拙。 This means you need a micro-controller to act as the I2C master plugged into into the UMFT201 which is the slave. 这意味着您需要一个微控制器来充当插入到作为从设备的UMFT201中的I2C主设备。 The UMFT201 itself being plugged into your PC, you can therefore implement a I2C communication form the micro-controller to the PC. UMFT201本身已插入PC,因此您可以通过微控制器与PC进行I2C通信。 For the micro-controller the PC is an I2C slave with an address of 22h. 对于微控制器,PC是地址为22h的I2C从设备。

You may want to find a an evaluation board like the FTDI FT260 (C samples available) or the device Nusbio.net (C#, VB, PowerShell samples available) based on the FTDI FT2301X which both are I2C master. 您可能希望找到一个基于FTDI FT2301X的评估板,如FTDI FT260(可用C样本)或设备Nusbio.net(可用C#,VB,PowerShell样本),它们都是I2C主设备。

This make I2C communication easier as you can talk from your PC to any I2C slave device. 由于您可以从PC与任何I2C从设备通信,因此这使I2C通信更加容易。

Here is a sample to talk I2C to an LCD screen with C# or vb.net 这是使用C#或vb.netI2C与LCD屏幕对话的示例

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM