I am pondering a project that would read two linear scales, do some processing on the results and send a single result as a standard distance output to a DRO display.
I assume I will need to read interrupts (2 each?) on both scale inputs. I am presently using Nano Everys, but can certainly change.
Also, can an Arduino send an appropriate linear scale data stream to a DRO ?
Are you reading analog volts on each device like from load cells?
From the AVR datasheets you find that when switching from analog pin to analog pin the single on-chip ADC has to clear before iy can get a good read so recommended practice is to read twice and only save the second. If you read that same pin again and again they're all good.
A 10 bit read takes aboy 105 microsecs, an 8 bit read takes less, link to a complete tutorial on AVR Analog Inputs.
You might get 4 or 5 good reads per ms while switching back and forth which is so slow in cpu terms (>3000 cycles per read) that polling is the better way to collect. During conversion the cpu goes quiet by default at least while sampling, that's from full datasheets.
If you are reading from sensors on a serial bus, you might use an interrupt but those have like 85 cycles overhead and text even at SPI speed is coarser than that.
OTOH have a look at the very cheap RPi Pico with dual core AMD 133Mhz MCU )3.3V easier-to-burn pins, runs about $5 ea.
You can make your own analog measures by seeing how many digital reads it takes to drain a piece of wire 1 microamp per read until the pin goes low (1.1V Ref on AVR). Reading the port PINx register takes 1 cycle but the 32 bit count++ and while loop take a few more but 50K reads/sec is in the park of possible, small values at low res can be determined to meet or exceed minimums very quickly.
What matters most are the requirements you need to meet. How to do it is second to that.
You could summarize that as, a possible reason for using interrupts is that you need them for hardware timed reads. I guess, for the usual reason which would be increased bandwidth and good real time performance. I just thought scales didn't sound like something that would need a high frequency response.
A similar idea is sitting idle here.
Why don't You connnect those scales directly to the DRO? Wrong connector, wrong type of communication? Do they use 9 pin DSUBs?
My scales are different, magnetic, and Ebay no name and USB a, I guess the name is.
Calling for interrupts is common among people not knowing much about that. For ignorant people the unknown is either the reason for failure or the miracle solution, and both are always wrong. Being a support guy for many years...
0.0002" is 5/1000's of an inch. EDIT: Wrong! It is 1/5000"! 2 tenths of 1/1000!
If you would convert say 6 inches to mm's so close then use 25.4001 mm per inch. That works to .010" tolerances or did 40 years ago.
Oh but 2 tenths?
I see where interrupts might count, you HAVE to catch ALL the pulses, IF it works that way. Do you know that you can get a 133MHz dual-core AMD board for about $5 or could not long ago? Watch 2 slides with 2 threads on 1 set of pins and memory, programming choices include Arduino and micro-Python... the Raspberry Pi Pico.
Faster to insanely faster (600 MHz Teensy 4.1 last I looked) are options for data capture, the Teensy has an on-board micro-SD slot and a for-real FPU!