I2C master PIC example

韩大能耐 79 0 ZIP 2018-12-15 21:12:39

#include #include "C30EVM_LCD.h" // 將LCD函式的原型宣告檔案含入 #include // 將Timer函式的原型宣告檔案含入 #include // 將adc10函式的原型宣告檔案含入 #include "ADCSubs.h" #include "I2CSubs.h" #define FCY 7372800 * 2 // 因為使用頻率為將外部 7.3728 MHz * 8 的模式 , 每一指令週期需 4 個 clock // 所以 FCY = (7.3728 * 8 / 4 ) MHz = 7372800* 2 _FOSC(CSW_FSCM_OFF & XT_PLL8); // XT with 8xPLL oscillator, Failsafe clock off _FWDT(WDT_OFF); // Watchdog timer disab led _FBORPOR(PBOR_OFF & MCLR_EN); // Brown-out reset disabled, MCLR reset enabled _FGS(CODE_PROT_OFF); // Code protect disabled const char My_String1[]="VR1: VR2: " ; // 宣告字串於 Program Memory (因為 const 宣告) char My_String2[]="EE1: EE2: " ; // 宣告字串於 Data Memory unsigned int miliSec ; void Init_ADC(void) ; void Show_ADC(void) ;

用户评论
请输入评论内容
评分:
暂无评论