Reputation: 11
I'm a trainee in a research center, I'm studying physics but here I'm working on electronics, so it's not really in my area. I'm using an Arduino DUE witch uses an Atmel SAM3X8E ARM Cortex-M3 and I need to count "precisely" the time between two interruptions (interruption will be ~1µs and I need a precision ~0.2µs), and the libraries made for the whole arduino world are not precise enough. I would like to have access to the Atmel's timer, but I can't manage to find a library which is doing that, I found https://github.com/ivanseidel/DueTimer and this https://github.com/antodom/tc_lib but those libraries are periodically calling back a function or are capturing pulses from outside. I've found nothing else. Do you know a library which would do that on the DUE or a tutorial on who to use the register of the Atmel arm directly in the Arduino IDE ?
Have a nice day !
Edit : Hi, In fact I am testing chips that will be implemented in an experiment in some years. They use "new technologies" (flip chip, vias, etc...) and they will evolved between -40 and 60 Celsius degrees (-40 140 F), with radiations. I have to test the lifetime of these thechnologies in this environment so "I" (with a lot of help) will put them in a oven and do cycle between -40 and 60C. I need to know when there will be a break in the circuit, this will create a glitch of, approximately, 300 ohm during 1 micro second, but I need to know "exactly" (a precision of 0.2 micro second or less, which is, in theory, possible with the 12ns clock cycle of the arduino due) the time between the rising and the falling edge of those glitches. I have 70 inputs to test and nearly no knowledge in electronics that's why I have chosen an Arduino Due with 54 inputs. I use 25 inputs on 3 Arduino. There is nearly no chance that 2 breaks happen in the same time, so my first idea was to launch an timer on the rising edge, attach the interrupt on the falling edge, and read at the end the value in the timer to know the duration (which will be approximately one micro second) with a timeout to avoid noise. But I wasn't thinking that there won't be a function to launch a timer with more precision in the Arduino's libraries ...
Upvotes: 0
Views: 856