完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我使用的是DSPIC33 EV256GM102的内部振荡器(FoSC=7.37兆赫)。我有一个1602液晶显示器,通过4个数据与PIC相连,并且启用、RW和RS控制线。我写初始化命令到LCD,然后写两行文本。工作正常。2分10秒后,启动线快速地高低脉冲,导致一些东西被写入LCD。这在另外的2:10中再次发生,然后再次重复发生。我的程序现在所做的只是初始化LCD,写两行文本,然后直接进入一段时间(1)。我试着在每次While迭代中将LCD启用设置为低。我试着在启动前尝试锁定低电平。我已经把启用到另一个引脚,但脉冲仍然发生在该引脚。如果在写完数据后删除启用行,问题就解决了。您有什么想法可以导致这种行为,或者我可以采取什么额外的故障排除步骤吗?我使用标记为RPI45/PWM1L2/CTPLS/RB13的管脚24来启用,但我也尝试了标记为RPI44/PWM1H2/RB12的管脚23。我还没有执行任何与外围管脚选择相关的代码。当我通过Pickit3下载程序时,对于第一个POR,当Pickit3还在电路中时,有一些虚假的文本写入LCD。因此,我必须断开Pickkit3的连接,并在正确写入两行文本之前执行另一个POR,而不需要任何额外的数据写入。
以上来自于百度翻译 以下为原文 I am using the internal oscillator (FOSC = 7.37 Mhz) of the dsPIC33EV256GM102. I have a 1602 LCD connected to the PIC via 4 data, and enable, RW, and RS control lines. I write initialization commands to the LCD and then two lines of text. That works fine. After 2 minutes and 10 seconds the enable line quickly pulses high-low causing something to be written to the LCD. It happens again in another 2:10 and then again, repeatably. All my program does right now is initialize the LCD, write two lines of text and go directly into a while(1). I have tried setting the LCD enable low on every iteration of the While. I have tried latching the enable low before going into the While. I have moved the enable to another pin but the pulse still occurs on that pin. If I remove the enable line after writing the data, the problem goes away. Any thoughts what might cause this kind of behavior or what additional troubleshooting steps I might take? I am using pin 24 labeled RPI45/PWM1L2/CTPLS/RB13 for the enable but I have also tried pin 23 labeled RPI44/PWM1H2/RB12. I am not executing any code related to peripheral pin select yet. When I download the program via the Pickit3, for the first POR while the Pickit3 is still in the circuit, there is some spurious text written to the LCD. So I have to disconnect the Pickkit3 and do another POR before the two line of text are written correctly without any unwanted additional data writes. In conclusion there are two issues really or perhaps they are related? |
|
相关推荐
1个回答
|
|
我同意你的猜测。如果原始海报显示了它们的真实代码,那么做比猜测更容易。
以上来自于百度翻译 以下为原文 I agree with your guess. It would be a lot easier to do more than guess if the Original Poster showed their real code. |
|
|
|
只有小组成员才能发言,加入小组>>
5037 浏览 9 评论
1936 浏览 8 评论
1872 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3089 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2157 浏览 5 评论
597浏览 1评论
465浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
493浏览 0评论
395浏览 0评论
IPECMD命令烧录AVR128DA48芯片,报找不到芯片错误
874浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-9-3 04:21 , Processed in 1.117805 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191