SC5313A Operating & Programming Manual
Rev 1.0.2
12
S C 5 3 1 3 A
P
R O G R A M M I N G
I
N T E R F A C E
Device Drivers
The SC5313A is programmed by writing to its set of configuration registers, and its data is read back
through its set of query registers. The user may program directly at register level or through the API
library functions provided. These API library functions are wrapper functions of the registers that
simplify the task of configuring the register bytes. The register specifics are covered in the next section.
Writing to and reading from the device at the register level through the API involves calls to the
sc5313a_RegWrite
and
sc5313a_RegRead
functions respectively.
For Microsoft Windows
TM
operating systems, The SC5313A API is provided as a dynamic linked library,
sc5313a.dll
, which is available for 32bit and 64bit operating systems. This API is based on the
libusb-1.0
library and therefore it is required to be installed on the system prior to development. The
libusb-1.0.dll
will install along with the
SC5313A.dll
as well as the header files needed for development. Files required
for development are in the
\win\Driver
directory. SignalCore makes every effort to bundle the latest
third-party tools in our software installer. Occasionally however, third-party updates may not be
identified and bundled in time for a given product shipment. Therefore, for the latest version of libusb-
1.0, please visit
. To install the necessary drivers, right click on the
sc5313a.inf
file
under the
\win
directory and select “Install.” After installation is completed, when the device is plugged
into a USB port and powered on, the host computer should identify the device and load the appropriate
driver. For more information, please see the
SC5313A_Readme.txt
file also located under the
\Win
directory.
A LabVIEW API is provided and it consists of function wrappers that call the sc5313a.dll. A LabVIEW API
written in G that uses NI-VISA is also available from the SignalCore website. The National Instruments
driver wizard that is part of NI-VISA can be used to create a driver for most operating systems. For the
SC5313A, the Vendor ID is
0x277C
and the PID is
0x0018
.
For Linux systems, the shared library
libsc5313a.so
is provided. To install the shared files and links, type
“
make install
” in the
/Linux/
directory. The user may need to acquire root privileges to perform the
install operation. Ensure the
libsub-1.0.X.dev
package for the Linux distribution is installed on the host
computer. For other operating systems, users will need to write and compile their own drivers. The
device register map provides the necessary information to successfully implement a driver for the
SC5313A. Driver code based on libusb-1.0 is available to our customers by request. Should the user
require assistance in writing an appropriate API other than that provided, please contact SignalCore for
additional example code and hardware details.
Using the Application Programming Interface (API)
The SC5313A API library functions make it easy for the user to communicate with the device. Using the
API removes the need to understand register-level details - their configuration, address, data format,
etc. Using the API, commands to control the device are greatly simplified. For example, to obtain the
device temperature, the user simply calls the function
sc5313a_GetDeviceTemperature
, or calls
sc5313a_SetFrequency
to tune the frequency. The software API is covered in detail in the “Software API
Library Functions” section.