TI serial-interface DAC

I got this interesting little DAC working earlier tonight, with only a minimum of trouble. The code worked right the first time, but I got the hardware wrong ---I let the "power down/" pin on the DAC float, which meant I got a mostly random square wave superimposed on the sine wave. Here's a crummy photo of my scope displaying a sine wave. The sine wave is generated from a 512-entry, 9-bit table in the AVR.

The specialized soic-to-dip adapter for this chip
The chip is a SOIC-16 package. To prototype with it more easily, I made a small board on Chris's mill. It fits in a standard breadboard, or in a .600" DIP socket (cut a 24-pin one down to 16 pins). The jumpers (from left to right) to join the analog and digital supplies, select the same reference for AB and CD outputs, pull the chip select line low, and join the analog and digital grounds. The test pins bring out the 4 outputs and GND, making it easier to hook up the scope. There's also a small decoupling capacitor provided between AVCC and AGND.

The DAC itself is fairly speedy---the serial protocol can be clocked at 20MHz and requires 16 bits to change an axis. Settling time is <10nS. That means the top update rate for 4 axes would be over 250kHz. However, on the microcontroller I used the data is clocked out with a loop in written in C at more than 10 AVR cycles per bit---oh, and the first crystal I found was a 3.2768MHz one. When I switch to a 16MHz ATMEGA8 with SPI, I'll be able to clock the data at 8MHz, hopefully fast enough to make a nice display.

I have a few ideas for a project with this little chip and an XY display. First, a vector game (asteroids or lunar lander). Second, a character-cell display of whatever resolution turns out to be possible. Third, a weather forecast with vector symbols for "partly cloudy", etc.

Lissajous-type design
I take back what I said about the software being right on the first try. I missed that the clock has to go high after the last bit is sent, so only every other setting took place! I fixed that, and got my first XY output.

Cube drawn with Bresenham line algorithm
Now basic line-drawing is working, too. Here's a simple cube composed of 9 segments.

Entry first conceived on 29 March 2005, 23:57 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler