Jim's
Tutorials

Spring 2012
course
navigation

02-13-12

So, for today's work, I've finally gotten the chip to talk with the computer. I haven't tried uploading any code but the diagnostic commands I've tried, namely
$avrdude -c usbtiny -p t85
... with:
...and without:
a chip plugged in, both work correctly.
I've followed a few tutorials:
the very beginning and end of this.
note: I installed the required software (avr-gcc and avrdude) through my package manager so I didn't have to muck about in compiling everything like the previous link exhaustively describes.
I spent a good chunk of time making a little proto-board adapter from the 2x3 6-pin header on the programmer to an 8-pin DIP socket.
In my initial attempts to get the programmer working, I first needed to figure out what the pinout of the standard 6-pin header meant.
I looked at the images and instructions provided here. The part I found initially confusing was what the pinout in this image but it was unclear from which direction the image was describing the 6-pin female header. It turns out that the pinout of the 6 pins corresponds to the cable being flat with the female header facing down (as would make sense?).

I'm thinking that it would be useful in tutorial tomorrow to have a quick C refresher.
This is where I'm going to spend the next chunk of time figuring out things.
Alex has suggested using a makefile but I haven't looked into it too too deeply yet.

Jim

So here's my interpretation: the avr programmer (i.e. device to get a compiled executable from the laptop into the chip) is built, including a board-pinout-specific adapter. Then running avrdude (a small command-line program) with options to identify (a) the programmer and (b) the chip, it can confirm a connection. Next step is to compile an executable (i.e. an "LED blink" test) and send it to the chip.
Alex: the adaptor puts a resister from +V to RESET, so that the reset is nominally high (i.e. the chip is in its normal state) but still allows the programmer to send it low as needed.
Alex is walking us through a "blink" program in the tutorial.
The chip : see http://en.wikipedia.org/wiki/Atmel_AVR
Aaron uploaded a Makefile for compiling code for this chip, which Alex has modified:
The programmer:
The chip:
software required:
One of the avr-gcc flags will let us know where the include file folder is, so that we can include those in blink.c. And the Makefile gets edited to match 'project' and 'project.c' (i.e. blink).
$ make hex # create project.hex that gets sent to chip $ make writeflash # build, and send to chip (with everything connected.)
http://cs.marlboro.edu/ courses/ spring2012/jims_tutorials/ aaron/ 02-13-12
last modified Monday February 13 2012 11:10 am EST

attachments [paper clip]

     name last modified size
[IMG]--1.png Feb 13 2012 12:33 am 31.4kB [IMG]-.png Feb 13 2012 12:33 am 104kB [IMG]2012-02-12-175115.jpg Feb 13 2012 12:44 am 182kB [IMG]2012-02-12-175129.jpg Feb 13 2012 12:43 am 197kB    avrtargetboards_1.webp Feb 13 2012 12:50 am 10.7kB [IMG]avrtargetboards_2.jpg Feb 13 2012 12:50 am 18.3kB    blink.tar.gz Feb 13 2012 11:12 am 3.52kB    Makefile Feb 13 2012 10:41 am 8.44kB