Skip to main content
2 of 2
replaced http://electronics.stackexchange.com/ with https://electronics.stackexchange.com/

See https://electronics.stackexchange.com/a/67091/10371 (Since this is another stack exchange site, I won't copy the info)

The short answer is to use timers that trigger interrupts. Examples are shown in the link.

walrii
  • 131
  • 4