- Jun 6, 2020
- 11,517
- 4,383
I have a C++ app running on an Arduino Nano which has at its core a fast A/D read triggered by a pin interrupt. So, a shaft running at around 3000rpm has a sensor which triggers the interrupt every revolution. I then need to save the time this occurs and then do several hundred fast A/D converter reads of each of two other sensors, noting the time of each read. The values are saved for later use.
Sensing the interrupt is the only time critical job. Since I need better than one degree of resolution, the interrupt latency variation cannot exceed 28uS, which it appears I cannot achieve with the polled mechanism in B4R. Note, I can calibrate out the interrupt latency but I must have a latency variation of less than 28uS.
The A/D is read as fast as possible for many revolutions and the data stashed away. After enough revolutions there is data for every degree of position. If not it doesn't matter because it is all done again the next time the interrupt is enabled at which time the...
Sensing the interrupt is the only time critical job. Since I need better than one degree of resolution, the interrupt latency variation cannot exceed 28uS, which it appears I cannot achieve with the polled mechanism in B4R. Note, I can calibrate out the interrupt latency but I must have a latency variation of less than 28uS.
The A/D is read as fast as possible for many revolutions and the data stashed away. After enough revolutions there is data for every degree of position. If not it doesn't matter because it is all done again the next time the interrupt is enabled at which time the...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید