XC8例子:MPLAB X 1.60, xc8, PIC16f690
来源:互联网 发布:a5淘宝客助手v1.8 编辑:程序博客网 时间:2024/05/16 18:14
#include <xc.h>
// CONFIG
#pragma config FOSC = INTRCCLK // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled and can be enabled by SWDTEN bit of the WDTCON register)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON // MCLR Pin Function Select bit (MCLR pin function is MCLR)
#pragma config CP = OFF // Code Protection bit (Program memory code protection is disabled)
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)
#pragma config BOREN = ON // Brown-out Reset Selection bits (BOR enabled)
#pragma config IESO = OFF // Internal External Switchover bit (Internal External Switchover mode is disabled)
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enabled bit (Fail-Safe Clock Monitor is enabled)
#define _XTAL_FREQ 8000000 //required for _delay() function
void init(void){
TRISA =0b00000000; //PORTA is output
PORTA =0b00000000; //PORTA initially off
//GIE=1; //enable global interrupts
}
//system test function
void sys_test(void){
unsigned char loopctr=0; //loop counter
for(loopctr=0; loopctr <=3; loopctr++){
PORTA =0b00001111; //turn on LEDs
__delay_ms (500);
PORTA =0b00000000; //turn off LEDs
__delay_ms (500);
}
}
1 0
- XC8例子:MPLAB X 1.60, xc8, PIC16f690
- MPLAB X XC8编译器件入门 基于PIC18F45K80
- unicodedecodeError:'ascii' codec cant decode byte 0xc8 inposition...
- android.content.res.Resources$NotFoundException: String resource ID #0xc8
- 坑爹的 ascii codec can't decode byte 0xc8
- mysql插入中文出现错误:incorrect string value:'\xD5\xC5\xC8\xFD\xB7\xE1'的解决办法
- android.content.res.Resources$NotFoundException: String resource ID #0xc8问题集结
- android.content.res.Resources$NotFoundException: String resource ID #0xc8报错解决
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 3: invalid continuation byte
- python中运行错误: 'utf-8' codec can't decode byte 0xc8'
- UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 12: invalid continuation byte
- Anaconda Unicode DecodeError: 'ascii' codec can't decode byte 0xc8 in position 1
- MPLAB X IDE调试代码
- MPLAB X IDE调试代码
- MPLAB X IDE使用心得
- MPLAB X LAB初学使用
- Learning Python 027 解决错误:SyntaxError: Non-UTF-8 Code Starting With '\xc8' in File xxxx.py
- python3:SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc8 in position xx: invalid co
- MySQL为表增加一列属性解决方案
- springmvc中的interceptor配置
- MySQL 使用 SSL 连接(附 Docker 例子)
- 嵌入式Linux字符设备驱动模型详解
- 第16周实践——复数结构体
- XC8例子:MPLAB X 1.60, xc8, PIC16f690
- Java的LockSupport.park()实现分析
- ROS官方教程[翻译]---xacro的介绍与使用
- [Web] 简易Markdown可预览编辑器 —— Codemirror+Marked+Prism
- 解决 Android N 上 报错:android.os.FileUriExposedException
- ORACLE EBS建立一个简单的Form
- 网站必须从注重用户使用习惯去布局
- ios 如何实现UIWebView的缓存
- RTSP协议、RTMP协议、HTTP协议的区别