Skip to content

5. Electronics production

Group assignment: Characterize the design rules for your PCB production process

Individual assignment: Make an in-circuit programmer by milling the PCB, program it, then optionally try other PCB processes ATtiny45

Group Assignment :

We had to make a circuit board on FR4, so we used the Epilog Fusion M2 because it is equipped with a fiber laser

We tape the FR4 plate with double sided

We Copy the PNG files for the traces and the board outline:

So we started our first pass

We check that the current goes through a multimeter

After 8 pass the plate becomes green

At the 10th pass we test the current of the plate and find that the resulat is good

We have made 10 Pass at 40 Speed - 100 Power - 1 Frequency

We then cut out the shape we want

We have made 25 Pass at Speed 30 - Power 70 - Frequency 100

Individual Assignment :

Result:

Do not forget to make a bridge and put a resistance 0 to allow to reset and listen to the orders given to him

Connection:

I followed the next tutorial http://academy.kaziunas.com/tutorials/programming_FabISP.php#mac

So I installed AVRDUDE , FABISP firmware MacOS 10.8.2 , XCode

I plugged all the components between them

As a programmer i use an Atmel ICE

And I used this model for branching to the 6-pin programming header

Programming: (i made this for MAC)

-Mac: Open the Makefile with TextEdit.

-A window will open containing the Makefile. Go to the line that says:

AVRDUDE = avrdude -c usbtiny -p $(DEVICE) # edit this line for your programmer

AVRDUDE = avrdude -c avrisp2 -P usb -p $(DEVICE) # edit this line for your programmer

If using the USBtiny programmer or another FabISP Remove the “#” in front of the line with “usbtiny” in it Add a “#” to beginning the line with the “avrisp2” in it to comment it out. Save the Makefile

-For Mac users who downloaded the modified firmware: cd Desktop/fabISP_mac.0.8.2_firmware

-Next you need to compile the firmware. Type: make clean (It’s the last step i made on my MAC cause after that the other commands get only errors, after a lot of checks and tests we did not find anything and so decided to follow up on the Mac of my monitor. And everything worked out correctly)

I highlighted the commands to use in the terminal

romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ nano Makefile romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ make clean rm -f main.hex main.lst main.obj main.cof main.list main.map main.eep.hex main.elf .o usbdrv/.o main.s usbdrv/oddebug.s usbdrv/usbdrv.s romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ make hex 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 main.c:88:13: warning: always_inline function might not be inlinable [-Wattributes] static void delay ( void ) ^ 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 2002 0 2002 7d2 main.hex romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ make fuse avrdude -c usbtiny -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

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.00s

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 verified

avrdude: safemode: Fuses OK (H:FF, E:DF, L:FF)

avrdude done. Thank you.

romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ make program avrdude -c usbtiny -p attiny44 -U flash:w:main.hex:i

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

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 (2002 bytes):

Writing | ################################################## | 100% 1.85s

avrdude: 2002 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 2002 bytes avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 2.32s

avrdude: verifying … avrdude: 2002 bytes of flash verified

avrdude: safemode: Fuses OK (H:FF, E:DF, L:FF)

avrdude done. Thank you.

avrdude -c usbtiny -p attiny44 -U hfuse:w:0xDF:m -U lfuse:w:0xFF:m

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

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.00s

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 verified

avrdude: safemode: Fuses OK (H:FF, E:DF, L:FF)

avrdude done. Thank you.

romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ ls dev/tty.usb ls: dev/tty.usb: No such file or directory romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ ls dev/tty.usb ls: dev/tty.usb: No such file or directory romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$ ls dev/tty.usb ls: dev/tty.usb: No such file or directory romains-MacBook-Pro-4:fabISP_mac.0.8.2_firmware romaindivozzo$

Verify That Your ISP is working correctly:

Mac: Go to the System Profiler > Hardware > USB > Hub:

Click the “apple” menu in your main toolbar Select “about this mac” Select “more info” 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

After You Have Programmed the Board: Remove the 0 ohm resistor and solder bridge as shown in the picture below. Now you can use it as a programmer to program other boards.

After that i tried to program another board with my FABISP but without success my mac no longer knew my fabisp. My monitor has tried on his mac to and no success either, so we checked my board very carefuly but it had no problem. The fact is that this problem is also happen to my student colleague who made him 5 test that all ended like this.