历史上的今天
今天是:2025年04月25日(星期五)
2020年04月25日 | 【MPLAB X IDE】05:配置位(Configuration bits)
2020-04-25 来源:eefocus
环境
MPLAB X IDE版本:v5.10
编译器:xc16-gcc v1.20
解决方法
1、打开菜单 ProductionSet Configuration Bits,弹出 配置位 界面。按照工程要求,修改参数。

2、点击 输出生产源代码。把下列代码贴到主程序中,即可。
// PIC24EP64GP204 Configuration Bit Settings
// 'C' source line config statements
// FICD
#pragma config ICS = PGD1 // ICD Communication Channel Select bits (Communicate on PGEC1 and PGED1)
#pragma config JTAGEN = OFF // JTAG Enable bit (JTAG is disabled)
// FPOR
#pragma config ALTI2C1 = OFF // Alternate I2C1 pins (I2C1 mapped to SDA1/SCL1 pins)
#pragma config ALTI2C2 = OFF // Alternate I2C2 pins (I2C2 mapped to SDA2/SCL2 pins)
#pragma config WDTWIN = WIN75 // Watchdog Window Select bits (WDT Window is 75% of WDT period)
// FWDT
#pragma config WDTPOST = PS4096 // Watchdog Timer Postscaler bits (1:4,096)
#pragma config WDTPRE = PR128 // Watchdog Timer Prescaler bit (1:128)
#pragma config PLLKEN = ON // PLL Lock Enable bit (Clock switch to PLL source will wait until the PLL lock signal is valid.)
#pragma config WINDIS = OFF // Watchdog Timer Window Enable bit (Watchdog Timer in Non-Window mode)
#pragma config FWDTEN = OFF // Watchdog Timer Enable bit (Watchdog timer enabled/disabled by user software)
// FOSC
#pragma config POSCMD = HS // Primary Oscillator Mode Select bits (HS Crystal Oscillator Mode)
#pragma config OSCIOFNC = OFF // OSC2 Pin Function bit (OSC2 is clock output)
#pragma config IOL1WAY = ON // Peripheral pin select configuration (Allow only one reconfiguration)
#pragma config FCKSM = CSDCMD // Clock Switching Mode bits (Both Clock switching and Fail-safe Clock Monitor are disabled)
// FOSCSEL
#pragma config FNOSC = PRIPLL // Oscillator Source Selection (Primary Oscillator with PLL module (XT + PLL, HS + PLL, EC + PLL))
#pragma config IESO = ON // Two-speed Oscillator Start-up Enable bit (Start up device with FRC, then switch to user-selected oscillator source)
// FGS
#pragma config GWRP = OFF // General Segment Write-Protect bit (General Segment may be written)
#pragma config GCP = OFF // General Segment Code-Protect bit (General Segment Code protect is Disabled)
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#include
史海拾趣
|
最近做一个设计,用的是CPLD XCR3064XL,工具为ISE9.0,我的顶层接口是clk,datain,rst,dataout四个管脚,如下图: 可是当我分配管脚时却出现了另外的接口信号,如下图: 不太明白这是为什么?… 查看全部问答> |
|
PB5,添加中文,日文,英文都能正常显示正常的操作系统介面,但添加泰文时,能编译成功,当烧写到板子上时,不显示泰文系统,显示的却是英文,请教各位高手,我怎么才能把系统转换成泰语的系统?谢谢各位啦! … 查看全部问答> |
|
1)进入ST中文主页:http://www.stmicroelectronics.com.cn/ 2)在“产品”栏目点击“微控制器”,就可以看到下面的界面: 下载 (55.5 KB) 2010-2-4 16:55 ----------------------------------------------- 还可以 ...… 查看全部问答> |
|
感觉身边使用MSP430的客户特别多,网上资料多,参考书籍也很多,便开始评价MSP430系列MCU。 看到网上开发工具很多,也有免费申请的,便申请了一套学习板。开始学习使用,下载示例代码, ...… 查看全部问答> |




