FAB ACADEMY 2013
• Phyllis Klein
FabISP ~
The FabISP is an in-system programmer for programming AVR microcontrollers.
Working from David Mellis' design and instructions, I made the FabISP.
Milling the FabISP circuit board:
FR-1 boards were secured with double-sided tape to sacrificial board on Roland Modela milling machine bed.
Using Fab Modules and FabISP pngs, traces were cut using Roland Modela with 1/64" bit, and cuts using 1/32" bit.
The default setting for cutting out the board was not deep enough, so I adjusted the "z" to -1.0.
Soldering surface mount components:
Following the FabISP schematic diagram, I soldered the components to the board.
Working from my Mac, with CrossPack installed and the firmware downloaded and unzipped, I modified the makefile on line AVRDUDE = avrdude -c usbtiny -p to support the AVRISP mkII programmer by replacing -c usbtiny with -c avrispmkii -P usb and saved the changes.
And, with the board connected to my computer using the usb connector, I connected the AVR programmer to the board at the 6 pin connector. After the light on the AVR showed green, I opened Terminal, opened the directory for the firmware, and entered command 'make file'. Tutorial for Mac here.
I received two error messages that indicated fuse and flash error, so I am in the process of checking the connections at the usb connector and the attiny44.
After spending a considerable amount of time trying to remedy the problems on my first board, I milled a new board and carefully soldered the components.
This time, programming worked!
$ make program
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -x assembler-with-cpp -c usbdrv/usbdrvasm.S -o usbdrv/usbdrvasm.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/oddebug.c -o usbdrv/oddebug.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c main.c -o main.o
avr-gcc -Wall -Os -DF_CPU=20000000 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -o main.elf usbdrv/usbdrv.o usbdrv/usbdrvasm.o usbdrv/oddebug.o main.o
rm -f main.hex main.eep.hex
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-size main.hex
text data bss dec hex filename
0 2050 0 2050 802 main.hex
avrdude -c avrisp2 -P usb -p attiny44 -U flash:w:main.hex:iavrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "main.hex"
avrdude: writing flash (2050 bytes):Writing | ################################################## | 100% 0.72s
avrdude: 2050 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex contains 2050 bytes
avrdude: reading on-chip flash data:Reading | ################################################## | 100% 0.61s
avrdude: verifying ...
avrdude: 2050 bytes of flash verifiedavrdude: safemode: Fuses OK
avrdude done. Thank you.
avrdude -c avrisp2 -P usb -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9207
avrdude: reading input file "0xDF"
avrdude: writing hfuse (1 bytes):Writing | ################################################## | 100% 0.00s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDF:
avrdude: load data hfuse data from input file 0xDF:
avrdude: input file 0xDF contains 1 bytes
avrdude: reading on-chip hfuse data:Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):Writing | ################################################## | 100% 0.01s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:Reading | ################################################## | 100% 0.00s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verifiedavrdude: safemode: Fuses OK
avrdude done. Thank you.
=^.^=
I also attempted Valentine's ISP, however it appears that his file is not property scaled.