资源简介
单片机型号PIC18F25K83,开发环境为MPLAB X IDE V4.05,例程包含I/O,TIM,UART,I2C,CAN,ADC程序,全部手敲并调试完成,需要的小伙伴们可以拿去参考一下。
代码片段和文件信息
/*
* File: main.c
* Author: Jefenson
*
* Created on 2018年3月28日 上午11:42
*/
// CONFIG1L
#pragma config FEXTOSC = HS // External Oscillator Selection (HS (crystal oscillator) above 8 MHz; PFM set to high power)
#pragma config RSTOSC = EXTOSC_4PLL// Reset Oscillator Selection (EXTOSC with 4x PLL with EXTOSC operating per FEXTOSC bits)
// CONFIG1H
#pragma config CLKOUTEN = OFF // Clock out Enable bit (CLKOUT function is disabled)
#pragma config PR1WAY = ON // PRLOCKED One-Way Set Enable bit (PRLOCK bit can be cleared and set only once)
#pragma config CSWEN = ON // Clock Switch Enable bit (Writing to NOSC and NDIV is allowed)
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable bit (Fail-Safe Clock Monitor enabled)
// CONFIG2L
#pragma config MCLRE = EXTMCLR // MCLR Enable bit (If LVP = 0 MCLR pin is MCLR; If LVP = 1 RE3 pin function is MCLR )
#pragma config PWRTS = PWRT_OFF // Power-up timer selection bits (PWRT is disabled)
#pragma config MVECEN = OFF // Legacy interrupt behavior
#pragma config IVT1WAY = ON // IVTLOCK bit One-way set enable bit (IVTLOCK bit can be cleared and set only once)
#pragma config LPBOREN = OFF // Low Power BOR Enable bit (ULPBOR disabled)
#pragma config BOREN = SBORDIS // Brown-out Reset Enable bits (Brown-out Reset enabled SBOREN bit is ignored)
// CONFIG2H
#pragma config BORV = VBOR_2P45 // Brown-out Reset Voltage Selection bits (Brown-out Reset Voltage (VBOR) set to 2.45V)
#pragma config ZCD = OFF // ZCD Disable bit (ZCD disabled. ZCD can be enabled by setting the ZCDSEN bit of ZCDCON)
#pragma config PPS1WAY = ON // PPSLOCK bit One-Way Set Enable bit (PPSLOCK bit can be cleared and set only once; PPS registers remain locked after one clear/set cycle)
#pragma config STVREN = ON // Stack Full/Underflow Reset Enable bit (Stack full/underflow will cause Reset)
#pragma config DEBUG = ON // Debugger Enable bit (Background debugger enabled)
#pragma config XINST = OFF // Extended Instruction Set Enable bit (Extended Instruction Set and Indexed Addressing Mode disabled)
// CONFIG3L
#pragma config WDTCPS = WDTCPS_31// WDT Period selection bits (Divider ratio 1:65536; software control of WDTPS)
#pragma config WDTE = OFF // WDT operating mode (WDT Disabled; SWDTEN is ignored)
// CONFIG3H
#pragma config WDTCWS = WDTCWS_7// WDT Window Select bits (window always open (100%); software control; keyed access not required)
#pragma config WDTCCS = SC // WDT input clock selector (Software Control)
// CONFIG4L
#pragma config BBSIZE = BBSIZE_512// Boot Block Size selection bits (Boot Block size is 512 words)
#pragma config BBEN = OFF // Boot Block enable bit (Boot block disabled)
#pragma config SAFEN = OFF // Storage Area Flash enable bit (SAF disabled)
#pragma config WRTAPP = OFF // Application Block write protection bit (Application Block not write protected)
// CONFIG4H
#pragma co
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1312940 2018-03-28 16:58 ADC.X\build\default\debug\main.p1
文件 74 2018-03-28 16:58 ADC.X\build\default\debug\main.p1.d
文件 682915 2018-03-28 16:58 ADC.X\build\default\debug\main.pre
文件 1312940 2018-03-28 16:58 ADC.X\build\default\production\main.p1
文件 84 2018-03-28 16:58 ADC.X\build\default\production\main.p1.d
文件 682915 2018-03-28 16:58 ADC.X\build\default\production\main.pre
文件 24694 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.cmf
文件 13988 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.elf
文件 1141 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.hxl
文件 47788 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.lst
文件 26596 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.map
文件 465 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.mum
文件 6113 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.obj
文件 53031 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.rlf
文件 10279 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.sdb
文件 7533 2018-03-28 16:58 ADC.X\dist\default\debug\ADC.X.debug.sym
文件 435 2018-03-28 16:58 ADC.X\dist\default\debug\memoryfile.xm
文件 27014 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.cmf
文件 13988 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.elf
文件 957 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.hex
文件 1161 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.hxl
文件 47788 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.lst
文件 26646 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.map
文件 465 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.mum
文件 6133 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.obj
文件 53031 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.rlf
文件 10279 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.sdb
文件 7543 2018-03-28 16:58 ADC.X\dist\default\production\ADC.X.production.sym
文件 445 2018-03-28 16:58 ADC.X\dist\default\production\memoryfile.xm
文件 6233 2018-03-28 16:58 ADC.X\main.c
............此处省略272个文件信息
- 上一篇:R软件教程(中文版)
- 下一篇:1000道 word excel 上机操作试题
评论
共有 条评论