完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,
我有一个问题:如何用I2C实现CY8C27 43-24PXI中的SHT10湿度传感器?我读了很多数据表等,但我还是不知道怎么做。 谢谢大家的帮助。 以上来自于百度翻译 以下为原文 Hello , I have got question about : How can I implementation SHT10 humidity sensor in CY8C27443-24PXI using I2C ? I read a lot of datasheet etc. but I still do not know how. Thanks for all help. |
|
相关推荐
46个回答
|
|
这是PSoC 5.2的问题,所以这不是一个好的组。管理员,你能改变我的职位吗?谢谢。
以上来自于百度翻译 以下为原文 This is problem about PSoC 5.2 so this is not good group. Admin can you change my post location ? Thanks. |
|
|
|
论坛是正确的,你正在谈论PSoC1和设计师5.2(我建议更新到5.3)。
当你给我们提供一个到传感器的数据表的链接时,它会帮助我们很多,所以我们可以考虑如何连接它。 鲍勃 以上来自于百度翻译 以下为原文 The forum is the correct one, you are talking about PSoC1 and designer 5.2 (which I suggest to get updated to 5.3). It would help us a lot when you provide us with a link to the datasheet of your sensor, so we could consider how to get it connected. Bob |
|
|
|
看看这个地址:HTTP://www.
它们给出了与传感器接口的示例代码。 正如在其附注中所解释的,它是一个TWI接口,但它不是I2C兼容的,因为数据线在SCK高的时候移动。 以上来自于百度翻译 以下为原文 Have a look to this address : http://www.sensirion.com/en/products/humidity-temperature/download-center/ They give example code to interface with their sensor. As is explained in their Appnote, it is a twi interface but it's not I2C compliant since the data line move while SCK is high. |
|
|
|
从数据表-
SHT1X的串行接口被优化用于传感器读出和有效功耗。传感器不能通过I2C协议解决;然而,传感器可以连接到I2C总线,而不干扰连接到总线的其他设备。控制器必须在协议之间切换。 看起来你必须创建自己的或端口协议。 问候,Dana。 以上来自于百度翻译 以下为原文 From the datasheet - The serial interface of the SHT1x is optimized for sensor readout and effective power consumption. The sensor cannot be addressed by I2C protocol; however, the sensor can be connected to an I2C bus without interference with other devices connected to the bus. The controller must switch between the protocols. Looks like you will have to create your own, or port, protocol. Regards, Dana. |
|
|
|
所以我能用这个传感器读出湿度吗?我想把这个传感器集成到RF扩展卡(FTRF)上,并通过PC桥(FTCP)从PSoC设计器5.2上传程序。我必须使用I2C协议。你对这个话题有什么看法?
谢谢大家的帮助: 以上来自于百度翻译 以下为原文 So Can I use this senor to read humidity ? I would like to connet this senor to RF Expansion Card (FTRF) and upload program from PSoC Designer 5.2 by means of PC Bridge (FTCP). I must use I2C protocol. What is your opinion on this topic ? Thanks for all help :) |
|
|
|
数据表到SHT10:
HTTP://www. 以上来自于百度翻译 以下为原文 Datasheet to SHT10 : http://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/Humidity/Sensirion_Humidity_SHT1x_Datasheet_V5.pdf |
|
|
|
该传感器的数据表专门说明该设备可以操作/共享I2C总线,但
不是一个I2C可寻址设备。 所以答案是你的端口/使用/写一个有点敲击协议的设备,除非我失踪了。 某物。 问候,Dana。 以上来自于百度翻译 以下为原文 The datasheet for that sensor specifically states the device can operate on/share an I2C buss, but is not an I2C addressable device. So answer is you port/use/write a bit banging protocol for that device, unless I am missing something. Regards, Dana. |
|
|
|
请参考这个线程在SHT1X -HTTP://wwwyCysP.com/?APP =论坛和RID=51642
此外,CY3171工具包页有用于所有电路板的代码示例,您可能会对修改UB-I2C桥- HTTP://wwwyCysP.COM/的代码感兴趣?DOCID=32060 以上来自于百度翻译 以下为原文 Please refer to this thread on SHT1x - http://www.cypress.com/?app=forum&rID=51642 Also the CY3271 kit page has code examples for all the boards, you might be interested in modifying the code for the USB-I2C Bridge - http://www.cypress.com/?docID=32060 |
|
|
|
我必须使用什么样的模块?
谢谢大家的帮助。 以上来自于百度翻译 以下为原文 What kind of moduls I must use ? Thanks for all help. |
|
|
|
正如Danaa所说,你需要使用一个敲击协议。对于这种协议,没有UM可用。
你是否检查了我在上一篇文章中提到的链接,其中一个文档包含了与传感器交谈所需的所有代码。你必须修改它来反映你自己的情况,但不应该很困难。 希望它有帮助 以上来自于百度翻译 以下为原文 As Danaa said you will need to use a bit banging protocol. No UM is available for this kind of protocol. Did you check the link I posted in my previous post, one of the document contain all the code necessary to talk with the sensor. You will have to modify it to reflect your own situation, but it should not be very difficult. Hope it helps |
|
|
|
是的,我看过这份文件,但我不知道该怎么做。
以上来自于百度翻译 以下为原文 Yes , I've seen this document but I have no idea on how to do it |
|
|
|
使用AppNeNT中提供的代码配置两个引脚,一个为SCK,另一个作为数据。将两个引脚配置为上拉。假设您重命名PIN SCK和数据。
下面是您需要更改的代码的一部分。其他部分必须使用相同的程序进行更改。 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ chssWrue字节(无符号字符值) ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ //在感知器上写入一个字节并检查确认 { 无符号char i,误差=0; 对于(i=0x80;i & gt;0;I/= 2)/ /移位位形式化请求 {if(i,and value)数据=1;/ /掩蔽值i,写入到敏感器总线 否则数据=0; (nopp);/ /观察设置时间 SCK=1;/CLK为敏感器总线 αnoph();αnoph();//脉冲约5μs; SCK=0; (nopp);/ /观察保持时间 } 数据=1;/释放数据线 (nopp);/ /观察设置时间 SCK=1;//CLKα9用于ACK 错误=数据;//检查ACK(数据将被SHT11拉下来) SCK=0; 返回错误;//错误=1在没有确认的情况下 } / /结束样本代码 您将改变包含SCK=1的行;通过SkkDATAAdADDR=SCKIMAGE; 您将改变包含SCK=0的行;通过SCKYDATAYADDR和= ~SCKYMASE; 对于数据引线的引用也必须这样做。 接下来需要改变的是,你需要一个宏来执行5NU。 您必须修改包含SCK或数据引用的每个函数。任何其他代码都应该编译而不需要修改。 使用这种技术的最后一件事是读取/修改/写入问题。 当做 以上来自于百度翻译 以下为原文 Using the code provided in the AppNote configure two pins, one as SCK and the other as Data. Configure the two pins as pull-up. Let's suppose you rename the pin SCK and DATA. Here is one portion of code you will need to change. Other portions will have to be change using the same procedure. //---------------------------------------------------------------------------------- char s_write_byte(unsigned char value) //---------------------------------------------------------------------------------- // writes a byte on the Sensibus and checks the acknowledge { unsigned char i,error=0; for (i=0x80;i>0;i/=2) //shift bit formasking { if (i & value) DATA=1; //masking valuewith i , write to SENSI-BUS else DATA=0; _nop_(); //observe setuptime SCK=1; //clk for SENSI-BUS _nop_();_nop_();_nop_(); //pulswith approx. 5 us SCK=0; _nop_(); //observe holdtime } DATA=1; //release DATA-line _nop_(); //observe setuptime SCK=1; //clk #9 for ack error=DATA; //check ack (DATA will be pulled down by SHT11) SCK=0; return error; //error=1 in case of no acknowledge } // End of sample code You will change the lines containing SCK = 1; by SCK_Data_ADDR |= SCK_MASK; You will change the lines containing SCK = 0; by SCK_Data_ADDR &= ~SCK_MASK; The same has to be done for the line refering to the DATA pin. The next thing required is to change the _nop_(); with a macro you know takes 5us to execute. You will have to modify every function containing a reference to SCK or DATA. Any other code should compile without or minor modification. One last thing to take into consideration using this technique is the Read/modify/write issue. Regards |
|
|
|
我应该使用协议-BooTrDL2C?
谢谢大家的帮助。 以上来自于百度翻译 以下为原文 And I should use Protocol - BootLdrl2C ? Thanks for all help. |
|
|
|
我该怎么办,因为我不知道怎么办??
感谢所有帮助或相同的代码。 以上来自于百度翻译 以下为原文 What should I do because I do not get it on ?? Thanks for all help or same code. |
|
|
|
你在找一个为你工作的顾问吗?如果是这样
塞浦路斯有一个项目,CYpros,是合格的设计师。 你可以租用。 HTTP://www. CyPress?COM/?ID=1088和源=头和源=头 问候,Dana。 以上来自于百度翻译 以下为原文 Are you looking for a consultant to work for you ? If so Cypress has a program, CYpros, that are qualified designers that you can hire. http://www.cypress.com/?id=1088&source=header&source=header Regards, Dana. |
|
|
|
你有什么问题?
你有一个项目可以邮寄吗? 你不理解的部分是什么? 请更精确… 以上来自于百度翻译 以下为原文 What is the part you have problem with? Do you have a project you can post ? What is the part you don't understand? Please be more precise... |
|
|
|
您的CY3171 CDROM光盘包含几个固件项目
通过无线桥传递数据到SCD,看一下代码 请参阅如何格式化和XMIT数据。还要确保配置 节点来处理发送给它的数据BeNMG的格式。那里 是采用热敏电阻的CDROM上的固件示例 数据,通过无线桥传递,并绘制数据。诺迪特最新CDROM 磁盘的ISO在Web上。HTTP://www. CyPress?COM/?RID=17672 使用此AP注释,第13页,用于编码别针,尽管听起来像 你已经解决了。对代码的定义在代码中是不正确的。 HTTP://www. CyPress?COM/?RID=2900 问候,Dana。 以上来自于百度翻译 以下为原文 Your CY3271 CDROM disc contains several firmware projects that pass data thru wireless bridge to SCD, Take a look at that code to see how to format and xmit the data. Also make sure you config the node to address the format of the data beinmg sent to it. There is a specific firmware example on the CDROM that takes thermistor data, passes it over wireless bridge, and plots it. Noite the latest CDROM ISO of the disk is on the web. http://www.cypress.com/?rID=17672 Use this ap note, page 13, for code naming of pins, although sounds like you have addressed it. The defines for the pins are incorrect in your code. http://www.cypress.com/?rID=2900 Regards, Dana. |
|
|
|
不。。。我想得到我的问题的答案,这就是全部。好的,谢谢大家的帮助:
当做 以上来自于百度翻译 以下为原文 No... I would like get a answer for my questions and this is all. Ok , so thanks for all help :) Regards |
|
|
|
只要与我编写的代码结合起来,就可以:
当做 以上来自于百度翻译 以下为原文 Just combines with the code I write something like this put an :) Regards |
|
|
|
只有小组成员才能发言,加入小组>>
751个成员聚集在这个小组
加入小组2063 浏览 1 评论
1823 浏览 1 评论
3631 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1759 浏览 6 评论
1507 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
501浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
353浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
408浏览 2评论
353浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
850浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 14:48 , Processed in 1.238794 second(s), Total 85, Slave 78 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号