Use a serial port as a Counter/Interval timer/Frequency meter
Use a serial port as a Square wave Generator
Richard L. Grier
Hard & Software
Copyright © Richard L. Grier 2012
A RS-232 serial port may be used as a counter/timer and frequency meter, with certain limitations. This application uses of one of the hardware input handshaking lines to count pulses and to make measurements in code based on pulse timing. This example uses the Carrier Detect (DCD) input line plus ground, but either Dataset Ready (DSR) or Clear to Send (CTS) input lines might be used instead.
View the full paper here.
Download the EXE (Note the .NET Framework 4.0 is required and must be installed on the target PC).
Here is an another application and description that may be of interest. Download Square wave Generator paper. The source code is on the CD ROM that accompanies my book. Download the SquareWave generator application. This application requires the .NET Framework 4.0.
Return to Hard & Software