VNAccess Publisher's description
from Greg Ordy
An API (application programming interface) for the N2PK VNA
VNAccess (va-nak-sess) was developed to be an API (application programming interface) for the N2PK VNA. It encapsulates all of the details concerning the clocking of the chips through the parallel port (printer) interface. It also manages the various timing issues present in setting the DDS chips and reading the ADC. VNAccess calls are made in terms of the hardware registers present in the major integrated circuits.
If you are using the LTC2440 ADC chip, then you need to use VNAccess version 2.00, or greater. Versions under 2.00 were written with the LTC2410 in mind, and communicated with the 2410 in a way which does not work with the 2440. The newer version of VNAccess works with both chips.
VNAccess assumes that it can directly access the parallel I/O port on the computer. On Windows 95, 98, and ME, this is the default mode of operation. On Windows NT, 2000, and XP, the operating system normally disables direct application program access to the hardware as part of the overall security and protection model. On these platforms, direct access to the hardware can be obtained through the use of a driver which selectively turns off the protection mechanism. That driver is not part of VNAccess. We have been using UserPort 1.0, one of the many available packages for enabling direct access.
VNAccess is provided in a DLL (dynamic link library) form. The code has been written so as to minimize dependence upon additional packages, features or software. Although it is written in the C++ language, and was developed using the Microsoft Visual Studio version 6, the library can be used by standard C programs, and other popular languages such as Visual Basic.
VNAccess does not include direct support for the computation of electrical parameters such as reflection coefficient, or impedance. The data returned by VNAccess is the raw input to that next step. The VNAgra API supports those calculations.
Here are some key features of "VNAccess":
В· Full control of DDS chips: All of the DDS functions can be controlled via VNAccess. This includes setting the frequency via a tuning word, setting the relative phase angle, and setting the power down state. As a result of the electrical schematic, the two DDS chips are clocked, updated, and reset in parallel. VNAccess carefully controls the reset signal so as to maintain the relative phase shifts of the synthesizers even after changes in state. This is necessary to perform reusable sequential quadrature measurements
В· Full control of the ADC chip: The ADC chip is controlled via VNAccess. Readings normally consist of a 24-bit data word, although it is possible to increase or decrease the number of data bits, following the rules laid out in the ADC data sheet. With version 2.0 of VNAccess, VNAs with variable conversion rate detectors (LTC2440) are supported. Two detectors are also allowed.
В· Flexible Parallel Port Pin Assignments: The mapping between software function and parallel port I/O pins can be reassigned. This capability allows a single program to work with different hardware configurations. Although there are a large number of possible mappings, the common cases can be conveniently specified. This includes the August 20, 2004 N2PK planned parallel port expansion, and what I call the OZ hardware modification, which provides 4 ADC conversion rates with the LTC2410 chip.
В· Timing Control: There are a number of operations which have certain timing requirements. Thankfully, the timing requirements are all minimum requirements. Since Windows is not a real-time operating system, it is nearly impossible to guarantee that some task can be completed within some time duration. On the other hand, it is possible to guarantee that a minimum amount of time has elapsed. All of the timing intervals are specified as parameters to VNAccess calls.
В· Convenient conversion functions: The DDS chips accept a tuning word, which is a way of specifying frequency based upon the master oscillator frequency. VNAccess conversion functions map between frequency and tuning words. The ADC chip data is a number. It can be converted to micro volts with a VNAccess function call that accepts the reference and offset voltage connected to the converter.
В· Printer reservation: The parallel I/O port is often times used as a printer port. If the VNA port is indeed shared with a printer, the use of the port should be serialized between applications so that a simultaneous access of the printer and VNA is not attempted. VNAccess can be programmed to attempt to open a printer device to determine if the printer port is in use. If it is in use (the device cannot be opened), then VNAccess will report that the VNA is not available.
В· Support for the DDS power down mode: The DDS power down mode is exposed in the VNAccess interface. The power consumed by the VNA drops by nearly 60 percent if the DDS chips are put in power down mode. This capability may be valuable if the VNA is battery powered. The power down state can be controlled explicitly, or put into an automatic mode where power is shut off after a programmed time interval of inactivity.
В· Multiple Language Support: VNAccess can be called from C and C++ programs. We have created VNAccess.dll with the intent that it can be called from other languages, such as Visual Basic.
System Requirements:В· Visual Basic
Program Release Status:
Program Install Support: Install and Uninstall