发 帖  
原厂入驻New
[问答] 怎么使用PIC10F200模拟I2C
286 I2C OLED
分享
你好,我想通过I2C来描述一个小型oled显示器。我在汇编中编写了一个程序,它应该模拟I2C,这是我的逻辑分析仪软件上的样子(你可以在一个新的标签中打开它,使它看起来更大):ACK不一定来自奴隶,因为我拔出了PIN。到低,如果我发送第九时钟。初始化字节是正确的,因为它们在我的另一个项目上工作。I2C说,应该在第九时钟之前释放一个引脚,以便I2C从设备可以将线路拉到GND(应答)。奴隶不执行任何时钟拉伸,所以不应该是一个问题。我不知道我怎么能执行“释放一个PIN”,目前我正在切换针这样:你有什么想法,我做错了什么?非常感谢:

以上来自于百度翻译


      以下为原文

    Hi,

i would like to address a small OLED display via I2C. I wrote a program in assembly which should simulate I2C, this is how it looks like on my logic analyzer software (you can open the image in a new tab so it appears bigger):



The ACK doesn't necessarily come from the slave because i pull the pin to low IF i send the 9th clock. The initialization bytes are correct because they worked on another project of mine. I2C says that a pin should be released before the 9th clock so that the I2C slave can pull the line to GND (acknowledge). The slave doesn't peRForm any clock stretching so that shouldn't be a problem. I am not sure how i could perform the 'release of a pin', currently i am toggling the pins like this:

movlw 00h ;set all pins as output
tris 6

movlw 0FFh ;set all pins to 'High'-state
movwf GPIO

GP1Off:
    bcf GPIO,1
    retlw 0

GP1On:
    bsf GPIO,1
    retlw 0

Do you have any ideas what i am doing wrong? Thanks a lot :)
0
2019-5-5 13:08:18   评论 分享淘帖 邀请回答

相关问题

3个回答
我假设你发送一个启动和设备地址…只是问:

以上来自于百度翻译


      以下为原文

    I presume you send a start and device address.... just asking :) 
2019-5-5 16:58:30 评论

举报

我是(正如你在我最初的帖子里看到的)。

以上来自于百度翻译


      以下为原文

    I am (as you see in my initial post).
2019-5-5 17:14:52 评论

举报

对不起,只是看看大图…我敢问它是不是I2C和SPI OLED…

以上来自于百度翻译


      以下为原文

    Sorry , just looked at big picture... dare I ask if it is an I2C not and SPI OLED .... 
2019-5-5 17:21:08 评论

举报

只有小组成员才能发言,加入小组>>

54个成员聚集在这个小组

加入小组

创建小组步骤

关闭

站长推荐 上一条 /10 下一条

快速回复 返回顶部 返回列表