Skip to main content
shopping_basket Basket 0
Login

FORTHdsPIC and a Kill Switch

Bill Marshall
1
Engineer, PhD, lecturer, freelance technical writer, blogger & tweeter interested in robots, AI, planetary explorers and all things electronic. STEM ambassador. Designed, built and programmed my first microcomputer in 1976. Still learning, still building, still coding today.

Comments

September 25, 2020 10:03

Bill a more elegant solution to debounce in an isr i have found is
save working regs, int flags etc in case another interrupt occurs whilst servicing this one (not needed in this case as you are reseting)
disable global interrupts
process interrupt
(usually the setting of a variable flag to execute in main code) again not needed due to reset
reload regs to catch interrupts that may have happened whilst in this isr
enable global interrupts
All the best

0 Votes

Related Content

DesignSpark Electrical Logolinkedin