完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
您好,我使用PIC18F97 J91驱动一个静态LCD。当我不使用时,我如何配置LCDRF、LCDRL或禁用段?这是我的设置/*LCD控制注册表*/LCDCONbits.LCDEN=1;//LCD驱动模块启用LCDCONbits.SLPEN=1;//LCD驱动模块在睡眠模式LCDCONbits中禁用。WERR=0;//无LCD写入错误LCDCONbits.CS0=0;//时钟源选择位FRC(8MHz)/8192LCDCONbits.CS1=0;LCDCONbits.LMUX0=0;//静态(COM0)LCDCONbits.LMUX1=0;LCDCONbits.LMUX2=0;/*LCD电荷泵控制寄存器*//LCDREGbits.CPEN=0;//系统中的最高电压由外部(VDD)LCDREGbits.CPEN=1提供;//调节器产生最高(3.6V)电压//LCDREGbits.BIAS0=1;//3.60V峰值(偏移量)在0V的LDBIAS0上)//LCDREGbits.BIAS1=1;//LCDREGbits.BIAS2=1;LCDREGbits.BIAS0=0;//3.21V峰值(在LCDBIAS0上偏移0.39V)LCDREGbits.BIAS1=0;LCDREGbits.BIAS2=1;LCDREGbits.MODE13=0;输出电压!!!!让我们看到改变!!!!LCDREGbits.CLKSEL1=1;/*LCD相位寄存器*/LCDPSbits.WFT=1;//B型波形(每帧边界上的相位变化)LCDPSbits.BIASMD=0;//静态偏置模式(LMUX<2:0>=000)LCDPSbits.LCDA=1;//LCD驱动器模块是活动的LCDPSbits.WA=0;//不允许写入LCDDATAx寄存器ed LCDPSbits.LP0=1;//LCD预分频器选择位=>;122Hz时钟频率LCDPSbits.LP1=0;LCDPSbits.LP2=0;LCDPSbits.LP3=0;/*LCD参考LADDER CONTROL REGISTER*/LCDREFbits.LCDIRE=1;//内部LCD参考被禁用LCDREFbits.LCDCST0=0;//最小电阻(最大对比度);树脂梯形短路LCDREFbits.LCDCST1=0;LCDREFbits.LCDCST2=0;LCDREFbits.VLCD3PE=0;//.bleBIAS3电平为内部(内部电阻梯)LCDREFbits.VLCD2PE=0;//.bleBIAS2电平为内部(内部电阻梯)LCDREFbits.VLCD1PE=0;//.bleBIAS1电平为内部(内部)l电阻梯)/*LCD参考梯子控制寄存器低*/LCDRLbits.LRLAP0=0;//内部LCD参考梯子被断电并且未连接的LCDRLbits.LRLAP1=0;LCDRLbits.LRLBP0=1;//内部LCD参考梯子在低功率模式BLCDRLLbits下供电.LRLBP1=0;LCDRLRLLAT0=0;//In三值LCD参考梯子总是在B功率模式LCDRLbits中,LRLAT1=0,LCDRLbits.LRLAT2=0,LCDSE0bits.SE05=0;//EnableLCDSE0bits.SE04=1;//Enable
以上来自于百度翻译 以下为原文 Hello, im using the PIC18F97J94 for driving a static LCD. How could I config the LCDREF, LCDRL or disable the segments when I dont use? This is my setting /*LCD CONTROL REGISTER*/ LCDCONbits.LCDEN=1; // LCD driver module is enabled LCDCONbits.SLPEN=1; // LCD driver module is disabled in Sleep mode LCDCONbits.WERR=0; // No LCD write error LCDCONbits.CS0=0; // Clock Source Select bits FRC (8 MHz)/8192 LCDCONbits.CS1=0; LCDCONbits.LMUX0=0; // Static (COM0) LCDCONbits.LMUX1=0; LCDCONbits.LMUX2=0; /*LCD CHARGE PUMP CONTROL REGISTER*/ //LCDREGbits.CPEN=0; // Highest voltage in the system is supplied externally (VDD) LCDREGbits.CPEN=1; // The regulator generates the highest (3.6V) voltage //LCDREGbits.BIAS0=1; // 3.60V peak (offset on LCDBIAS0 of 0V) //LCDREGbits.BIAS1=1; //LCDREGbits.BIAS2=1; LCDREGbits.BIAS0=0; // 3.21V peak (offset on LCDBIAS0 of 0.39V) LCDREGbits.BIAS1=0; LCDREGbits.BIAS2=1; LCDREGbits.MODE13=0; // Regulator output supports Static LCD BIAS mode LCDREGbits.CLKSEL0=0; // Disable regulator and float regulator voltage output !!!let see could be change!!! LCDREGbits.CLKSEL1=1; /*LCD PHASE REGISTER*/ LCDPSbits.WFT=1; // Type-B waveform (phase changes on each frame boundary) LCDPSbits.BIASMD=0; // Static Bias mode (LMUX<2:0> = 000) LCDPSbits.LCDA=1; // LCD driver module is active LCDPSbits.WA=0; // Writes into the LCDDATAx registers is not allowed LCDPSbits.LP0=1; // LCD Prescaler Select bits => 122 Hz Clock frequency LCDPSbits.LP1=0; LCDPSbits.LP2=0; LCDPSbits.LP3=0; /*LCD REFERENCE LADDER CONTROL REGISTER*/ LCDREFbits.LCDIRE=1; // Internal LCD reference is disabled LCDREFbits.LCDCST0=0; // Minimum resistance (maximum contrast); resistor ladder is shorted LCDREFbits.LCDCST1=0; LCDREFbits.LCDCST2=0; LCDREFbits.VLCD3PE=0; // Disable BIAS3 level is internal (internal resistor ladder) LCDREFbits.VLCD2PE=0; // Disable BIAS2 level is internal (internal resistor ladder) LCDREFbits.VLCD1PE=0; // Disable BIAS1 level is internal (internal resistor ladder) /*LCD REFERENCE LADDER CONTROL REGISTER LOW*/ LCDRLbits.LRLAP0=0; // Internal LCD reference ladder is powered down and unconnected LCDRLbits.LRLAP1=0; LCDRLbits.LRLBP0=1; // Internal LCD reference ladder is powered in Low-Power mode B LCDRLbits.LRLBP1=0; LCDRLbits.LRLAT0=0; // Internal LCD reference ladder is always in B Power mode LCDRLbits.LRLAT1=0; LCDRLbits.LRLAT2=0; LCDSE0bits.SE05=0; // Enable LCDSE0bits.SE04=1; // Enable |
|
相关推荐
2个回答
|
|
HI,LCDRIFF和LCDRL寄存器必须根据您的上下文配置-更多的信息可以在数据表中找到。为了有一个静态的LCD,所有的LCD段应该连接到一个共同的LMUX0=0(静态COM0)。可以通过清除LCDSEx寄存器(SE位)禁用分段。该设备的LCD与PIC18F87K90的LCD类似,可以在MCC中找到(从v3.15开始)。我想这可以帮助你编写你的驱动程序。
以上来自于百度翻译 以下为原文 Hi, LCDREF and LCDRL registers must be configured according with your context - more information can be found in datasheet. In order to have a static LCD, all the LCD segments should be tied to a common - LMUX0=0 (Static COM0). The segments can be disabled by clearing the LCDSEx registers (SE bits). This device's LCD is similar with the PIC18F87K90's one, and it can be found in MCC (starting with v3.15). I suppose it may helps you write your driver. Regads |
|
|
|
你好,谢谢你的回答。我确实使用MCC为PIC18F87K90配置了静态LCD,然后更改了段引脚和PIC18F97J94的一些配置。这很有帮助,但并不像我想象的那样有效。我的问题是LCDIERNAL参考和对比度的设置。当我在LCD偏置中禁用LCDIRE时,段引脚不能工作。如果我配置寄存器lMUX & lt;2:0& gt;作为静态(COM0)。我该如何配置CPEN?当我使用静态模式时,调节器不使用吗?
以上来自于百度翻译 以下为原文 Hello, thank for the answer. I did use the MCC to config the static LCD for PIC18F87K90 and then change the segment pins and some configurations for PIC18F97J94. It was helpful, but It didn't work like my imagination. My problem is the setting on LCD INTERNAL REFERENCE AND CONTRAST. When I disable the LCDIRE in LCD Bias, the segment pins doesn't work. If I config the register LMUX <2:0> as static (COM0). What should I config the CPEN? the regulator is not use when I use static mode? |
|
|
|
只有小组成员才能发言,加入小组>>
5166 浏览 9 评论
2000 浏览 8 评论
1928 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3174 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2226 浏览 5 评论
734浏览 1评论
615浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
506浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
631浏览 0评论
528浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-24 22:46 , Processed in 1.272605 second(s), Total 81, Slave 64 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号