English (the german version is at the second half) ------- This Package for Linux +RTAI ( www.rtai.org ) is for frequency measurement and impulse counting over the parallel port interrupt, pin 10 of the parallel port. As hardware only a PC with a parallel port and a parallel port plug with a wire is necessary. For safety a 5.1 V zener diode to ground (pin 18-25 or chassis) should be used. The binaries can be created via "make all". The measurement is done by the module, which is started by start.sh and stopped by stop.sh. The output of the measured values is done by the program user_frequency_counter0, which outputs both values (number of registrated pulses, frequency) every second. The measurement and counting works within the range of 0 to 270 kHz, even under full load. So it can not be used for for a really wide range, but the hardware required is minimal and the data are allready in the PC, where they can be used for logging and/or controlling. With some lines more, reciprocal frequency measurement can be done and other time intervals than one second can be used, but i never needed it. The parallel port must be configured as "Normal" or "Standard Parallel Port", short SPP, in the BIOS. In other modes, e. g. ECP, bidirectional, EPP, generally you can't get an parallel port IRQ. The Pin 10 must be used with 5 V / 0.0 V pulses, with an output resistance of max. 220 Ohm of the input circuit, because some parallel ports do have an internal pullup resistor of about 300 Ohm. ------------------------- Deutsch: ------- Dieses Paket für Linux +RTAI ( www.rtai.org ) dient zur Frequenzmessung und Impulszählung über den Parallelport-IRQ, also dem Pin 10 des Parallelports. An Hardware ist (neben dem PC mit Parallelport) nur ein Parallelport-Stecker mit einem Draht nötig. Zur Sicherheit wird zusätzlich eine 5,1 V-Zener-Diode nach Masse (Pin 18-25 u. Gehäuse) empfohlen. Die ausführbaren Programme erhält man aus dem Sourcecode mittels make all. Die Messung selbst macht das Modul, das vom Skript start.sh gestartet wird und mit stop.sh gestoppt wird. Die Ausgabe der Werte mach das Programm user_frequency_counter0, das beide Werte (Anzahl Impulse, Frequenz) sekündlich ausgibt. Die Messung und Zählung funktioniert zumindest im Bereich von 0 bis 270 kHz auch unter Last. Das ist zwar nicht allzu viel, aber dafür hat man als Hardware-Aufwand nur einen Draht an einem 25pol. Sub-D-Stecker und zudem die Daten direkt im PC, wo man sie aufzeichnen oder zum Steuern/Regeln nutzen kann. Mit ein paar Zeilen mehr kann auch noch Reziprokfrequenzmessung machen und andere Meßintervalle als eine Sekunde vorgeben, aber das habe ich bisher nicht benötigt. Voraussetzung ist harte Echtzeit in Form von Linux mit RTAI ( www.rtai.org , www.aao.gov.au/local/www/ks/documents/RTAI_Install.pdf , http://www.aero.polimi.it/~rtai/documentation/articles/guide.html ), weil sonst die Interrupts nicht alle richtig gezählt werden können. Bei den Parallelport-Einstellungen sollte man "Normal" oder "Standard Parallel Port" (kurz SPP) einstellen, da in den anderen Modi (bidirectional, ECP, EPP) nicht jeder Parallelport interruptfähig ist. Zudem muß der Pin 10 mit 5 V-Pulsen (oder Pulldown-/Open Collector-/Open Drain-Pulsen) und maximal 220 Ohm Ausgangswiderstand angesteuert werden, da der interne Pullup-Widerstand bei einigen Parallelports im Bereich von 300 Ohm liegt. -------------------------------------------------------------------------- Dr. Rolf Freitag 2005-2008