完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
I2C似乎与以前使用过的PIC18不同。在MCC中配置了PIC18F25K42的I2C1外围设备。“简单设置”选项卡非常简单:它允许您选择“从”和“使能”:就是这样。工作必须在“寄存器”选项卡上完成:1)选择“7位加法器”。在I2CCON0中唱“(4个七位的地址是默认的),在PIN管理器中确保有端口被选择;在I2C1ADR0-0x62中输入一个地址,然后单击“生成”。虽然I2CCON0选择确实出现,但地址并没有出现在初始化函数中(这是I2C1.C文件中生成的唯一函数);2)不可能在寄存器选项卡顶部的中断处勾选复选框。同样也不可能在中断模块的矢量中断部分检查它们。有人让它工作吗?
以上来自于百度翻译 以下为原文 i2c seems to be handled differently from previous PIC18's I've used. - Configure in MCC the i2c1 peripheral for the PIC18F25K42. - The "easy setup" tab is straightforward: it allows you to select "slave" and "enable": that's it. - So the work must be done on the "Registers" tab: 1) Select "7-bit addressing" (4 seven bit addresses is the default) in I2CCON0 and in the Pin Manager assure there are ports selected; enter an address in I2C1ADR0 - 0x62 and click "generate". Whilst the I2CCON0 choice does show up the address doesn't appear in the Initialise function (which is the ONLY function to have been generated in the i2c1.c file); 2) Impossible to tick the checkboxes for the interrupts at the top of the registers tab. Similarly impossible to check them in the vectored interrupts section of the interrupts module. Did anyone get this to work? |
|
相关推荐
3个回答
|
|
嗨,不会说我把它带到工作中,而是设法让它生成所有基于非中断的I2C驱动程序所期望的功能。事实上,中断复选框不起作用,在初始化函数中确实没有考虑地址。一旦我得到一些样本CHIP,将遵循这一点。CalsSPS:在简单的设置中,我想您是指“主”和“奴隶”而不是“奴隶”和“使能”。正确的?
以上来自于百度翻译 以下为原文 Hi, wouldn't go as far as saying I got it to work but managed to have it generate all the functions expected in an non interrupt based I2C driver. Indeed Interrupt checkboxes are not working, indeed address is not taken in account in the initialize functions. Will follow on this one once I get some sample chips. Cheers PS: In the easy setup I imagine you meant "Master"&"Slave" not "slave" and "enable". Right ? |
|
|
|
确实,简易设置选项卡允许选择主从和从属。我相信它有一个“启用”复选框,当设置奴隶时也是有效的。顺便说一下,四处游荡注意到SPI的中断复选框也不起作用。不过,UART很好,享受样品。这是一个很棒的芯片。
以上来自于百度翻译 以下为原文 True, the easy setup tab allows to select Master as well as slave. I was crediting it with having an "enable" checkbox that works as well, when setting up Slave. ;) Incidentally, playing around noticed that the interrupt checkboxes for SPI aren't working either. UART however is fine. Enjoy the samples. It's an awesome chip. |
|
|
|
谢谢你的提醒!期待着尝试它…希望K40的NVMRG芯片问题在K42上得到解决;
以上来自于百度翻译 以下为原文 Thanks for the heads up ! looking forward to try it... hopefully the NVMREG chip issue of the K40 is solved on the K42 ;-) |
|
|
|
只有小组成员才能发言,加入小组>>
5171 浏览 9 评论
2001 浏览 8 评论
1931 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3176 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2228 浏览 5 评论
737浏览 1评论
622浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
509浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
635浏览 0评论
531浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-25 23:50 , Processed in 1.301242 second(s), Total 82, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号