完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
你好,我正在和一个在PIC12F1571.周围开发板的客户一起工作。现在,他们想通过添加一个UART来增加更多的功能。因为所有的引脚都在使用,所以不可能仅仅改变到PIC12F1572。相反,我们正在寻找一个代码兼容的PIC,但更多的引脚。在Microchip网站上的产品矩阵中,PIC16F15323是第一个出现14个引脚和1个UART的。如在数据表上看到的,前8个引脚与PIC12F1571A完全相同;在底部,它们添加了POTCC引脚,可以与UART映射。我的问题是:代码在两个之间兼容吗?这只是一个改变目标微代码和代码工作或没有工作的问题?我看到,例如,在PIC12上的RA4引脚是ADC的AN3通道,但是在PIC16上是AN4,所以将是不同的。但是,代码生成器生成的外围设备和代码的初始化呢?这也需要改变吗?谢谢
以上来自于百度翻译 以下为原文 Hi there, I'm working with a customer which has a board developed around the PIC12F1571. Now, they want to add more functionality by adding a UART. Since all the pins are being used, it's not possible to just change to the PIC12F1572. Instead, we're looking for a code compatible PIC but with more pins. In the product matrix on the microchip website, the PIC16F15323 was the first to appear with 14 pins and 1 UART. As seen on the datasheet, the top 8 pins are the exact same as the PIC12F1571; on the bottom, they add PORTC pins, which can be mapped with the UART. My question is: is the code compatible between the two? Is it just a matter of changing the target micro and the code works or nothing works? I'm seeing that, for example, the RA4 pin on the PIC12 is the AN3 channel of the ADC, but on the PIC16 it's the AN4, so that will be different. But what about initialization of peripherals and code generated by the code generator? Does that need to change too? Thanks |
|
相关推荐
11个回答
|
|
嗨,SFR在一个PIC和另一个PIC之间变化。配置位也会改变。除非PICS只是内存变量,总是需要一些代码返工。
以上来自于百度翻译 以下为原文 Hi, SFR change between one PIC and another. Configuration bits also change. Unless the PICs are just memory variants, there is always some code rework needed... Regards |
|
|
|
如果我换一个不同的芯片,那么我就得到了那个芯片的PDF。忘记以前的芯片。你不能依赖兼容性,有些东西保持不变。比较两个芯片的差异:引脚I/O描述和特殊功能寄存器映射。如果你正确地编写了代码,那么可能只需要改变几行。
以上来自于百度翻译 以下为原文 If I change to a different chip then I get the pdf for that chip. Forget about the previous chip. You can't rely on compatibility, some things stay the same. Compare the differences for your two chips: PINOUT I/O DESCRIPTIONS and Special Function Register Maps. If you write your code correctly then you may only need to change a few lines. |
|
|
|
|
|
|
|
C,用代码生成器自动生成驱动程序。
以上来自于百度翻译 以下为原文 C, with the drivers generated automatically by the code generator. |
|
|
|
|
|
|
|
|
|
|
|
我想你最好用新的PIC开始一个新的项目,让MCC为新的PIC生成代码。
以上来自于百度翻译 以下为原文 I would think you would be best to start a new project with the new pic and let mcc generate code for the new pic. |
|
|
|
复制一个进程。在MCC中重新生成代码并查看它是否不同。验证配置比特。
以上来自于百度翻译 以下为原文 make a copy of the progect. regenerate the code in MCC and see if it is different. Verify the Config bits. |
|
|
|
|
|
|
|
嗨,将MCC项目从一个PIC迁移到另一个PIC是实验性的(如果我记得有一个消息框是用来通知用户的),可能因为PICSUSES之间的差异而不能完全工作。
以上来自于百度翻译 以下为原文 Hi, Migrating an MCC project from one PIC to another PIC is experimental (if I remember well a messagebox is generated to inform the user) and may not work fully because of the differences between PICs Regards |
|
|
|
所以需要重做并引入相同的模块。
以上来自于百度翻译 以下为原文 So one would need to redo it and bring in the same modules. |
|
|
|
只有小组成员才能发言,加入小组>>
5228 浏览 9 评论
2026 浏览 8 评论
1950 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3199 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2253 浏览 5 评论
770浏览 1评论
658浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
585浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
668浏览 0评论
570浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-18 15:00 , Processed in 1.605752 second(s), Total 68, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号