⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.c

📁 Clock+data serial protocol for PIC16/18F processors. Contains an example application for Zoom/Focus/
💻 C
字号:
#include <htc.h>/* Program device configuration word * Oscillator = EXTRC-OSC2 as Clock Out * Watchdog Timer = On * Power Up Timer = Off * RA5/MCLR Pin Function Select = MCLR * Brown Out Detect = On * Low Voltage Program = Enabled * Data EE Read Protect = Off * Flash Program Write = Write Protect Off * Background Debug = Disabled * CCP1 Mux = RB0 * Code Protect = Off */__CONFIG(0x3FFF & WDTEN & PWRTDIS & MCLREN & BOREN & LVPEN & UNPROTECT & INTCLK & DEBUGDIS & CCPRB0 & UNPROTECT);/* Program second configuration word * Fail-Safe Clock Monitor Enable = Enabled * Internal External Switch Over Mode = Enabled */__CONFIG(FCMEN & IESOEN);// Peripheral initialization functionvoid init(void){	/***** Common Code ****	 *  Global interrupt disabled during initialization	 */	INTCON	= 0b00000000;		/***** 16F88 Code ****	 *  Internal oscillator set to 8MHz	 */	OSCCON	= 0b01110000;	// Enable RBIE for UART	INTCON	= 0b00000001;		ei();	// Global interrupts enabled	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -