Rachel Legerski - Fab Academy 2015

Embedded Programming

Week 7 Assignment

The assignment for this week is to read a microcontroller data sheet and program your board to do something, with as many different programming languages and programming environments as possible.

This is the week that I have been dreading. I have no computer background whatsoever. I've taken computer classes to help me become more proficient in educational technology. I do use technology in the classroom but in no way have I ever had to understand the languages and commands that go into writing code. Just about everything that I've done up to this point in my life has been template dependent. This is one of the reasons why it has taken me so long to get my web pages together and up on the server. Anyway, my partners in crime and I returned to the Lorain lab on Friday night after our "real" jobs were over to begin the adventure of programming.

So my goal for this week is to be able to understand how to read a microcontroller data sheet. I know that the assignment says to program in as many languages and environments as possible, but I would be thrilled to be able to complete this assignment in ANY language! I know that Scott will push us to do more and I am happy that he challenges us.


Struggles

  1. Poor Scott-two out of the three Lorain students are rookies in this endeavour. Thanks to his patience and persistence, we struggled to understand his directions
  2. Make clean, make hex, make fuse, make program...what does that even mean?
  3. Trying to understand that if my light doesn't work, is it an error in my programming or my my circuit board?

  4. Persistence and Success

    1. Working step by step, I am able to program my board. The light is on UNTIL I press the button. When I press the button, the light goes off. Hmmmm, that is exactly opposite of what I want it to do. Does that mean that I soldered one of my components backwards?
    2. I work with the hello echo. I follow the steps but my board won't echo back. Again, Hmmm....
    3. Being ridiculously thrilled to see the LED light up!
    4. Microcontroller Datasheet

      1. The microcontroller datasheet is a user manual for your board. It spells out everything that you need to know.
      2. The most important thing that I learned is that you MUST know the pins. Each pin has a number and a specific purpose.
      3. The microcontroller sheet helps you make sense of the code.
      4. Design Steps To Follow:

        1. Connect the ISP board to the Hello Board through their 2x3 headers. Making sure that you have the pins around the right way and the ground and VCC match up.
        2. Plug the mini usb onto the circuit board and plug into computer.
        3. Use the FTDI cable to provide power to the circuit board. My board is in the lower left of the picture. That's Gail in the background working on hers!

        4. The Programming Process

          To program in C I have to downloaded the hello.ftdi.44.echo.c and hello.ftdi.44.echo.c.make files.
          First, the software for AVR Programing must be found on the device you are using. I needed:

          - Avrdude for programming
          - GCC to compile the new C code.
          To get the program I need to use the following commands:
          - sudo apt-get install flex byacc bison gcc libusb-dev avrdude
          - sudo apt-get install avr-libc
          - sudo apt-get install libc6-dev

          Connecting the Hello Echo and Programmer

          The ATtiny fuses need to be set to run at 20mhz. This is done using sudo make -f hello.ftdi.44.echonew.c.make program-usbtiny-fuses

          Finally, the board is programmed in the open terminal by sudo make -f hello.ftdi.44.echonew.c.make program-usbtiny.

        5. After giving the final command (burn bootloader), the light came on! It stayed on until we pushed the button which turned it off! A little backwards but I'll take it after such a long days work.
        6. After the initial success of the LED lighting, I was frustrated that my board wouldn't echo back to me. I will continue to work on that.
        7. Project Files: