| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 162 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 162 Page - STCmicro Technology Co,.Ltd |
|
162 / 377 page ![]() sbit PCA_LED = P1^0; //PCA test LED sbit CCP0 = P3^7; void PCA_isr() interrupt 7 using 1 { CCF0 = 0; //Clear interrupt flag PCA_LED = !PCA_LED; //toggle the test pin while CCP0(P3.7) have a falling edge } void main() { CCON = 0; //Initial PCA control register //PCA timer stop running //Clear CF flag //Clear all module interrupt flag CL = 0; //Reset PCA base timer CH = 0; CMOD = 0x00; //Set PCA timer clock source as Fosc/12 //Disable PCA timer overflow interrupt CCAPM0 = 0x11; //PCA module-0 capture by a negative tigger on CCP0(P3.7) //and enable PCA interrupt // CCAPM0 = 0x21; //PCA module-0 capture by a rising edge on CCP0(P3.7) and //enable PCA interrupt // CCAPM0 = 0x31; //PCA module-0 capture by a transition (falling/rising edge) //on CCP0(P3.7) and enable PCA interrupt WAKE_CLKO = 0x80; //enable PCA falling/raising edge wakeup MCU //from power-down mode CR = 1; //PCA timer start run EA = 1; while (1) { CCP0 = 1; //ready read CCP0 port while (!CCP0); //check CCP0 _nop_(); _nop_(); PCON = 0x02; //MCU power down _nop_(); _nop_(); P2++; } } 162 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |