paper: Observe Windows multitasking effect on 50Hz app

Thread created automatically to discuss a document in CD-Media.

Observe Windows multitasking effect on 50Hz app
by: Ether

Small 32-bit Windows console app toggles the RTS pin of the COM1 RS232 serial port at 50Hz 75% duty cycle. With a digital storage oscilloscope, you can see how Windows multitasking affects the signal.

Here’s a simple-to-use tool for classroom or lab instruction. This small 32-bit Windows console app toggles the RTS pin of the COM1 RS232 serial port at 50Hz 75% duty cycle. With a digital storage oscilloscope, you can see how Windows multitasking affects the signal.

This is just for teaching purposes. No attempt was made to optimize the realtime behavior of the app (e.g. by assigning higher priority)

If you don’t have a scope, take an old DOS machine and connect its RS232 CTS pin to the RTS pin of the Windows machine under test. Whenever a change in the CTS logic state occurs, the DOS machine records the elapsed time since the previous change. Plotting this data is a great way to visualize tens of thousands of cycles.

With the slower (1Hz) version the signal can be observed (crudely) with a cheap analog voltmeter.


If you don’t have access to a storage scope or a PC to capture the RTS signal, Win32PSdemo can be used instead. This app uses the RDTSC clock of the machine (must be Pentium) on which it is running to measure how Windows is scheduling it, and displays the results interactively.

RTS.zip (74.1 KB)
Win32PSdemo.zip (11.3 KB)