#21ic问答#
file:///C:/Users/Administrator/Desktop/QQ%E6%8B%BC%E9%9F%B3%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D%20(2).jpg
file:///C:/Users/Administrator/Desktop/QQ%E6%8B%BC%E9%9F%B3%E6%88%AA%E5%9B%BE%E6%9C%AA%E5%91%BD%E5%90%8D.jpg
用的是xc8编译器
ANSELA = 0b00000100;
ANSELC = 0b00000000;
ADCON0 = 0b00001001;
ADCON1 = 0b11110011;
CM1CON0 = 0b00000000;
CM2CON0 = 0b00000000;
FVRCON = 0B11000010;
asm("clrwdt");
TRISA = 0b00000100;
PORTA = 0b00000000;
TRISC = 0b00100100;
PORTC = 0b00100010;
//PR2=69;
T2PR = 69 ; //???????=225
//T2CON = 0B00011100 ; //???=X:X, ???=X:X,?? TIMR2
T2CON=0b10000011;
TMR2IE = 1 ;
PIE3=0x80;
PIE1=0x40;
ei(); |