0
嗨即時通訊使用arduino Mega2560。 我想設置一個triger到中斷。 插針53,52,51,50和12,13。Arduino Mega2560設置中斷
void setup(){
PCICR |= (1 << PCIE0);
PCMSK0 |= (1 << PCINT0);
PCMSK0 |= (1 << PCINT1);
PCMSK0 |= (1 << PCINT2);
PCMSK0 |= (1 << PCINT3);
PCMSK0 |= (1 << PCINT6);
PCMSK0 |= (1 << PCINT7);
}
ISR(PCINT0_vect){
// Code when one of the pins was changed
}
這不適合我可以有人請幫忙嗎?
非常感謝你的完美兄弟! –