08 Embedded Programming

This week's assignment was in 3 parts. For part A: Program your Hello Button + LED Board Using Arduino, see the bottom of my week 6 page. We went a little ahead that week to have more time this week to spend on building an arduino. The outcome:

buttonLED

 

Part B: "Hello Echo" - Echo Keyboard Input Using C

C is a popular programming language that arduino puts in a more user-friendly GUI. Part of the assignment was to program the board in C through terminal. I first had an error:

but then added a line of code to fix it, thanks to other fabacademics. For the mac, the hello.ftdi.44.echo.c file changed, so we had to add const before:

static char message[] PROGMEM = "hello.ftdi.44.echo.c: you typed \"";

so it should look like: const static char message[] PROGMEM = "hello.ftdi.44.echo.c: you typed \"";

After that it worked.

BUT the hello echo test would still not work in arduino in the serial monitor test meant to return letters that we type into the monitor. I typed in letters, nothing came back.

Not sure what happened, but by now I had a problem in Part C of the assignment that I think might be related. 

Part C: Make and program an arduino

The all-too-familiar process of milling and stuffing a board, with the only caveat that in my first attempt, I let the drill bit drop too deep, which resulted in some of the traces coming off. So, had to redo. I used Anna's traces, but didn't solder all the additional pins, just wanted to have space for them in case of future need. Also, several of us had a problem with the top right traces on the microprocessor getting milled out together - it looks like maybe those traces are too close together/too short. (see the second photo below). We used a slightly more powerful, and more complex microprocessor, the ATmega328.

Here's the board progress post-milling

After the arduino was stuffed, I was able to run bootloader on it and program it using the fabISP. I was also able to run the blink program on it, and make the LED blink.

arduinobutton

After that, however, it stopped working - no matter what I tried, I wasn't able to run any more programs on it. I kept getting this error message:

avrdude: stk500_recv (): programmer is not responding  

Sometimes the program would upload, but I would still get that error message and it didn't seem to have an effect on the LED.

I checked and rechecked the connections, fixed some of them, but still no luck. Other people in class had similar issues, so hopefully we can figure it out. I think whatever is going on with this board has to do with why the echo test isn't working (I tried it on the arduino) - maybe I damaged the microprocessor along the way?

--UPDATE--

I remade the arduino, and this time it worked right from the start! I still don't know what happened to the first one, but I noticed I had the crystal upside down - maybe that had something to do with it? Either way, I have a working one now, yay!

 

 

Published on   April 16th, 2013