°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² SQW v(2) A simple Square Wave generator with a simple PC alone Murat AYDIN 1996 ²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²² ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±± °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°° Serial ports have either output or input capability. This specifity constituted a base for make a simple square wave generator. Neither external card nor another device was used in this generator. A simple PC is enough for this purpose. Windows is not necessary too. What you have in original package: 1. SQW.EXE, 2. SQW.TXT this file 3. PULSE.COM Place the all in a directory. WHAT CHANGED IN THIS VERSION ? 1. F3 and F4 keys were activated during the pulse generation, 2. Again, during the pulse generation, a visual presentation was provided but static. 3. Pulse duration and inter-pulse time was restricted with 2.214.999.999 æs. 4. Minor screen design changed. WHERE IS THE SQUARE WAVE? When the program begun to generate the square wave, you will read the signal from bellowing pins of serial ports (if the port is present). You have to use a fitting connector to one of them. Do not make solder for safety your I/O card. GRND ø ø ø ø ø  ø ø ø ø ø ø ø ø ø ø ø ß ø ÄÄÁÄÄ ø ø ø ø ø ø ø ß ø ÄÄÄ Ä CAN I ADJUST FREQUENCY? Yes. Either pulse duration (t1) or interpulse time (t2) are adjustable from keyboard. So that, a described frequency can be provided from the port. Volt .<---- T ---->. ³ . . ³ .- t1 - . +12 V ÅùùùùùÚÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ 0 ÅÄÄÄÄÄÄÄÄÄÄÄijÄÄÄÄÄijÄÄÄÄÄÄijÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ>time ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ -12 V ÅùùùùùùùùùùùùÀÄÄÄÄÄÄÙ ÀÄÄÄÄ> ³ - t2 - ³ WHAT IS THE FREQUENCY RANGE? This is an actual question. The upper limit of frequency depends on CPU speed of your machine. Both, t1 and t2 can be decreased up to 1 æsec. Theoretically, this is equal to 0.5 MHz of square wave, but not always this oscillation would be appeared in the port for all type of machines. Particularly, 386 or 286 machines will not approve an upper frequency than 100 KHz. Although, all TSR programs in RAM, must be removed in order to obtain a high frequency because they always prevent to climbing to high frequencies. On the other hand, both, t1 and t2 can be enlarged up to 2.214.999.999 æsec (equal to 36.9 minutes). In result, the frequency range varies from 0.00045 Hz to 500 KHz. Particularly at high frequencies, it may be some differences between those two: 1. the value(s) of t1 or t2 which you have input from keyboard and 2. the value(s) of t1 or t2 which you have read from oscilloscope. This difference always remains to be constant, if any. Further, this difference which appears particularly at high frequencies, is specific for each machine. Under these conditions, you can describe this difference for an individual system, then, you can consider this number while you input the t1 and t2 values. However, most often, at low frequencies, there is never difference between them. Most often, any differences will not appear when t1 and t2 was selected greater than 2 msec. Also, it is a minor detail but, keyboard scan operations occur between t1 and t2 time, for this reason, t2 time can be found longer than that you have typed from keyboard. HOW MANY PORTS CAN BE ACTIVATED AT THE SAME TIME? Only one serial port is available even you have more than one. Your system may have four or more serial ports, but you can select only one of the ports present in order to obtain a described square wave. CAN I ADJUST PEAK-TO-PEAK VOLTAGE? No, this voltage depend on power supply voltage of your computer. It is 12 volts. However, you can make bellowing variations : 1. SELECTION OF POSITIVE PULSES: When you put a diode to the current way, the signal will take this shape: Volt .<---- T ---->. ³ . . ³ .- t1 - . +12 Vcc ÅùùùùùÚÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ 0 ÅÄÄÄÄÄÄÄÄÄÄÄÄÀÄÄÄÄÄÄÙùùùùùùùÀÄÄÄÄÄÄÙ ùùùùùùùùùùÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ>time ³ - t2 - 2. SELECTION OF NEGATIVE PULSES: When you put a diode to the current way in opposite direction, the signal will take this shape: Volt .<---- T ----> . ³ . . ³ . . +12 Vcc Å ù ù ³ ù ù ³ ù - t2 - ù 0 ÅÄÄÄÄÄÄÄÄÄÄÄÄÚÄÄÄÄÄÄÄ¿ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ>time ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ -12 Vcc ÅùùùùùÀÄÄÄÄÄÄÙ ÀÄÄÄÄ> ³ - t1 - X ³ 3. A FREQUENCY MULTIPLIER or DIVIDER can be added. 4. This signal can be changed to a SINE or TRIANGLE wave by a simple electronic circuit can be added by user. HOW MANY AMPERES CAN BE LOADED? Approximately, 15-80 mA can be pulled. More much loadings may give damage to I/O card of your system. THE OUTPUT IMPEDANCE ? In most machines, output impedance may alter between 2 kê to 34 kê. NOISE OR DISTORTION IN THE SQW ? For an ideal square wave, all angles are 90ø (rise, delay and come-down). With this software, you will usually provide the angles to be 90ø. However, the signal shape may be distorted briefly in only high frequencies. When the signal was monitored by an osscilloscope, if the signal does not seem to be a smooth line (as seen in the bellowing figure), particularly pulse-duration section, you can decide that, the I/O card is not complete acceptable for this purpose. Some machines make this. ÚÄÄ ÚÄÄ ÚÄÄÄ ³ \ ³ \ ³ \ ³ \ ³ \ ³ \ ³ \ ³ \ ³ \ \ÄÄÄÄÄÄÙ \ ÄÄÄÄÄÄÙ \ CAN I MONITORIZE THE SIGNAL ON SCREEN DURING PULSE GENERATION ? Perhaps in future versions may be yes, but not in this version. You can not monitorize the signal present from your screen. Because, the mean of this operation is the time-lose. However, an oscilloscope which was connected to the actual port, can show the signal present. MAY IT DESTROY THE I/O CARD? No, this is highly safe method. However, avoid to make short-circuit between tips of the port. Instantaneous contacts have not a deleterious effect, if it does not extent over one hour or more. Take your own risk, or, in order to protect your I/O card, you can use a 1 kê (¬ W) of resistance with serially to the out-put pin. This is not prerequisite. A SESSION: ÍÍÍÍÍÍÍÍÍ 1. Run the SQW.EXE 2. If you have not an idea about the current ports, you can learn which serial port(s) are available in your system. Select the 'scan ports' and press . The program will give a report about active serial ports and their addresses. 3. If you are starting first, select the 'workout' and mark one of the serial ports. (This step can be ignored, if you have experiences about how this program works.) And press . The program will send slow pulses to the port which you have selected. On the other hand, you will hear a double sound, bip-bep. Now, connect an AVO-meter or an oscilloscope to the entailed pin of the selected port and the ground of your computer. Every pulse must be monitored at the pin of the selected port. You must read a pulsation which is synchronized to the double sound present. At this stage, you can provide a faster or slower pulsation with use Page Up or Page Down keys respectively. Exit from this sub-menu with , if you have found the actual pin. Turn off the system, make a good connection to the port. Turn on again. 4. Select the 'describe' sub-menu, press . Answer the questions about t1 and t2 values. These values must be a positive number between 1 and 2214999999, but as to be microsecond. Do not use comma, semicolon, space i.e. Then, input which you want to use serial port. And, press 'y'es for begin. The given data will be checked by the program. If there is a problem, it will give an alert message else, it will jump to PULSE.COM which must be present in the original zip file. 5. PULSE.COM does not work without SQW.EXE. When the PULSE.COM run by SQW.EXE, the given data will be re-checked. Press any key for start to sending. You can use these: , make pause , reverses the signal present. In other words, the t1 and t2 values will be swapped by function. , t1 value will be increased one micro-second , t2 value will be increased one micro-second Note: If you swapped the t1 and t2 values, and if you have requested an increment in t1 time, always the new t1 time will be increased but not old t1 time. , stop the signal generation and exit. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= This program can be distributed by FREE OF CHARGE. When /if you need to the source files of newest version, send $30 and a message to me via E-mail. All comments and suggestions are welcome. Please send your comments and suggestions to the address below or e-mail them to: Murat AYDIN, Ph. D. Dent. Department of Microbiology, Faculty of Medicine, €ukurova šniversity Adana - TšRK˜YE E-mail: muratay@pamuk.cc.cu.edu.tr =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=