PIC单片机上电不运行,请教什么原因?

2020-02-06 10:02发布

PIC单片机 PIC18F26K80,故障现象

电路连接
PC机------USB转CAN-------目标板--------稳压电源供电

上电后,单片机不运行,晶振工作正常

将示波器探头夹子和目标板地线连接,重新上电,工作正常

不知什么原因,如果修改

MCLR 有上拉电阻10K


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
8条回答
jack12345
1楼-- · 2020-02-06 10:31
configuration bits
#pragma config FOSC =???
#pragma config WDT = OFF
  
我做我的王
2楼-- · 2020-02-06 11:51
VCAP的106电容接了吗
2005n2005
3楼-- · 2020-02-06 15:33
Internal externel osc switch over 关了没
zhousun
4楼-- · 2020-02-06 15:51
jack12345 发表于 2016-8-18 19:17
configuration bits
#pragma config FOSC =???
#pragma config WDT = OFF

// CONFIG1L
/*----------------------------------------------------------------
VREG Sleep Enable bit (Ultra low-power
regulator is Disabled (Controlled by REGSLP bit))
------------------------------------------------------------------*/
#pragma config RETEN = OFF  
/*----------------------------------------------------------------
LF-INTOSC Low-power Enable bit (LF-INTOSC
in High-power mode during Sleep)
------------------------------------------------------------------*/

#pragma config INTOSCSEL = HIGH
/*----------------------------------------------------------------
SOSC Power Selection and mode
Configuration bits (High Power SOSC circuit selected)
------------------------------------------------------------------*/
#pragma config SOSCSEL = HIGH   
#pragma config XINST = OFF       // Extended Instruction Set (Enabled)

// CONFIG1H
/*----------------------------------------------------------------
Oscillator (HS oscillator (Medium power, 4
MHz - 16 MHz))
------------------------------------------------------------------*/
#pragma config FOSC = HS1      
//#pragma config FOSC = INTIO2      
#pragma config PLLCFG = ON      // PLL x4 Enable bit (Enabled)
#pragma config FCMEN = OFF      // Fail-Safe Clock Monitor (Disabled)
/*----------------------------------------------------------------
Internal External Oscillator Switch Over
Mode (Disabled)
------------------------------------------------------------------*/
#pragma config IESO = OFF      

// CONFIG2L
#pragma config PWRTEN = ON     // Power Up Timer (Disabled)
/*----------------------------------------------------------------
Brown Out Detect (Enabled in hardware,
SBOREN disabled)
------------------------------------------------------------------*/

#pragma config BOREN = SBORDIS  
#pragma config BORV = 0         // Brown-out Reset Voltage bits (1.8V)
/*----------------------------------------------------------------
BORMV Power level (ZPBORMV instead of
BORMV is selected)
------------------------------------------------------------------*/
#pragma config BORPWR = HIGH
// CONFIG2H
/*----------------------------------------------------------------
Watchdog Timer (WDT disabled in hardware;
SWDTEN bit disabled)
------------------------------------------------------------------*/
#pragma config WDTEN = OFF      
#pragma config WDTPS = 1048576  // Watchdog Postscaler (1:1048576)

// CONFIG3H
/*----------------------------------------------------------------
ECAN Mux bit (ECAN TX and RX pins are
located on RB2 and RB3, respectively)
------------------------------------------------------------------*/

#pragma config CANMX = PORTB   
/*----------------------------------------------------------------
MSSP address masking (7 Bit address
masking mode)
------------------------------------------------------------------*/
#pragma config MSSPMSK = MSK7   
#pragma config MCLRE = OFF  // Master Clear Enable (MCLR Enabled, RE3 Disabled)

// CONFIG4L
#pragma config STVREN = ON      // Stack Overflow Reset (Enabled)
#pragma config BBSIZ = BB2K     // Boot Block Size (2K word Boot Block size)
zhousun
5楼-- · 2020-02-06 20:01
 精彩回答 2  元偷偷看……
zhousun
6楼-- · 2020-02-06 23:50
我做我的王 发表于 2016-8-18 19:25
VCAP的106电容接了吗

接了,,10uf  测量电压约3.2v

一周热门 更多>