標(biāo)題:
新唐單片機(jī)N76E003例程源碼下載
[打印本頁(yè)]
作者:
835587254
時(shí)間:
2018-8-15 16:34
標(biāo)題:
新唐單片機(jī)N76E003例程源碼下載
0.png
(46.41 KB, 下載次數(shù): 81)
下載附件
2018-8-15 17:58 上傳
0.png
(8.13 KB, 下載次數(shù): 73)
下載附件
2018-8-15 17:58 上傳
全部資料51hei下載地址:
Sample_Code.rar
(10.72 MB, 下載次數(shù): 220)
2018-8-15 16:32 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
部分源碼預(yù)覽:
#if 0
//#define Enable_ADC_AIN0 ADCCON0&=0xF0;P17_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT0;ADCCON1|=SET_BIT0 //P17
//#define Enable_ADC_AIN1 ADCCON0&=0xF0;ADCCON0|=0x01;P30_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT1;ADCCON1|=SET_BIT0 //P30
//#define Enable_ADC_AIN2 ADCCON0&=0xF0;ADCCON0|=0x02;P07_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT2;ADCCON1|=SET_BIT0 //P07
//#define Enable_ADC_AIN3 ADCCON0&=0xF0;ADCCON0|=0x03;P06_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT3;ADCCON1|=SET_BIT0 //P06
//#define Enable_ADC_AIN4 ADCCON0&=0xF0;ADCCON0|=0x04;P05_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT4;ADCCON1|=SET_BIT0 //P05
//#define Enable_ADC_AIN5 ADCCON0&=0xF0;ADCCON0|=0x05;P04_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT5;ADCCON1|=SET_BIT0 //P04
//#define Enable_ADC_AIN6 ADCCON0&=0xF0;ADCCON0|=0x06;P03_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT6;ADCCON1|=SET_BIT0 //P03
//#define Enable_ADC_AIN7 ADCCON0&=0xF0;ADCCON0|=0x07;P11_Input_Mode;AINDIDS=0x00;AINDIDS|=SET_BIT7;ADCCON1|=SET_BIT0 //P11
//#define Enable_ADC_BandGap ADCCON0|=SET_BIT3;ADCCON0&=0xF8; //Band-gap 1.22V
//#define PWM0_FALLINGEDGE_TRIG_ADC ADCCON0&=~SET_BIT5;ADCCON0&=~SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1&=~SET_BIT2;ADCCON1|=SET_BIT1
//#define PWM2_FALLINGEDGE_TRIG_ADC ADCCON0&=~SET_BIT5;ADCCON0|=SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1&=~SET_BIT2;ADCCON1|=SET_BIT1
//#define PWM4_FALLINGEDGE_TRIG_ADC ADCCON0|=SET_BIT5;ADCCON0&=~SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1&=~SET_BIT2;ADCCON1|=SET_BIT1
//#define PWM0_RISINGEDGE_TRIG_ADC ADCCON0&=~SET_BIT5;ADCCON0&=~SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1|=SET_BIT2;ADCCON1|=SET_BIT1
//#define PWM2_RISINGEDGE_TRIG_ADC ADCCON0&=~SET_BIT5;ADCCON0|=SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1|=SET_BIT2;ADCCON1|=SET_BIT1
//#define PWM4_RISINGEDGE_TRIG_ADC ADCCON0|=SET_BIT5;ADCCON0&=~SET_BIT4;ADCCON1&=~SET_BIT3;ADCCON1|=SET_BIT2;ADCCON1|=SET_BIT1
//#define P04_FALLINGEDGE_TRIG_ADC ADCCON0|=0x30;ADCCON1&=0xF3;ADCCON1|=SET_BIT1;ADCCON1&=~SET_BIT6
//#define P13_FALLINGEDGE_TRIG_ADC ADCCON0|=0x30;ADCCON1&=0xF3;ADCCON1|=SET_BIT1;ADCCON1|=SET_BIT6
//#define P04_RISINGEDGE_TRIG_ADC ADCCON0|=0x30;ADCCON1&=~SET_BIT3;ADCCON1|=SET_BIT2;ADCCON1|=SET_BIT1;ADCCON1&=~SET_BIT6
//#define P13_RISINGEDGE_TRIG_ADC ADCCON0|=0x30;ADCCON1&=~SET_BIT3;ADCCON1|=SET_BIT2;ADCCON1|=SET_BIT1;ADCCON1|=SET_BIT6
#endif
/******************************************************************************
The main C function. Program execution starts
here after stack initialization.
******************************************************************************/
void main (void)
{
P12_Quasi_Mode; //For GPIO1 output, Find in "Function_define.h" - "GPIO INIT"
InitialUART0_Timer1(115200);
Enable_ADC_BandGap; //Find in "Function_define.h" - "ADC INIT"
while(1)
{
clr_ADCF;
set_ADCS; // Each time ADC start trig signal
while(ADCF == 0);
printf ("\n Value = 0x%bx",ADCRH);
printf ("\n Value = 0x%bx",ADCRL);
clr_GPIO1;
// Timer0_Delay1ms(100);
set_GPIO1;
}
}
復(fù)制代碼
作者:
emose
時(shí)間:
2018-9-10 20:13
Thank you for your code
作者:
660022
時(shí)間:
2018-9-27 15:35
Thank you for your code
作者:
527610bian
時(shí)間:
2019-5-20 15:18
謝謝樓主,下載學(xué)習(xí)一下串口1 的配置
作者:
qzhua
時(shí)間:
2019-7-2 22:33
謝謝分享。。。
作者:
現(xiàn)實(shí)只;貞
時(shí)間:
2019-7-30 11:19
下載失敗怎么辦
作者:
ggpp
時(shí)間:
2019-8-7 11:22
謝謝樓主
作者:
kevintang
時(shí)間:
2019-10-18 08:52
謝謝樓主,謝謝分享。
作者:
huanga
時(shí)間:
2020-11-7 14:58
TKS!!!!
作者:
marbolin
時(shí)間:
2021-2-5 09:36
thank you for your code
歡迎光臨 (http://www.torrancerestoration.com/bbs/)
Powered by Discuz! X3.1