This discussion explains how to use the new dll library available for both Windows 32 and 64 bits OS.
We aim to provide a detailed explanation of the dll functions and the commands associate with each evaluation board.
This discussion WONT provide any more specific example than the .vi and VB6 code attached.
We are not software developers so for any other software platform, don’t ask please.
If you have some question you can use any search engine available in the web.
Before start you must install, ADI_PDA_Drivers.exe
The dll can be found in the next path:
“Program Files\Analog Devices\USB Drivers\ADI_CYUSB_USB4.dll”
Before continue, the dll has been developed in C++ so, some clarifications
- The sign “*” before the name of the function means pointer
- UInt: unsigned integer, 4 bytes
- Int: Integer, 4 bytes
- UShort: unsigned short, 2bytes
- Char: char, 1 byte
- UChar: unsigned char, 1 byte
The three first functions are used to connect with the board and have to be called in the order they are presented in this document.
Uint Search_For_Boards (uint VID, uint PID, uint *Num_boards, char *PartPath);
This function searches the PC for USB devices that match the requested VID and PID. It returns an error (zero for non-error) along with the number of matching boards found and a path address in a buffer for each of them.
The PartPath returns the path for each board found in the PC that match PID and VID.
Ie. Num_boards = 2,
Path for the first board -> PartPath
Path for the second board -> PartPath
VID : 0x0456 for both boards.
Int Connect(Uint VID, Uint PID, char PartPath, Uint *Handle);
The PID and the VID are the same than before.
This function connects with the board at address path after making sure that it’s still the correct board (checks PID & VID). A handle is returned, along with an error variable (zero for non-error). The handle is the unique identifier for the PC-Board connection.
PartPath is a single location from the previous array, typically PartPath(0).
Int Download_Firmware(Uint Handle, char pcFilePath);
This function programs the uC. The pcFilePath is the path where is located the hexadecimal file (included in the attached file) to program the uC. The char array should be null terminated (finish with 0)
Int Vendor_Request(UInt Handle, UChar Request, UShort Value, UShort Index, UChar Direction, UShort DataLength, UChar *Buffer);
This function sends commands between PC and board. The command table is included in the hexadecimal code that has been downloaded previously.
Each command requires different parameters for the execution. The list of commands available for both boards is explained below.
An error value is returned (zero = no error)
Data_to _write(16 bits)
set standby pin
clear standby pin
pulse control pin
set control pin
clear control pin
pulse interrupt pin
Int Disconnect (Uint Handle)
This function closes the connection PC – board.
If do you think I miss something, just let me know, please
In the manual ,it is mentioned as to keep ctrl pin high while programming.
i m using the labview code provided with Eval board. No other programming method.
Clicking on programm button and clicking on ctrl buttons displays the desired frequency.
At present instead of ctrl button , I m Giving a voltage of 2.2 volts to ctrl pin.it start the scan.
if you can write the steps of how to fix the frequency then it will be very helpful.
I know the ctrl pin Has to be low. Normally you First Programm and then press ctrl button or you give a Pulse in Ctrl Pin. This is Very much happening. I am getting my desired frequency but the Issue is How to Fix the frequency,How to get rid of programming.
every time the Eval Board is powered down and restarted I have to follow the sequence above. I just wanted that as soon as I Power up the Board ,It should show 1.1 Mhz on My oscilliscope. I should'nt have to Programme it and to do this i m following what i smentioned in the Manual.Link below.Pls Have a Look on it.
Regarding debounce Circuitry.What exactly do you mean? I m simply giving 2.2 volts No special Circuit.
If the supply is disconnected, the part will lose the memory content...
OK, THATS IT.
SO IF DEVICE IS POWERED DOWN THEN IT WILL LOOSE MEMORY.
WELL THEN WHAT IS THE SOLUTION??. CAN YOU SUGGEST SOMETHING ELSE ON THE BOARD WHICH MAY HELP TO RETAIN ITS MEMORY. LIKE USING A CMOS BATTERY FOR POWERING UP OR ANY OTHER OPTION.
THANKS FOR YOUR SUPPORT.
You can use a bottom battery with a serial diode connected to Vdd, so, the part will retain the memory in standby mode.