完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,这是我第一次使用PIC和编程它,我有一些关于I2C图书馆的问题。我在哪里可以找到一个I2C的图书馆为我的PIC18F45 50?或者我在哪里可以找到一条引线?经过搜索,我发现了很多不同的东西,但我不知道是什么。谢谢。
以上来自于百度翻译 以下为原文 Hello, It's my first time using a PIC and programming it and I have some questions about I2C library's. Where can I find a library for I2C for my PIC18F4550? Or where can I find a guidline? After searching I found a lot of different things but I don't know what is what. Thanks |
|
相关推荐
12个回答
|
|
主人还是奴隶?HW还是SW(BIT)?用谷歌搜索论坛应该给你很多例子
以上来自于百度翻译 以下为原文 MAster or slave? HW or SW (bit-banged)? Searching the forum with google should give you many examples |
|
|
|
这是给主人的,我不知道它的硬件软件…对于I/O扩展器(PCA9505),我如何知道它是哪一个?谢谢你,CinziaG
以上来自于百度翻译 以下为原文 It's for the master. I do not really know if its hardware of software... It's for an I/O expander (PCA9505) How can I know which one it is? Thank you CinziaG |
|
|
|
问题是你使用的是内置的外围设备还是软件/比特敲击的方法。如果您连接到PIC上的右引脚,您可以使用硬件方法。
以上来自于百度翻译 以下为原文 The question was are you using the built in peripheral or the Software/ bit banged approach. You can use the Hardware approach if you are connected to the right pins on the PIC |
|
|
|
我连接到正确的引脚,所以它将是硬件。
以上来自于百度翻译 以下为原文 I'm connected to the right pins so it will be hardware. |
|
|
|
MCC目前不包括PIC18F450,但你可以使用PIC18F外围库与你的PIC。它们现在被称为PIC18F遗留外围库。你必须分开安装
以上来自于百度翻译 以下为原文 MCC doesn't include PIC18F4550 at the moment, but you can use PIC18F Peripheral Libraries with your PIC. They are now called PIC18F Legacy Peripheral Libraries. you have to install them separately |
|
|
|
你是一个大师,然后(用电子学术语),你仍然可以使用SW解决方案,甚至在那些别针——我个人觉得方法更容易。
以上来自于百度翻译 以下为原文 You're a Master, then (in electronics terms) You can still use SW solution even on those pins - personally I find that approach easier. |
|
|
|
|
|
|
|
啊,但那是因为你是一个大师。但是SW方法更便携,并且没有怪癖和未知的硬件问题。(它也永远不会悬挂)
以上来自于百度翻译 以下为原文 Ahhh, but that's because you're a Master ;) Ahah no well, it depends. But SW approach is more portable, and free from quirks and unknown issue from the hardware... (and it will also never hang) |
|
|
|
嗨,2个星期前,有一个线程,最后用I2C主控的一些示例代码,使用PIC18和PLIB函数中的I2C硬件外围设备,更新到当前版本的XC8:HTTP://www. MigCHIP.COM/FUMMS/FUNDSPE/975在PIC18中的RDWRADE,等待每个操作完成,在程序继续之前,代码首先被写入PIC18F623,并且在调试时在PIC18F26K22上进行测试。PIC18F45 50与I2C主模式中的这些设备没有太大的不同,但是只有一个MSSP硬件模块,所以功能NAM.用于I2C操作的ES需要不同。问候,Mysil
以上来自于百度翻译 以下为原文 Hi, As late as 2 weeks ago, there was a thread that ended up with some example code for I2C Master, using the I2C hardware peripheral in PIC18 and Plib functions, updated to work with current versions of XC8: http://www.microchip.com/forums/FindPost/975571 The code in the example there use the MSSP hardware in PIC18, and wait for each operation to complete, before the program continue. The code was first written for PIC18F6723, and was tested on PIC18F26K22 when debugging. PIC18F4550 is not much different from these devices in I2C Master mode, but have only one MSSP hardware module, so function names used for I2C operations will need to be different. Regards, Mysil |
|
|
|
谢谢大家的回应。我还不清楚我应该使用什么和如何准确。我使用MPLAB IDV860,使用PkIt 3上传我的代码,但是我看到编译器我使用的也很重要。但是我现在怎样才能使用我的编译器呢?谁知道PIC18F45的I2C通信的例子?我知道I2C和我知道如何编程它,但我真的没有找到合适的库/文件我需要。在zip中,你可以找到我已经在MPLAB为我的PIC18F45 50写的代码,它是一个简单的演示与PC真正的USB通信,但我还需要沟通真正的I2C到我的IO扩展器。DS
以上来自于百度翻译 以下为原文 Thank you everyone for your response. It's still not 100% clear to me what I should use and how exactly. I'm using MPLAB IDE V8.60 and using PICKit 3 to upload my code but I saw that the compiler I use also matter. But how can I now which compiler I'm using? Anyone who knows an example for the PIC18F4550 with I2C communication? I undrstand I2C and I know how to program it but I don't really find the proper library's/files I need. In the ZIP you can find the code I already wrote in MPLAB for my PIC18F4550, it's a simple demo for communicating with a PC true USB but I also need to communicate true I2C to my IO expander. Regards, Attachment(s) CODE.zip (49.17 KB) - downloaded 243 times |
|
|
|
你落后了!MPLAB 8的最终版本是V892。它仍然可用,但不再更新。你应该更新从860..它可以从Microchip下载下载归档WebPalp.Hypp//www. MicroChIP.COM/Dealth-Toos/Debug文件,不知道你使用的编译器和版本是什么?MPLAB在输出窗口中报告它编译的每个文件!有一些原因,你可能倾向于使用编译器XC8V1.33.对于I2C来说,有多种可能性,但是它们都有一些bug或障碍。有例子代码:嵌入式代码库,以及在Web上的各种教程站点。
以上来自于百度翻译 以下为原文 You are way behind! The last version of MPLAB 8 was v8.92. It is still useable, but no longer updated. You should update from 8.60. It may be downloaded from Microchip downloads archive webpage. http://www.microchip.com/development-tools/downloads-archive Don't know what compiler and version you are using? MPLAB report it in the Output window for every file it compile! There are some reasons you may prefer to stay with compiler XC8 v1.33. For I2C, there are several possibilities, but all of them have bugs or snags of some kind. There are example code in: EmbeddedcodeSource, and in various tutorial sites around the web. Regards, Mysil |
|
|
|
您好,我的配置MPLAB IDE版本的892Load工具版本:MPASMWIN .EXE V5.44、MPLANKIK.EXE V4.42、MC18.EXE V3.41、MPLB.EXE V4.42C编译器:MPLAB C18 V3.41,对于我来说,这个旧版本比新MPLAB更容易使用。MPLAID+C18.如果你不使用新的MCU设备(不支持MPLAID+C18),我更喜欢使用MikROC。
以上来自于百度翻译 以下为原文 hello, my config MPLAB IDE version 8.92 Language tool versions: mpasmwin.exe v5.44, mplink.exe v4.42, mcc18.exe v3.41, mplib.exe v4.42 C compiler : MPLAB C18 v3.41 for me , this old version is more easy to use than new MPLAB.X wich take very big place and a lot of files compare to the compact solution with MPLAB IDE + C18. if you don't use rescent MCU ..(not supported by MPLAB IDE + C18) for New MCU devices , i prefer to use MikroC. |
|
|
|
只有小组成员才能发言,加入小组>>
5237 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3201 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
771浏览 1评论
659浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
589浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
671浏览 0评论
571浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 03:17 , Processed in 1.624398 second(s), Total 100, Slave 84 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号