Back | Print Page

Home

Atmel AVR-firmware based universal USB-Interface for  controlling DDS-chips and universal parallel input/output

Scanning the web on microcontroller based USB solutions, I stumbled over Objective Development's freeware USB solution based on Atmel's  AVR architecture. I decided to build up their reference design PowerSwitch with an ATTiny2313 MCU.
Since I never used AVR chips before, the first challenge was to set up a code development environment enabling me to modify the firmware to my needs and get it into the MCU chip.
Amazingly enough, I found excellent freeware tools to get this accomplished:

AVR-C-Compiler:  WinAVR
IDE including simulator: AVR Studio 4.13, build 528 (Release)  Download 75 MB
AVR flashing tool: PonyProg2000 (for simple hardware for flashing AVRs look here)

WinAVR and PonyProg work nicely from within AVR Studio as plug-ins.

Beware that in order to make PowerSwitch (and my own application) work, the fuse bits of the MCU need to be reprogrammed, since the factory default lets the MCU run on the internal RC-oscillator, but for the USB-firmware it's crucial that the MCU is clocked with a 12 MHz crystal.
Here are the correct fuse bit settings as seen in PonyProg:

DG8SAQ-DDS application:

After successfully having set up the software development environment for AVRs and having managed to get the AVR-USB reference project PowerSwitch to work properly, I decided to modify it to interface Analog Devices Direct Digital Synthesizer (DDS) chips. On top, any Port pin can be configured and used through the host software as logical input or output widening the possible applications without mofification of the firmware.

The below schematic shows, that the hardware is still basically identical with OD's PowerSwitch.

I realized the device on experimental board using precision IC-connectors to flexibly create port connections. Below is a photograph of my USB-device hooked up to an AD9850 DDS-board.

The grey cable is the connected in circuit programming (ISP) interface connected to the PC parallel port, which can be found here.
The LED row which can flexibly be connected with rigid wire to the MCU ports was used during program development for debugging purposes.

I have written the host software in Delphi, but there are also a lot of demos coded in C on Objective Development's webpage.
The binaries and sources of the firmware and Delphi host software including a free LibUSB driver can be downloaded from here:
Download Software

The firmware is written in a flexible way allowing to interface any DDS chip without firmware changes. Only the host software has to be adapted to the DDS chip. A more detailed description of the device and software has been submitted to QEX for publication.

Feedback is welcome!

mailto: dg8saq@darc.de

73, Tom DG8SAQ

Back | Print Page

Home