| データシートサーチシステム |
|
STC89C53RC データシート(PDF) 13 Page - STCmicro Technology Co,.Ltd |
|
|
|||||||||||||||||||||||||||||
STC89C53RC データシート(HTML) 13 Page - STCmicro Technology Co,.Ltd |
|
13 / 165 page ![]() void main (void) { unsigned char j = 0; unsigned char wakeup_counter = 0; //clear interrupt wakeup counter variable wakeup_counter Begin_LED = 0; //system start-up LED INT_System_init ( ); //Interrupt system initialization while(1) { P2 = wakeup_counter; wakeup_counter++; for(j=0; j<2; j++) { Normal_Work_Flashing( ); //System normal work } Is_Power_Down = 1; //Set this bit before go into Power-down mode PCON = 0x02; //after this instruction, MCU will be in power-down mode //external clock stop _nop_( ); _nop_( ); _nop_( ); _nop_( ); } } void INT_System_init (void) { IT0 = 0; /* External interrupt 0, low electrical level triggered */ // IT0 = 1; /* External interrupt 0, negative edge triggered */ EX0 = 1; /* Enable external interrupt 0 IT1 = 0; /* External interrupt 1, low electrical level triggered */ // IT1 = 1; /* External interrupt 1, negative edge triggered */ EX1 = 1; /* Enable external interrupt 1 EA = 1; /* Set Global Enable bit } void INT0_Routine (void) interrupt 0 { if (Is_Power_Down) { //Is_Power_Down ==1; /* Power-Down wakeup on INT0 */ Is_Power_Down = 0; Is_Power_Down_LED_INT0 = 0; /*open external interrupt 0 Power-Down wake-up LED indicator */ while (Power_Down_Wakeup_Pin_INT0 == 0) { /* wait higher */ } Is_Power_Down_LED_INT0 = 1; /* close external interrupt 0 Power-Down wake-up LED indicator */ } 13 |
|
リンク URL |
| ALLDATASHEETはお客様のビジネスに役立ちますか? [ DONATE ] |
Alldatasheetは | 広告 | お問い合わせ | プライバシーポリシー | データシートへのリンク | リンク交換 | メーカーリスト 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 |