Categories
Fab Academy AS220 - Providence, RI Fab Academy Providence -Year II - Teaching

Fab ISP 2.0

Fab ISP - with resistors
This year the Fab ISP programmer (created by David Mellis) was updated by Neil Gershenfeld. The Electronics Production assignment was to mill the board and stuff it. Most of the students had their boards programmed this week. The board shown is the Fab ISP I made. We will be using these programmers through the semester to program the other boards we create.

To Get Started:

  1. First – go to the Fab Academy page for Electronics Production and download Neil Gershenfeld’s updated design (shown in this example).
  2. Then – Read through the MIT Fab ISP page documentation

Mill the Board:

  1. Mill the board traces (hello.ISP.44.old.traces.png) using the Fab Modules or Cad.py
  2. Mill out the board (hello.ISP.44.old.interior.png)
  3. Labeled board diagram  (hello.ISP.44.old.png)

Fab ISP TracesFab ISP Mill OutFab ISP Labeled

Stuff the Board:

Shawn Wallace has provided a Fab ISP labeled board diagram
Fab ISP

“Smoke Test”

  1. Plug the Fab ISP into your computer via the USB cable.
    — If you get an error message from your computer that the board is drawing too much power – and the computer is shutting down the USB port — You have a short somewhere on your board.

Troubleshooting  Short Circuits:

  1. First, do a visual inspection of the board and reflow any solder joints that look cold (not shiny and smooth).
  2. Then, get out your multimeter and check all the connections to make sure that:
    – power and ground are not connected
    – there is not a short on the power line

ATAVRISP2 Programmer Light Indicator Messages

If you are using the ATAVRISP2 programmer (or any other programmer that has a indicator light that lets you know if you board is connected / powered correctly). If you connect the programmer to the 6-pin programming header on your Fab ISP board and you get:

  1. Green Light: means that the header is soldered correctly, the board is getting power and the programmer can sense the microcontroller.
  2. Yellow Light: means that the board is getting power, but most likely the 6-pin programming header is not soldered correctly (re-flow your solder joints / check for cold joints, check for shorts).
  3. Red Light: means that the board is not getting power – check for shorts.

Program the Board:

  1. To program the board, you will need avrdude installed.- For information on where to get and how to use avrdude see:  Very Basic Beginner Assembly Tutorial III: How to Use Avrdude
    – Also see MIT Fab ISP page documentation
  2. Download the firmware from the Fab Academy Electronics Production page.
  3. After unzipping the firmware, open a terminal window (mac / linux – for windows instructions see the tutorials listed above).
  4. Navigate to the downloads folder (or the folder where you saved the firmware).
  5. The board needs power: make sure that the USB connector for the Fab ISP you are trying to program is plugged in to a computer AND that a separate pogramer is plugged in to the 6-pin programming header. (this could be another working Fab ISP or the ATAVRISP2 mentioned above.)
  6. In the terminal window type:
make clean

Then type:

make hex

Then type:

make fuse

Then type:

make program

If you get errors – read the errors and follow instructions.  If avrdude cannot connect to your board’s microcontroller – you should follow the “Troubleshooting Short Circuits” steps above and ask your instructor for help.

To Verify That Your ISP is working correctly:

Mac OS –> go to the System Profiler >> Hardware >> USB >> Hub:

Step – By – Step:

  1. Click  the “apple” menu in your main toolbar
  2. Select “about this mac”
  3. Select “more info”
  4. Under the “Contents” menu in the left hand navigation- Under the “Contents” menu in the left hand navigation
    – Click “Hardware” to expand the hardware menu (if not already expanded)
    – Click “USB”
    – Under the “USB Device Tree”
    – Click “Hub” to expand the hub menu (if not already expanded)
    – “FabISP” should be listed in the hub menu
  5. Your Fab ISP device has been successfully programmed and is recognized by your computer.

Linux:

  1. Still working on this……. details coming soon.

After You Have Programmed the Board:

  1. Remove the 0 ohm resistor and solder bridge as shown in the picture below.

Fab ISP without jumpers

Categories
06 Embedded Programming Fab Academy AS220 - Providence, RI Fab Academy Providence -Year I - Student Projects

Modified Hello Echo – Part III: Working & Completed Modified Hello Echo + Button + FTDI

Fab Academy Embedded Programming Assignment:

1. add (at least) a button to the serial echo hello-world board
2. modify the serial echo assembly program to respond to the button

I modified the hello serial echo board (my modified echo board version2 – see previous posts) to respond to a button and added an FTDI header so I could use it as a substitute for the internet 0 serial board. (I have a Mac and therefore no serial port).

The behavior is that the LED is always on – but when the button is pressed, it turns off.

Modified Hello Echo FTDI + Button

Shawn and I modified Elliot’s reprogramming the echo board code.

Here is the code:

; Modified.Hello.Echo.Blink LED.44.asm
;
; blink LED when button is pressed
;
; Code Created At FAB ACADEMY AS220
; by Shawn Wallace & Elliot Clapp
; Last Modified 08/05/2010  - Anna Kaziunas France
;
; Permission granted for experimental and personal use;

.device attiny44
.org 0
cbi DDRA, 1
sbi DDRB, 2
loop:
	sbic PINA,1
   	sbi PORTB, 2
 	sbis PINA,1
  	cbi PORTB, 2
rjmp loop

Here is How to Get the Board Running:

I use an usbtiny programmer.

Copy the above code into a text file and save it with YourFileName and .asm extension.
Compile it using gavrasm:

gavrasm YourFileName.asm

Compiling the file will create a .hex file.

First – set the fuses on your board:

avrdude -p t44 -c usbtiny -U lfuse:w:0x7E:m

Second – flash the attiny44 with the program code you just compiled:

avrdude -p t44 -c usbtiny -U flash:w:YourFileName.hex
Categories
06 Embedded Programming Fab Academy Providence -Year I - Student Projects

Modified Hello Echo – Part II: Hello Echo + Button + FTDI

Modified Echo Version 2 – In Production

I am having some issues with the Modela this week. I milled this board last night, but it came out hairy / torn up. I will give it another go tonight.

Eagle Files

Download Eagle file for the Board: hello_echo_button_07.26.2010.brd
Download the Eagle File for the Schematic: hello_echo_button_07.26.2010.sch

Modified Hello Echo + FTDI + Button v.2 - Board
Modified Hello Echo + FTDI + Button v.2 Schematic
Categories
06 Embedded Programming Fab Academy Providence -Year I - Student Projects

Modified Hello Echo – Part I: Hello Echo + Button + FTDI

Modified Echo Version 1 – Complete But Broken

This version milled out a bit hairy. Some of the traces were broken, so I used jumpers to re-connect them.

Modified Hello Echo + FTDI + Button  v.1

There must have been a short somewhere – after stuffing it, setting the fuses and flashing it, I plugged it in to a 9v battery and received a puff of smoke for my efforts. The LED went on – then smoke came out.

Modified Hello Echo + FTDI + Button v.1

In addition, I placed the button too close to the programming header, making it hard to press the button. I am not including the Eagle board or schematic here – see version 2 for a better board.

Back to Eagle!!! See version 2 for a (hopefully) improved and working board).