Seite 2 von 3

Verfasst: 01.09.2005 12:52
von helpy
3579545

Intel Pentium 4 @ 1.70 GHz
Windows XP SP1

Verfasst: 01.09.2005 12:58
von NicTheQuick
Ich hab auch 3579545.

Verfasst: 01.09.2005 13:05
von Kiffi
> 66% Haben den gleichen Wert, und 33% haben total unterschiedlche
> Werte...

liegt's daran, dass ich 2 CPUs im Rechner habe?

Grüße ... Kiffi

Verfasst: 01.09.2005 13:10
von hardfalcon
Nein, ich hab ja auch nen anderen Wert... Nicht nur du... :|
Und sogar wenn's wegen deiner 2. CPU wäre: ich schreib doch keine Lib, die nur auf PC mit einer CPU funktioniert! Was passiert denn sonst, wenn der neue Pentium D sich verbreitet hat?

//EDIT: Ich *vermute*, in JEDEM PC steckt irgendein Timer, der ne Frequenz von 3579545 Hz hat, und nur in manchen PCs steckt noch ein anderer Timer, den Windows (lieber?) auswertet als den "normalen"... :?

Verfasst: 01.09.2005 13:22
von mueckerich
hardfalcon hat geschrieben: //EDIT: Ich *vermute*, in JEDEM PC steckt irgendein Timer, der ne Frequenz von 3579545 Hz hat, und nur in manchen PCs steckt noch ein anderer Timer, den Windows (lieber?) auswertet als den "normalen"... :?
Exaktomente
schau mal hier warum, ein Überbleibsel sozusagen aus der grauen Steinzeit:

Code: Alles auswählen

PC's and NTSC-525 (NTSC-M) or
"Why does the PC tick 18.2 times/second?"
The timer tick count in PC's increments about 18.2 times/second, which closely corresponds to 65536 (=10000hex) ticks per hour. Was the intention to make this exactly 65536 ticks/hour? No, this is just a concicdence.

The system clock is nominally 14.31818 MHz. This is divided by 12 to give the 1.19318166666... MHz clock to the 8253/8254 (which is often incorrectly said to be 1.193180 MHz). This frequency is divided by 65536 in channel zero of the 8253/8254 to give the timer tick rate of 18.206507364909 Hz nominal, with a cycle period of 54.92541649846559 ms nominal. There are 65543.4265 ticks in an hour.

There are 1573042.24 ticks in a day, but when the BIOS was written, the 1.19318166666... MHz frequency was approximated to 1.193180 MHz, so the BIOS writers used 1573040 (001800B0 hex) ticks per day. This contributes a 1.42166 ppm error, which is insignificant compared to the clock frequency inaccuracy (the absolute accuracy of the 14.31818 MHz clock depends mainly on the quality of the 14.31818 MHz crystal or crystal oscillator module. Initial frequency errors of +/- 20 ppm (0.002%) are common. Temperature and age will also cause frequency drift. )

1573042.24 ticks/day corresponds to 65543.43 ticks/hour, which is 0.011% more than 65536 ticks/hour - if the intention was 65536 ticks/hour exactly, they could certainly have made the agreement better than that!

The input frequency to the timer chip is 14.31818 MHz / 12 = 1.19318166666... MHz. If we instead divide by 4 we get:

        14.31818 MHz / 4  =  3.579545 MHz

which is exactly the same as the NTSC-M (525 lines) colour subcarrier frequency of 3579545 Hz.

Thus it appears that the frequency of the PC's timer tick was selected in order to use the same quartz crystal to also generate an NTSC-525 colour subcarrier frequency by simply feeding the timer chip frequency into a x3 frequency multiplier. The good ol' CGA video/graphics cards are, as you may remember, able to output not just RGB video signals but also an NTSC-525 colour composite video signal, which can be fed into the video input of any NTSC-525 colour TV received.

So there we are -- the PC's somewhat odd timer tick frequency of about 18.2 ticks/s is due to NTSC's choice of colour subcarrier frequency for 525-lines, plus IBM's desire to keep down the number of quartz crystals on the original IBM PC. It also enqbled that crystal to be obtained cheaply, since it already was produced in huge volumes, for all those colour TV sets out there.
Quelle:[/url]http://www.stjarnhimlen.se/tv/tv.html[url][/url]

Verfasst: 01.09.2005 13:22
von ts-soft
Für den Test hättest Wohl noch die Taktfrequenz und Hersteller der CPU erfragen sollen.
PS: AMD Athlon XP 2400+ (schon etwas verstaubt :mrgreen: )

Verfasst: 01.09.2005 13:27
von hardfalcon
Das mit den 18,2 Mhz hab ich schonmal irgendwo gelesen. Ich glaub, das war, als ich mal in ASM einen Beep()-Befehl coden wollte (es gab mal ne Zeit, da wollte ich mein eigenes Floppy-OS coden...).
Bleibt die Frage, warum zur Hölle Windows nicht bei jedem PC den "Steinzeittimer" auswertet, sondern nur bei den meisten. Mein PC hat ja schliesslich auch nen Steinzeittimer, sonst könnte er ja gar nicht Beep_()en... :?

//EDIT: @ts-soft: AMD athlon XP 2400+ ?! Und das nennst du Verstaubt?! Ich hab nur nen Athlon Thunderbird 1,2 Ghz (und der H****sohn läuft auch noch nur mit 100Mhz-SD-RAM!)

Verfasst: 01.09.2005 14:27
von AndyX
3579545.

P4 2.8Ghz.

Verfasst: 01.09.2005 16:30
von SoS
2598790000

P4 2.6 HT

Verfasst: 01.09.2005 16:34
von hardfalcon
Vielen Dank für die vielen Postings, aber ich weiss ja jetzt (so halbwegs), was ich wissen wollte. Danke nochmal! Jetzt hab ich ein anderes Problem (-> PBOSL-Thread) :bluescreen: