Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

According to the SAM3X handbook it can do debouncing of interrupts "automatically", how would I enable that on an arduino due? The doc http://www.atmel.com/Images/doc11057.pdf states something about setting it directly in the PIO.

share|improve this question
5  
This question appears to be a user-level arduino issue or about use or arduino libraries, not about electronics or the embedded code that touches it. We are not the arduino help desk. –  Olin Lathrop Jul 2 at 16:54
1  
This is clearly a question about the microcontroller which just happens to sit on an Arduino board. @OlinLathrop –  jippie Jul 2 at 17:46

2 Answers 2

Then that's what you'd do. The Arduino libraries are not omnipotent, nor do they even expose all the functionality available. Sometimes you'll have no choice but to twiddle the bits yourself.

share|improve this answer
    
I try and push this whenever I can. Many people who use with Arduino really think that they're programming a microcontroller and are unaware they're using a very much simplified API. –  sherrellbc Jul 2 at 16:56

You can search the datasheet for "ebounc", which matches various spellings of "debouncing" related words. Especially chapter 32.5.9 in the datasheet you refer to describes "Input Glitch and Debouncing Filters". Find the registers that match the debouncing configuration for the I/O pins you need.

This Arduino forum post talks about direct register manipulation. In this respect the Arduino IDE works identical to how you program it in 'bare' C.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.