完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
救命!我已经打了好几个星期了。我已经开发了一个Beigle Boin IO突破板,它使用两个PIC18F67 K40设备来增加可用串行端口的数量。这些图片用五个UART中的一个连接到Beigle骨。每个PIC的目的是将可用串行数(RS485/RS422)端口从1扩展到4,因此使用这两个PICS,Beaglebone应该有8个工作端口。问题是我只能得到4个扩展端口中的3个在一个PIC和2个4个端口上工作。两个PIC设备的代码是相同的,除了在两个之间变化的PIN映射,以简化电路板布局。使用MCC 3.55.1生成PIN映射代码。我不是PPS设置的专家,但最好的是,我可以告诉他们,他们正在正确地生成。我已经验证了安塞尔引脚被清除的一切,因为我们不使用模拟的任何东西。MCC与分配的引脚没有显示任何其他冲突。具有两个失效端口的单元的引脚是RB0/2和RB3/ 5(RX/TX)。只有一个失效端口的PIC是RB0/2。当我说失败时,我指的是在RX PIN上有良好的信号(在范围内验证),但在使用调试器时没有接收。当我试图从TX引脚发送没有信号输出。不过,我知道引脚是从其他测试功能。我已经尝试了三个不同的板,所有相同的结果。我可以成功地切换IO引脚没有问题,如果我复制的TX输出引脚的工作端口到失败的端口,我得到预期的输出。正如我前面提到的,RB3/TX的RX/TX对在一个实现中工作良好,而不是另一个,所以我知道这些引脚可以工作。我还没有找到一个工作解决方案来让RB0/2工作,但我没有对所有可能的解决方案做详尽的测试,这是我不应该做的。我已经为两个PICS附上了PIN管理器代码。任何帮助或建议,至于我能看到什么,将不胜感激。
PixMauner-2.2.C(3.54 KB)-下载6次 以上来自于百度翻译 以下为原文 Help! I've been fighting this for weeks now. I've developed a Beaglebone IO breakout board which uses two PIC18F67K40 devices to increase the number of available serial ports. The PICs are connected to the Beaglebone using one of their five UARTs. The purpose of each PIC is to expand the number of available serial (RS485/RS422) ports from 1 to 4, so with the two PICs the Beaglebone should have 8 working ports. The problem is I can only get 3 of the 4 expansion ports working on one PIC and 2 of 4 ports on the other. The code for the two PIC devices is identical except for the pin mapping which varies between the two in order to simplify the board layout. The pin mapping code is being generated using MCC 3.55.1. I'm not an expert in the PPS settings but the best that I can tell they are being generated correctly. I've verified that the ANSEL pins are cleared for everything since we're not using analog for anything. MCC doesn't show any other conflicts with the assigned pins. The problems pins for the unit with two failing ports are RB0/2 and RB3/5 (RX/TX). The PIC with only one failing port is RB0/2. When I say failing I am referring to the fact that there is good signal (verified on a scope) at the RX pin and yet there is no reception when using the debugger. When I try to transmit from the TX pin there is no signal output. However, I know the pins are functional from other tests. I've tried three different boards all with the same result. I can successfully toggle the IO pins without problems and if i duplicate the TX output pin of a working port to the failing ports I get the expected output. Like I mentioned before, the RX/TX pair on RB3/5 work fine in one implementation and not the other so I know those pins can work. I haven't yet found a working solution to get RB0/2 to work but I haven't done an exhaustive test off all possible solutions, which I shouldn't have to do. I've attached the pin manager code for both PICs. Any help or suggestions as to what else I can look at would be greatly appreciated. Attachment(s) pin_manager_1.c (3.54 KB) - downloaded 7 times pin_manager_2.c (3.54 KB) - downloaded 6 times |
|
相关推荐
4个回答
|
|
可能问题在于你的代码中的其他地方,然后是PIN管理器?
以上来自于百度翻译 以下为原文 Possibly the issues lie somewhere in your code other then the pin manager? |
|
|
|
我终于解决了这个问题。这对MCC来说是个问题。它允许我将UART 1和2分配给端口B管脚而没有任何错误,但是当我在数据表中验证它时,这是不被支持的。
以上来自于百度翻译 以下为原文 I finally resolved the problem. It was a problem with MCC. It allowed me to assign UART 1 and 2 to port B pins without any errors but this is not supported when I verified it in the datasheet. |
|
|
|
|
|
|
|
HiCode generatorssad:我知道应该有一个很好的理由让我不喜欢它们。OTHH,即使使用代码生成器,一个人也应该重复检查事物。它就像PCB脚印,每个路由应用程序都有很多LIBs,但是我总是详细检查我使用的每一个。
以上来自于百度翻译 以下为原文 Hi Code generators sad: I knew there should be a good reason for me not to like them. OTOH, even using code generators, one should allways double check things. Its like PCB footprints, each routing application comes with lots of libs, but I allways check in detail each one I use. |
|
|
|
只有小组成员才能发言,加入小组>>
5244 浏览 9 评论
2035 浏览 8 评论
1955 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3214 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2261 浏览 5 评论
780浏览 1评论
676浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
602浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
684浏览 0评论
581浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 04:13 , Processed in 1.359565 second(s), Total 83, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号