simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Simulavr-devel] Re: [patch #7034] display frequency in fool-proof way


From: address@hidden
Subject: [Simulavr-devel] Re: [patch #7034] display frequency in fool-proof way
Date: Mon, 21 Dec 2009 16:43:00 -0700

On Mon Dec 21 16:15 , Petr Hluzin  sent:
>Follow-up Comment #3, patch #7034 (project simulavr):
>
>> %1.4f might leave off a couple significant digits.
>> I'd use %1.6f .
>
>Are there crystals with that much digits?

Yes.

>Are they used?

Yes, but not necessarily for AVRs.
The one I'm sure of is used to decode color from NTSC signals.

>Are they worth the clutter?
>(I suppose no crystals with 0.1 Hz resolution exist.)

'Twouldn't matter.
fcpu is an integer.  1000000.1 is not.
That reminds me of a more significant issue.
IIRC simulavr does not store the frequency as such.
It stores the period as a whole number of nanoseconds.
To inform the user, that is the number that needs printing.
It is usually less than 1000 and almost always less than 32000.

>I do not mind the proposed change, though.


>> Also, do we want to go back and forth between cout and printf?
>
>I suppose we do not but I am not familiar with C++ streams and the printf
>style is more universally known anyway.

---
Michael Hennebry
address@hidden
"War is only a hobby."
---- Msg sent via CableONE.net MyMail - http://www.cableone.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]