The code is designed to "stop" as the the digitalWrite output will driver external equipment to override a situation and the for( ) There will be hardware alerting me of the situation at this point. The code for the ISR calls are exactly the same (cut/past) except updating the pins as required in the attachinterrupt command and the pinMode in the setup void. I simulate the CHANGE condition by removing the jumper thats a logic 1 from each interrupt pin that is noted as an external input pin for the 2560 and light up a led to show the code drops thru right. I understand the Elegoo is a compatible and assume (maybe in error) there is a pin for pin functionality. To turn on PCINT’s you need to configure the PCICR (Pin Change Interrupt Control Register) according to your specific purposes. The interrupts are being called independently so no sequence issues, etcĪll the the referenced external interrupts from the Arduino site do not work in the CHANGE mode. I am using attachinterrupts on the 2560 in the CHANGE mode but only pin 2 and 3 work as described. Then at T=0+ after that trigger, I need to see the state of an external device and then watch for a CHANGE in its status. My problem is why the value of pin 20 & 21 sowing 0. I need to see conditions after an external trigger causes specific code for that external source. I am not using change interrupts because Mega 2560 board already has 06 interrupt pins i.e 2,3,18,19,20,21. I am new to this so forgive me as I am in a learning curve. I am having issues with an Elegoo MEGA2560 and its external interrupt handling.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |