millis() off by 20%?

KE7GKP:

  1. __Tango would be reporting a DIFFERENT problem (that he couldn't upload sketches) if there were a problem communicating between the USB processor and the Arduino processor. The fact that he is able to upload code and download test results would appear to be prima facia evidence that the serial and USB communication are operational.

Agreed, and that means the clock frequency of the 328p is accurate enough to support the 115200 baudrate of the bootloader, not something possible if the resonator was off by 20%.

  1. The places that fabricate and assemble PC boards for cheap are deep in the interior of a place where datasheets (even if they did exist) are written in a language foreign to both of us. And those assembly vendors concentrate on delivering the minimum requirement for the lowest price. That is how they survive in their industry. OTOH, if "official" Arduino boards are really manufactured in Italy then we must come up with some other explanation. Or __Tango could have a counterfeit or clone for all we know.

"Official" Arduino boards are made in Italy, however they have lincensed some firms (SparkFun? other?) to manufacture some of their board types. Of course the vast number of Asian 'arduino' boards are not official but are made and sold without regards to and violating the Arduino trademark.

  1. I suspect that the board manufacturer (Arduino?, their vendor?, a counterfeiter?) saves money by requiring only some sort of functionality test at the end of the assembly line and does not reject boards for clock frequency excursions. I continue to reject the notion that a u-proc clock can be used for timekeeping in any meaningful way. We have RTC and TCO for that sort of thing.

Time keeping over longer periods is best done using a RTC or other methods, no disagreement there. Even if one used a high accuracy crystal or TCXO or OCXO clock oscillator, the fact that interrupt useage can effect millis() accumulation over time is a good reason not to use software RTC functions.

  1. They left the hole patterns for a proper crystal for those who find the cheap ceramic resonator intolerable.

Or to give them flexiblity on sourcing parts for batch manufacturing runs. There wanting and receiving FCC type acceptenace for the Uno board could be another reason for their resonator choice. Only someone from the Arduino firm could answer those questions.

  1. I agree that there could be other reasons for __Tango's reported results. But apparently my world-view is not as tidy and accurate as yours. An Arduino board is low-end mass-market consumer goods. Not intended to be any kind of accurate laboratory- (or even industrial-) grade product. Note that there is no published spec for the Uno clock accuracy.

It is a mass-market product for sure, but must have a time base accuracy good enough to support the 115200 baudrate used by the bootloader.