wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
462 stars 73 forks source link

External Interrupt Request support (INT0/INT1) #70

Closed urish closed 2 years ago

urish commented 3 years ago

Some GPIO pins have designated External Interrupts. On ATmega328p, these are PD2 (INT0) and PD3 (INT1).

The interrupt can be triggered on rising edge, falling edge, both edges, or as long as the pin is held low ("When the INT0 or INT1 interrupts are enabled and are configured as level triggered, the interrupts will trigger as long as the pin is held low")

For more details see Section 12 of the Datasheet

urish commented 3 years ago

Note: this may make more sense to implement after #38 is in place