Data AcQuisition And Real-Time AnalysisScope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
Contact us about
Numato_Oscillator Slow Square Wave Generator
By default this macro produces a 1 Hz square wave on Pin 0 of any Numato 8, 16, 32, or 64 USB device.
Note that it assumes you don't also have an Arduino simultaneously plugged into a USB port, since this macro just looks for the first supported device and presumes it's a Numato.
The output defaults to pin 0. The generated square wave will be 0 to +5 V on the Numato 8, while the others will be 0 to +3.3 V.
This is a simple way to get a calibrated AC voltage source for full-scale range calibration using the input voltage method. You can measure the power supply voltage (+5 or +3.3) with a DC meter, and be certain that the oscillator output will run between 0 and that value. Even if you don't have a meter, the voltage will be pretty close to the nominal value.
Numato_Oscillator Macro Listing:
;<Help=H492C ;Slow square or pulse LED flasher for Numato. ;Hit any key to stop. H=0.5 ;High duration of wave/flash period, sec L=H ;Low duration (default 1 Hz square wave) Posn#0=0 ;Numato08-64 Posn#1=0 @_ComDev_Scan ;Scan COM devices, open port UK=0 WHILE.UK=0 ;Loop until key found Port="gpio set 0" ;Pin 0 high WaitSecs=H ;Output HIGH duration Port="gpio clear 0" ;Pin 0 low WaitSecs=L ;Output LOW duration UK=Key?! ;Get current key, if any WEND. ;Back to test key Port#O=0 ;Close port
Questions? Comments? Contact us!We respond to ALL inquiries, typically within 24 hrs.
Over 35 Years of Innovative Instrumentation
© Copyright 2007 - 2023 by Interstellar Research
All rights reserved