... | ... | @@ -2,13 +2,41 @@ |
|
|
|
|
|
{empty} +
|
|
|
|
|
|
A small firmware was developed to communicate with the user application and to adjust the
|
|
|
offset. It uses the "Lightweight USB Framework for AVRs" (LUFA) [1] to interface the built-in USB
|
|
|
2.0 controller. The device registers itself as CDC (ACM) device. This enables the opposing
|
|
|
application to treat the amplifier as a serial device. Platform independent serial communication
|
|
|
libraries for Java are available and still supported. Most operating systems further provide
|
|
|
CDC ACM drivers and hence make installation of the signal generator easy. Communicating
|
|
|
directly through USB endpoints would have required a platform independent USB library. Such
|
|
|
solutions exist, but as native libraries and therefore require a Java wrapper. It would also make
|
|
|
programming more complicated and the hardware more expensive since it would require every
|
|
|
device to have a USB controller.
|
|
|
The structure of the firmware and its modules is depicted in figure 1 below. As mentioned
|
|
|
before, the LUFA library handles the communication with the PC. Via the hardware serial peripheral
|
|
|
interface (SPI) of the microcontroller, the DAC is controlled. It is used to generate the
|
|
|
unshifted DC offset between 0V and 5V. The SPI transmission logic
|
|
|
is located in the _SPI_ module. In the _Main_ module, the actual program logic is housed, and is
|
|
|
described in the next section.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
image::https://es.technikum-wien.at/openlab/openlab_wiki/wikis/img/OpenLab_siggen_atmel_imp/Siggen_atmel_firmware.PNG[caption="Figure 1: ",title="Firmware structure",height=280,align="center"]
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
_CRC_ holds the checksum implementation on the firmware side, and _Protocol_ contains the
|
|
|
header and payload definitions for the OpenLab protocol. The _Util_ module contains just helper
|
|
|
functions or preprocessor macros. By turning off all not required features in LUFA, and by
|
|
|
compiling for space(-Os), the firmware requires about 4700 bytes.
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
== Bibliography +
|
|
|
|
|
|
The content of his chapter is taken from the master thesis "_Development of a Sound Card Based Arbitrary Waveform Generator_" by Jakob Kriegbaum, MSc, May 2017.
|
|
|
|
|
|
. Title
|
|
|
. [Online] fourwalledcubicle.com/LUFA.php
|
|
|
|
|
|
{empty} +
|
|
|
|
... | ... | |