What is the best display format for large frequency values?

On a sunny day (Mon, 7 Sep 2009 08:30:41 -0700 (PDT)) it happened MooseFET wrote in :

I am not good in 'sed', but that will only get rid of 1 comma: # echo 12,345,678 | sed "s/,//"

12345,678

How to get of the other ones?

Oh, I see: # echo 12,345,678 | sed "s/,//" | sed "s/,//"

12345678

Nice !

Reply to
Jan Panteltje
Loading thread data ...

On a sunny day (Sun, 06 Sep 2009 09:11:55 +0300) it happened Paul Keinanen wrote in :

Here are some test output (real) from measuring my CB transmitter on channel 39, comments added later:

Ah, I made a mistake, was already surprised all was so stable. This sequence shows the mistake:

27389568 27,389,568 Hz 27389536 27,389,536 Hz

27389920 27,389,920 Hz

27389952 27,389,952 Hz

When slowly changing the crystal frequency, the display makes 32 Hz steps. The resolution is only 32 Hz!

This is because of the / 32 pre-scaler used for the high frequencies. This is the timer 0 pre-scaler. A software issue, as timer0 is only 8 bits, and to get a < 4MHz signal at the output of timer0 for an theoretical maximum input frequency of say 100 MHz, so a PIC with 20 MHz crystal and instruction cycle of 20 / 4 = 5 MHz can measure the timer0 output, you need to divide by 25, and that is not a binary value, and the next one up is :32.

This could be improved by using timer1 perhaps, it is a 16 bit timer. And there is a Microchip application note that shows how to get the value of the prescaler counter, so 1 Hz is possible. But that would require a rewrite, I used the counter code from somebodies 7 segment display project, not my own. I would have to rewrite the whole thing.... In the mean time 32 Hz is not bad as resolution on the highest frequency range. I will keep the 8 digits :-)

Hope I understood it now :-)

Reply to
Jan Panteltje

Note, use sed "s/,//g" to remove all commas. See section about s-command flags in "info sed". e, g, i, and m flags behave sort of similarly for s/// commands in sed and perl.

Reply to
z.b.

} }'

Yes, the "g" is missing. My keyboard has a sticky "G" key so I will blame that.

Reply to
MooseFET

...

...

With a trick of forced clocking of the prescaler one can get the prescaler count as well. Perhaps the first guy who did this was Weeder.

E.g. I build a small logging frequency counter with nothing more than a PIC12F275 and a 74HC4046 as input amplifier. There is no display, the ouput goes out via RS232. The format is in Hz without any "pretty" formatting and directly usable in a .csv file for loading by a spreadsheet. Resolution is 1Hz in 1s gate mode. The thing runs on a

10MHz crystal, but accepts an external reference signal by direct injection via a resistor on the crystal circuit. It is as simple as I could make it, but I find it rather useful. Works beyond 60 MHz. Below 100Khz or so the 4046 prefers square wave signals.

Joop

Reply to
Joop

On a sunny day (Tue, 08 Sep 2009 23:24:03 +0200) it happened Joop wrote in :

Yes I have seen that app note.

Clever to use the 4046 input as input amp :-) I am not using any input amp, just a 100pF capacitor, works great so far too.

Reply to
Jan Panteltje

It depends on what works best for yourself. I've even seen posts by Europeans that would use 19.999.968 Hz , which would confuse the heck out of Americans.

Sure! Just get displays that are capable of doing commas, and control it the same way as you control leading-zero suppression. (i.e., you wouldn't want to display, e.g., , 19,968 Hz, etc.) and a "commas/blanks (or periods)" switch.

In fact, you could probably replace the 4th, 7th, etc displays with "commas-only" digit positions.

The implementation, of course, is left as an exercise for the reader. ;-)

Good Luck! Rich

Reply to
Rich Grise

On a sunny day (Tue, 08 Sep 2009 21:56:01 GMT) it happened Rich Grise wrote in :

It is already done, user can select any or all of 3 options, this shows them all activated:

formatting link

Reply to
Jan Panteltje

The last column is the best for reading, except the two entries < 1 kHz, which should autoscale to Hz.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

It's okay as long as you aren't using PD 2. Little glitches that don't bother the XOR PD cause the loop to unlock with the phase-frequency detector.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Should I believe the final 68 part?

I like comma's, but then I'm American.

George H.

Reply to
George Herold

n

nel 39, comments added later:

.

the

z,

n measure the timer0 output,

e up is :32.

of the prescaler counter,

ies 7 segment display project, not my own.

range.

opps. why do I bother.

George H.

Reply to
George Herold

On a sunny day (Tue, 8 Sep 2009 18:11:28 -0700 (PDT)) it happened George Herold wrote in :

That steps in 32 increments, because of teh rescaler. Can be fixed i nsoftware, some otehr project some time. See the otehr postings in this threat

Yes that is one thing that the EU should really change. because every calculator you can buy here uses the dot to indicate fractions, so it is silly to hang on to a comma for that. I mean they still write like 4,95 Euro here on the price tags... Well I am not holding my breath.

Reply to
Jan Panteltje

And you like apostrophes too much. You NEVER use an apostrophe to make a plural (well, you're not supposed to, even though too many people do), except for certain acronyms where the concatenated 's' would confuse the reader.

formatting link

Hope This Helps! Rich

Reply to
USENET Apostrophe Police

The idea was borrowed from an AADE (Neil) design.

It uses PC1. And there is no PLL involved, simply the input buffer.

Joop

Reply to
Joop

Ick.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

Selectable sounds real good.

Reply to
JosephKK

Riddle"

:

suppression of course:

simply display in Hz.

they can select the auto ranging option.

the '.' dot,

example by 'awk' and shell scripts.

field, and send it to some other box also via RS232:

-en \\"Front temp=3D%6s\\"", $1) ; system(tempstring) ; = sysstring=3Dsprintf("echo -e -n \\"\\001Front temp=3D%s\\337C\\r\\" > = /dev/ttyS1", substr($1, 1, 2)); system(sysstring) }'

integrated in scripting, and be used to control anything via the PC.

outputting 2 fields (if bash was to have problems with things like =

27,123,456 Hz):

second field would be user-friendly output.

segment display.

=46or ASCII i/o use scientific notation to base units. That is what the instrument heavyweights have done for over 30 years.

Reply to
JosephKK

testing,

Bargraphs

analyzers:

part)

more

feature

There is also the issue of how much real precision you want to indicate. If you are accurate to 5 digits, show it. Being accurate to more than 6 digits is still a good accomplishment. Getting to 8 and being believed is somewhat problematic, especially without an OXCO.

Reply to
JosephKK

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.