Acquisition Test Software

A program was written in C++ and the QT framework to simplify the process of testing the DAU AVR program using the serial protocol adopted for the project. It allows a number of commands to be generated, and displays the returned responses in hexadecimal form. The program is able to synchronize serial baud rates through monitoring idle character responses from the DAU. The code has also been used in later developments.

Main Window


The main window provides a set of buttons for producing a defined command to be sent, with correct command ID and number of parameters. The parameters of the command may be entered in the lower three boxes as appropriate. The hexadecimal form of the command to be sent appears in the long edit box. This can be edited to add or change parameters or to define a new command.The response from the DAU is displayed in the central panel. If nothing has been received, an error is displayed.

On the right hand side is a section for acquiring a voltage measurement from a channel of the device.

Program Operation

When the program is started an IDLE character is sent. The DAU should be in an IDLE state, and will return an IDLE character. If the program does not receive an IDLE character, then the baud rate is changed and the process is repeated. When the program is satisfied that it has been synchronized with the DAU, it opens up the main window.

As the DAU may be running an AVR109 bootloader, the program also checks for an ASCII '?' character. This is the response that the AVR109 bootloader will give to an unknown command. If this character is received, the program will stop searching for baud rate and will simply return an ASCII 'E' character that causes the bootloader to exit to the application. As the application may use a different baud rate, further hunt for an IDLE command is then done to ensure that the DAU is ready to accept commands. Note that USB-serial adaptors may send a "?" if they detect a transmission error. This is not a problem as the program will keep searching if it does not subsequently attain synchronization.

Installation

To install this, unpack into a directory which by default will be acquisition-test. The serial device used (/dev/ttyUSB0 in Linux) is specified in the main program and refers to a USB port for use with a USB to serial converter. Install the serial programmer software as described, including qextserialport, making sure that all the source directories are under the same top directory (otherwise the .pro files will need to be changed). This will provide the firmware upload features of the program.

Change into the acquisition-test directory and execute:

$ qmake-qt4
$ make clean
$ make

This will build the application. Copy the binary to a suitable place and invoke with:

$sudo
acqtest


First created 13 May 2007

Last Modified 31 January 2010