Sunday, January 16, 2011

ATMega board.. piece of cake...

I said it would be trivial to get the board going for eventual inclusion into the amplifier.  Only a little more work than using a bargraph display or a rotary switch and it has a cool blue display!

Had to change my "stock test code" to a different port on the ATMega644 and also burn that funky fuse that needs to be burned (lfuse = F7 on the '644) to use the XTAL osc.  I normally use 18.432 MHz but I'm  out.. had several 14.7456 MHz crystals, so I also changed the clock rate to that.. plenty fast for this application.

Anyway.. here is proof that it's pretty easy to do.  Code is in "C" I'll document and put it somewhere safe later.  The 16x2 module is a Chinese clone HD44780 (made by "Tinwell" TC1602a off of e-bay... more expensive but reliable American source).  The AVR programmer I use is a usbtiny, from that more reliable American source.  The board is a Sanguino.cc board.  I bought several blank boards, which seem still to be available (at a higher cost than I paid a year ago, of course!).  Now there also appears to be a complete kit for $25.  I got ATMega644's from Mouser (who had some in stock at the time.. see my comments about ATMEL and AVR's in a previous post) and later I got some ATMega644P's from Digi-Key.  All the rest of the parts are junk box.  The 644P's have two UARTs on them.. if I determine a need I can replace the 644 with the 644P.  These are "bigger, more powerful" Arduino clones, and even though I prefer tighter code written in straight "C" with WinAVR, Arduino is easy if you are not a programmer.  40-pins, simple as sin to program, lots of memory, better peripherals (and more memory-- did I say more memory?) than a PIC in the same class.  Not much not to love about them.  Big 40-pin DIP, easy for prototypes or one offs, and the code is compatible with chips in more modern PLCC packages for production.

No comments:

Post a Comment