CURRENT ISSUE

Contests

bottom corner

Feature Article



Issue #213 April 2008

Programmable Power
Build a Simple USB DAC
by Yoshiyasu Takefuji

Start | USB Communications | Firmware | MAX517 (DAC) Programming | Firmware, Software, & LIBUSB | Host Device Driver Installation | Testing | Sources & PDF

USB COMMUNICATIONS

USB 2.0 has three communication types: 1.5 Mbps (low speed), 12 Mbps (full speed), and 480 Mbps (high speed). I established 1.5-Mbps low-speed communication using an ATtiny45 with a 12-MHz ceramic resonator without a USB chip.

An open-source software protocol stack can take care of non-return-to-zero inverted (NRZI) encoding, decoding, and bit stuffing for synchronization. The conventional USB chip uses NRZI encoding/decoding with automated bit stuffing. In the bit-stuffing technique, each time a series of five consecutive “0” bits is transmitted, a “1” bit is automatically added to force a transition. In this article, usb_control_msg and usbFunctionSetup functions are used for USB communications. usb_control_msg is used for host PC USB communications. usbFunctionSetup is used for ATtiny45 USB communications.

Previous | Next

 


bottom corner