Stopwatch does not measure time accurately


I am having some problems with a stopwatch. It seems to measure half the time it should. One reading should be about 2.5-3ms and the other about 10-12ms

I think the problem is with my fuses and the selected clock.

With fuses set to an external crystal (CKSEL = 1111 SUT = 01) I get about half the time. 1.2ms and 5.6ms

With fuses set to an internal oscillator (CKSEL = 0010 SUT = 10) I get about one forth of the time. That's about 0.6ms for the first reading.

If I enable CKDIV8 the Arduino moves so slow it is impossible to use.

I use an Arduino Pro mini 5V 16Mhz.

What am I doing wrong? Any help would be appreciated.

Reburn the bootloader, select Uno as the board type. Then Uno as the board type going forward.
Fuses will be reset to 16 MHz, external ocscillator. I burn all my 328's as Uno. Keeps like simpler.

Thank you for the reply but it did not work.

This is my UNO from boards.txt Uno

What am I doing wrong?

You have failed to properly post the code.

Have you tried code with a NON MODIFIED 328?
That is written code for a stopwatch with a bog standard 328 as CrossRoads has suggested and PLEASE,

Can you please post a copy of your sketch, using code tags?
They are made with the </> icon in the reply Menu.
See section 7,148850.0.html

Unless you post your code, we have no idea how you are configuring timers etc....

What resolution and range do you need with your stopwatch?

Thanks... Tom... :slight_smile: