完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
当单元被接通时,控制器工作良好。当故障发生时,LCD不工作时,它显示未知的数据。这是配置数据,是否需要对配置进行修改?我使用Goto函数调用程序中的一些函数。这是否在程序中产生了错误。//CONT1H-PracMA配置文件OSC=hs/振荡器选择位(HS振荡器)?配置IESO=OF//内/外部振荡器切换位(振荡器切换模式禁用)//CON2L L ProfMa配置,PWRT=O//上电定时器允许位(PWRT禁用)配置BORV=3 / /棕色输出重置电压位(最小设置)//Conn2H-PracMa配置,WDT=OF//看门狗定时器允许位(WDT禁用(控制放在SWDTEN位)),γ-PrAPMA CONFIG WDTPS=32768 / /看门狗定时器后标选择位(1:327 68)//Conn3Hα-PracMA配置CCP2MX= PORTC//CCP2 MUX位(CCP2输入/输出与RC1复用)α-PrAPMA配置PBAEN=OF//PORTB A/D使能位(PORTB& LT;4:0&G.引脚被配置为复位时的数字I/O)。γ-PracMA配置LPT1OSC=关/ /低功率time1振荡器使能位(Time1配置为更高功率操作)配置MCLRE = //MCLR引脚使能位(MCLR引脚启用;RE3输入引脚禁用)//OX4L L PracMA配置STVLUN =关闭/ /堆栈满/下溢复位允许位(堆栈满/下流将导致复位),γ-PracMA配置LVP=关闭/ /单电源ICSP使能位(单电源ICSP禁用)配置XNST=OF//扩展指令集使能位(指令集扩展和索引寻址模式禁用(遗留模式))//CONT5LπPracMA配置CP0= OF//代码保护位(块0(000 0800~1001FFFH)未受代码保护)α-PracMA配置CP1=OF//代码保护位(块1(0))0- 033FFFH)未被保护的码(2)(04000~0.5FFFH)未被代码保护(γ-PracMa配置)CP3=OF//代码保护位(块3(06000~07FFFH)未受代码保护)//CONT5Hα-PracMA配置CPB=OF//引导块代码保护位(Boo-BLO)CK(000000 -000 07FFH)未被编码保护)PyrAdPrima配置文件CPD=OF//数据EEPROM代码保护位(数据EEPROM代码保护)//CONT6L L PrAPMA配置符WRT0=关闭/写入保护位(块0(000 0800~-1001FFFH)未写保护)α-PrAPMA配置WRT1=关闭/写入保护位(块1)(00200)0- 03FFFH)不写保护配置符WTT2= OF//WORD保护位(块2(9000-05FFFH)不受写保护)α-PrAPMA配置WRT3=OF//写保护位(块3(06000~07FFFH)未写保护)//CONT6H-PARMA配置符WRTC = OF//配置寄存器写保护离子位(配置寄存器(300 000~3000 0FFH)不写保护)μTracMa配置符WRTB=关闭/ /引导块写入保护位(引导块(000000 -000 07FFH)不写保护)α-PrAPMA配置WRTD=OF//数据EEPROM写保护位(数据EEPROM不写保护)//CONT7L LG EBTR0= OF//表读取保护位(块0(000 0800~1001FFFH)未被保护在其他块中执行的表读取)(Syr Prima配置文件EBTR1= OF//表读取保护位)(块1(02000~33FFFH)未被保护在其他块中执行的表读取)读保护位(块2(04000~05FFFH)未被保护在其他块中执行的表读取)(3)(表6读写保护位)(块未被保护的块块(06000~0.77FFFH),在其他块中执行)//CONT7Hα-PrAPMA配置EBTRB= OF//BOOT块表READ保护位(引导块(000000 -000 07FFH))未被保护在其他块中执行表读取
以上来自于百度翻译 以下为原文 When the unit is switched ON the controller working fine.When the power down across some malfunction are coming like LCD not working,it showing unknown datas. This is config datas,Is their any change have to made to config bits..? I'm using goto function to call some of the function in program too.Is this making anything wrong in the program. // CONFIG1H #pragma config OSC = HS // Oscillator Selection bits (HS oscillator) #pragma config FCMEN = OFF // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor disabled) #pragma config IESO = OFF // Internal/External Oscillator Switchover bit (Oscillator Switchover mode disabled) // CONFIG2L #pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config BOREN = OFF // Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software) #pragma config BORV = 3 // Brown Out Reset Voltage bits (Minimum setting) // CONFIG2H #pragma config WDT = OFF // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit)) #pragma config WDTPS = 32768 // Watchdog Timer Postscale Select bits (1:32768) // CONFIG3H #pragma config CCP2MX = PORTC // CCP2 MUX bit (CCP2 input/output is multiplexed with RC1) #pragma config PBADEN = OFF // PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset) #pragma config LPT1OSC = OFF // Low-Power Timer1 Oscillator Enable bit (Timer1 configured for higher power operation) #pragma config MCLRE = ON // MCLR Pin Enable bit (MCLR pin enabled; RE3 input pin disabled) // CONFIG4L #pragma config STVREN = OFF // Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset) #pragma config LVP = OFF // Single-Supply ICSP Enable bit (Single-Supply ICSP disabled) #pragma config XINST = OFF // Extended Instruction Set Enable bit (Instruction set extension and Indexed Addressing mode disabled (Legacy mode)) // CONFIG5L #pragma config CP0 = OFF // Code Protection bit (Block 0 (000800-001FFFh) not code-protected) #pragma config CP1 = OFF // Code Protection bit (Block 1 (002000-003FFFh) not code-protected) #pragma config CP2 = OFF // Code Protection bit (Block 2 (004000-005FFFh) not code-protected) #pragma config CP3 = OFF // Code Protection bit (Block 3 (006000-007FFFh) not code-protected) // CONFIG5H #pragma config CPB = OFF // Boot Block Code Protection bit (Boot block (000000-0007FFh) not code-protected) #pragma config CPD = OFF // Data EEPROM Code Protection bit (Data EEPROM code-protected) // CONFIG6L #pragma config WRT0 = OFF // Write Protection bit (Block 0 (000800-001FFFh) not write-protected) #pragma config WRT1 = OFF // Write Protection bit (Block 1 (002000-003FFFh) not write-protected) #pragma config WRT2 = OFF // Write Protection bit (Block 2 (004000-005FFFh) not write-protected) #pragma config WRT3 = OFF // Write Protection bit (Block 3 (006000-007FFFh) not write-protected) // CONFIG6H #pragma config WRTC = OFF // Configuration Register Write Protection bit (Configuration registers (300000-3000FFh) not write-protected) #pragma config WRTB = OFF // Boot Block Write Protection bit (Boot block (000000-0007FFh) not write-protected) #pragma config WRTD = OFF // Data EEPROM Write Protection bit (Data EEPROM not write-protected) // CONFIG7L #pragma config EBTR0 = OFF // Table Read Protection bit (Block 0 (000800-001FFFh) not protected from table reads executed in other blocks) #pragma config EBTR1 = OFF // Table Read Protection bit (Block 1 (002000-003FFFh) not protected from table reads executed in other blocks) #pragma config EBTR2 = OFF // Table Read Protection bit (Block 2 (004000-005FFFh) not protected from table reads executed in other blocks) #pragma config EBTR3 = OFF // Table Read Protection bit (Block 3 (006000-007FFFh) not protected from table reads executed in other blocks) // CONFIG7H #pragma config EBTRB = OFF // Boot Block Table Read Protection bit (Boot block (000000-0007FFh) not protected from table reads executed in other blocks) |
|
相关推荐
1个回答
|
|
我不确定我完全理解你的问题,但是你可以试着把这两个设置改为“off”,你的TraceMac配置,pWRT=关闭/ /上电定时器允许位(pWRT禁用)。LCD不能正常工作,它可能是LCD代码中的一个错误。
以上来自于百度翻译 以下为原文 I'm not sure I fully understand your problem, but you could try changing these two settings to "off" #pragma config PWRT = OFF // Power-up Timer Enable bit (PWRT disabled) #pragma config BOREN = OFF // Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software) If it is purely your LCD that is not working correctly, it could be a bug in your LCD code. |
|
|
|
只有小组成员才能发言,加入小组>>
4825 浏览 9 评论
1831 浏览 8 评论
1749 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
2956 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2060 浏览 5 评论
461浏览 1评论
1111浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
364浏览 0评论
263浏览 0评论
LAN9252使用SQI通信,进行数字复位后读BYTE_TEST异常
1800浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-26 16:40 , Processed in 1.156030 second(s), Total 75, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号