You can't make precise timing measuremenst by polling inputs and servicing the LCD display inbetween. Clock cycle accurate timing measurement will need the dedicated input capture hardware inputs. If you avoid any time consuming actions during input polling, the method can at least achieve a moderate accuracy of several instruction cycles.
I've been using ATmega several years ago and don't remember the details now, you need to figure it out from the datasheet. If ATmega clock cycle resolution (125 ns @ 8 MHz) is sufficient for your application, you should be fine with timer input capture, using dedicated pins.Could you please help me that how I can measure and display at least 10 micro-second using atmega micro-controller.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?