7459|7

107

帖子

0

TA的资源

一粒金砂(高级)

楼主
 

LPC1114 I2C 的问题? [复制链接]

不知大家有没有弄过I2C的 原来没有弄过, 想弄下, 前几天看啦1114的例程大概了解,这几天 寻思再研究下, 不知有没有弄过的 , 分享下,

    单片机的I2C 倒是弄啦下, 就是AT24C02 的EEPROM , 但是弄到1114上, 应该是有点不得要领吧, 哈哈 , 最近时间少啦点, 没有一直在弄这个, 今天发个贴, 有机会多多学习!!!

[ 本帖最后由 lanyu345 于 2010-5-27 09:09 编辑 ]
此帖出自NXP MCU论坛

最新回复

可以参考一下下面的资料: 【TinyM0配套教程】功能部件(I2C) LPC1100用户手册(第十章)I2C接口   详情 回复 发表于 2010-5-28 11:05
点赞 关注
 

回复
举报

19

帖子

0

TA的资源

一粒金砂(初级)

沙发
 
也是没时间,想试,一直没试上呢。板子已经做上了。
此帖出自NXP MCU论坛
 
 
 

回复

107

帖子

0

TA的资源

一粒金砂(高级)

板凳
 

回复 沙发 合成设计 的帖子

呵呵 , 连上啦 做啦一点调试, 存在问题,
此帖出自NXP MCU论坛
 
 
 

回复

4996

帖子

19

TA的资源

裸片初长成(初级)

4
 

好像IIC存在一定的问题:

LPC1114的I2C有个bug,在操作前需要释放I2C复位,在程序前面添加下面代码释放I2C复位,然后再试下。

LPC_SYSCON->;PRESETCTRL &= 1<<1;  

LPC_SYSCON->;PRESETCTRL |= 1<<1;  

 

如果还有问题,上传下代码,一起研究下 :)

另外:

CoBuilder下有LPC1114的I2C的例子,可以参考下。

此帖出自NXP MCU论坛
 
 
 

回复

107

帖子

0

TA的资源

一粒金砂(高级)

5
 

有用的东西

  /* In order to start the I2CEngine, the all the parameters
  must be set in advance, including I2CWriteLength, I2CReadLength,
  I2CCmd, and the I2cMasterBuffer which contains the stream
  command/data to the I2c slave device.
  (1) If it's a I2C write only, the number of bytes to be written is
  I2CWriteLength, I2CReadLength is zero, the content will be filled
  in the I2CMasterBuffer.
  (2) If it's a I2C read only, the number of bytes to be read is
  I2CReadLength, I2CWriteLength is 0, the read value will be filled
  in the I2CMasterBuffer.
  (3) If it's a I2C Write/Read with repeated start, specify the
  I2CWriteLength, fill the content of bytes to be written in
  I2CMasterBuffer, specify the I2CReadLength, after the repeated
  start and the device address with RD bit set, the content of the
  reading will be filled in I2CMasterBuffer index at
  I2CMasterBuffer[I2CWriteLength+2].
 
  e.g. Start, DevAddr(W), WRByte1...WRByteN, Repeated-Start, DevAddr(R),


  RDByte1...RDByteN Stop. The content of the reading will be filled
  after (I2CWriteLength + two devaddr) bytes. */

 

此帖出自NXP MCU论坛
 
 
 

回复

107

帖子

0

TA的资源

一粒金砂(高级)

6
 

I2C

  /* It seems to be bit0 is for I2C, different from
  UM. To be retested along with SSP reset. SSP and I2C  

  reset are overlapped, a known bug, for now, both SSP 

  and I2C use bit 0 for reset enable. Once the problem
  is fixed, change to "#if 1". */

此帖出自NXP MCU论坛
 
 
 

回复

60

帖子

0

TA的资源

一粒金砂(初级)

7
 
此帖出自NXP MCU论坛
 
 
 

回复

107

帖子

0

TA的资源

一粒金砂(高级)

8
 

好的

 好的, 谢谢!!!
此帖出自NXP MCU论坛
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/7 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表