完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嘿GuiSi试图接口LCD与18F4620在B端口,但没有显示,与错误信息proteus(控制器接收命令,同时繁忙)。[LCD ])当试图在C端口上连接它时,它工作得很好,没有任何错误,当试图在端口B上与16F87A接口时,它工作得很好,我需要在端口B与18F4620接口,这有什么设置?我使用[18F4620] [LCDLM04L]和[MIKROC PIC ]代码如下
以上来自于百度翻译 以下为原文 Hey guys I'm trying to interface LCD with 18f4620 on port B But without display , with error message on Proteus (Controller received command whilst busy. [LCD] ) And when trying to interface it on port C , it worked good without any error And when trying to interface it on port B with 16f877a it worked good too Now , I need to interface LCD with 18f4620 on port B , What's the settings for that ? I'm using [18f4620] with [LCD LM044L] with [MikroC for pic] Code Below // LCD module connections ***it LCD_RS at RB2_bit; ***it LCD_EN at RB3_bit; ***it LCD_D4 at RB4_bit; ***it LCD_D5 at RB5_bit; ***it LCD_D6 at RB6_bit; ***it LCD_D7 at RB7_bit; ***it LCD_RS_Direction at TRISB2_bit; ***it LCD_EN_Direction at TRISB3_bit; ***it LCD_D4_Direction at TRISB4_bit; ***it LCD_D5_Direction at TRISB5_bit; ***it LCD_D6_Direction at TRISB6_bit; ***it LCD_D7_Direction at TRISB7_bit; // End LCD module connections void main( ) { Lcd_Init( ); lcd_out(1,1," Test "); } |
|
相关推荐
5个回答
|
|
对于输出引脚,您应该处理LATB寄存器,而不是PORTB寄存器。大多数PORTB引脚可以作为模拟输入。将它们转换成数字模式是您的工作。不这样做,使用PULTB而不是LATB,将导致保证失败。
以上来自于百度翻译 以下为原文 For output pins, you should address the LATB register, not the PORTB register. Most of the PORTB pins can act as analog inputs. It is YOUR JOB to switch them to digital mode. Not doing that, and using PORTB rather than LATB, will cause a guaranteed failure. |
|
|
|
我使用ADCON1= 0B1111;将所有端口转换为数字,错误信息消失,但无法在LCD上看到任何内容。
以上来自于百度翻译 以下为原文 I used ADCON1=0b1111; to convert all ports to digitals and the error message disappeared but Can't see anything on lcd // LCD module connections ***it LCD_RS at RB2_bit; ***it LCD_EN at RB3_bit; ***it LCD_D4 at RB4_bit; ***it LCD_D5 at RB5_bit; ***it LCD_D6 at RB6_bit; ***it LCD_D7 at RB7_bit; ***it LCD_RS_Direction at TRISB2_bit; ***it LCD_EN_Direction at TRISB3_bit; ***it LCD_D4_Direction at TRISB4_bit; ***it LCD_D5_Direction at TRISB5_bit; ***it LCD_D6_Direction at TRISB6_bit; ***it LCD_D7_Direction at TRISB7_bit; // End LCD module connections void main( ) { Lcd_Init( ); ADCON1=0b1111; lcd_out(1,1," Test "); } |
|
|
|
你没有改变你的别针来使用LAT寄存器。直到你调用LCDGIN IT()之后,你才改变PIN到数字,你似乎在设法确保它失败。
以上来自于百度翻译 以下为原文 You didn't change your pins to use the LAT register. You didn't change the pins to digital until AFTER you called Lcd_Init( ); You seem to be going out of your way to make sure it fails. |
|
|
|
你确定你正确地把你的液晶显示屏的EN,RS和R/W插脚连接到PIC的正确插脚吗?EN到PORTB3,RS到PORTB2和R/W到地?
以上来自于百度翻译 以下为原文 Are you sure you connected correctly your EN, RS and R/W pins of the LCD to the correct pins of the PIC as per your LCD declaration? EN to PORTB3, RS to PORTB2 and R/W to ground? |
|
|
|
当ADADADCON1=0B0111时工作良好;谢谢
以上来自于百度翻译 以下为原文 worked fine when add ADCON1=0b0111; Thanks |
|
|
|
只有小组成员才能发言,加入小组>>
5003 浏览 9 评论
1921 浏览 8 评论
1850 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3066 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2143 浏览 5 评论
571浏览 1评论
427浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
474浏览 0评论
366浏览 0评论
IPECMD命令烧录AVR128DA48芯片,报找不到芯片错误
852浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-15 14:23 , Processed in 1.526861 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191