Hi guys
I've only done a few things with B4R so I'm not quite prepared.
I have a Mega 2560, I need to have a trick accurate every 0.1 ms to increment a long type variable and count input pulses, for counting I would like to use two of the 16 bit counters but I don't know how to initialize them and I don't know which pins they correspond to.
Is it better to use the counters or use the interrupt to capture the pulses?
Are they fast pulses coming out of an encoder (pulses already separated, up and down)
Do you have any examples to propose on how to initialize timers as counters to capture external pulses and to generate a cadence every 0.1 ms?
Thanks to all
I've only done a few things with B4R so I'm not quite prepared.
I have a Mega 2560, I need to have a trick accurate every 0.1 ms to increment a long type variable and count input pulses, for counting I would like to use two of the 16 bit counters but I don't know how to initialize them and I don't know which pins they correspond to.
Is it better to use the counters or use the interrupt to capture the pulses?
Are they fast pulses coming out of an encoder (pulses already separated, up and down)
Do you have any examples to propose on how to initialize timers as counters to capture external pulses and to generate a cadence every 0.1 ms?
Thanks to all