| Electronic Components Datasheet Search |
|
STC12LE5616AD Datasheet(PDF) 154 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC12LE5616AD Datasheet(HTML) 154 Page - STCmicro Technology Co,.Ltd |
|
154 / 377 page ![]() 6.7.3 Programs of P3.4/T0 Interrupt(falling edge) used to wake up PD mode 1. C program /*-----------------------------------------------------------------------------------------------------------------------------*/ /* --- STC MCU International Limited --------------------------------------------------------------------------------*/ /* --- STC 1T Series MCU Power-Down wakeup by T0 Demo ----------------------------------------------------*/ /* ---This Interrupt will borrow Timer 0 interrupt request bit TF0 and Timer 0 interrupt vector address ----*/ /* ---So Timer 0 function should be disabled when this Interrupt is enabled -------------------------------------*/ /* ---The enable bit of this Interrupt is T0_PIN_IE / WAKE_CLKO.4 in WAKE_CLKO register -----------*/ /* If you want to use the program or the program referenced in the ----------------------------------------------*/ /* article, please specify in which data and procedures from STC ----------------------------------------------*/ /*-----------------------------------------------------------------------------------------------------------------------------*/ #include "reg51.h" #include "intrins.h" sfr WAKE_CLKO = 0x8f; //External interrupt0 service routine void t0int( ) interrupt 1 //T0 interrupt, interrupt 1 (location at 000BH) { } void main() { WAKE_CLKO = 0x10; //enable P3.4/T0/ P3.4/T0/INT falling edge wakeup MCU //from power-down mode //T0_PIN_IE (WAKE_CLKO.4) = 1 //ET0 = 1; //enable T0 interrupt EA = 1; //open global interrupt switch while (1) { T0 = 1; //ready read T0 port while (!T0); //check T0 _nop_(); _nop_(); PCON = 0x02; //MCU power down _nop_(); _nop_(); P1++; } } 154 |
|
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 |