?? exp2.c
字號:
#include <io8535.h>
#include <intrinsics.h>
#pragma vector=0x02
__interrupt void ext_int0_isr(void)
{
PORTA=PORTA^0x1; //toggle the LSB of port A
}
void main(void)
{
DDRA=0x01; //port A LSB set for output
GIMSK=0x40; //set the INT0 bit to enable external interrupt 0
MCUCR=0x02; //set the ISC01 to activate on a falling edge
__enable_interrupt(); //enable the global interrupt enable bit
while(1)
; //do nothing - the interrupt does it all
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -