You will need a computer (mac, pc, linux all supported) with an available USB port, free driver for the USB-Serial adapter, a Boston Android Xmega EVAL-USB-64 development board ($31.99) and an open source AVR chip programming utility called AVRDUDE.
Once set up, you can generate sine, ramp, triangle, square or any waveform you define from 5 to 20KHz with amplitude of up to 3.3Vp-p. It is possible to generate faster waveforms with the arbitrary waveform feature (up to 500KHz).
Remove these ads by
Signing UpStep 1What you need
2) PC with USB port
3) AVRDUDE (free AVR programing software)
Also recommended:
Oscilloscope (to view waveforms)
Headphone or small speaker (to listen to waveforms)
WINAVR and AVRSTUDIO to modify the source code and built your own version of the waveform generator software
Although this example walks through programming and using the EVAL-USB-64 board, you can use any of the EVAL-USB boards from Boston Android. And if you're very experienced you can download the example source code and build for other target hardware such as the Atmel XPLAIN evaluation board, or the Xmega boards available from chips45 and Mattair, Megavore. The xmega family allows effortless migration of code from one chip to another.
| « Previous Step | Download PDFView All Steps | Next Step » |



















































If you need more help let me know.
If you do a web search there are lots of example opamp circuits to choose from. I would breadboard them and try them out.
Best of luck!
What are you attempting to drive up to 20V? Is it a speaker? Any requirements for efficiency? Do you have a 20V supply to drive the output?
As for the output stage going up to 20V you should do a search for linear amplifiers. You could probably just use an Audio Amplifier circuit. They have some at http://www.sparkfun.com/ which can boost the signal output from this board to the power levels you're talking about. I've used an amplifier off ebay (search for TA2024 amplifier about $9) to generate high frequency signals to drive a small speaker. Don't ask why. ;-)
// 9600 @ 32Mhz as calculated from ProtoTalk Calc
// see web page at: http://prototalk.net/forums/showthread.php?t=188
USARTF0.CTRLC = USART_CHSIZE_8BIT_gc | USART_PMODE_DISABLED_gc;
int bsel = 3317;
uint8_t bscale = 12;
USARTF0.BAUDCTRLA = (uint8_t) bsel;
USARTF0.BAUDCTRLB = (bscale << 4) | (bsel >> 8);
http://www.gabotronics.com/development-boards/avr-xmegalab.htm
http://www.bostonandroid.com/binaries/xmega-waveform-serial2.hex
When I tried uploading with avrdude on my mac I got:
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0xff
avrdude: verification error; content mismatch
avrdude done. Thank you.
but using avrdude in win xp worked.
I was able to connect and control with my mac though using screen:
sexybeast:avrdude aaron$ screen /dev/tty.usbserial-A800cAoo 9600
Nice - Make an Empire State building waveform!!
w 1000 20 0 0 0 0 0 800 3000 3300 3400 4095 3400 3300 3000 800 0 0 0 0 0 0
pic
Awesomeness knows no bounds!!