ELECTRONICS PRODUCTION


Home About me

ASSIGNMENT


Make an in-circuit programmer by milling the PCB, then optionally trying other processes.

MILLING OF THE BOARD

The FABISP is an in-system programmer for AVR microcontrollers. It facilitates the programming of non-volatile memories on the chip.

An in-system programmer will be build and soldered from scratch. Our fablab's milling machine is the Roland MDX40A, a mid-range subtractive rapid prototyping device useful for various industrial and creative applications.

FR1 material for the PCB is used for the milling process as it is more suited for machining than epoxy glass based PCBs, such as FR4.

The following in-circuit programmer will be milled and soldered:

in-circuit_programmer

The following two high-resolution PNG board traces are used for the milling process:

fabispfabisp

Roland MDX-40A Settings

SOLDERING THE BOARD


PROGRAMMING THE FABISP


An Arduino-uno can be used to program the FabISP. In order to do so, the Arduino IDE is needed to upload the right sketch to the arduino-uno.

First, the ISP program is uploaded to the Arduino. The example program is located in examples, under the name arduinoISP

Program below is then uploaded to the Arduino-uno. This will allow us to program the FABISP for the first time.

programming

The next step is to connect the FabISP to the Arduino-uno. As the arduino-uno is used as a programmer, schematic below illustrates the pin connections between the arduino-uno and the FabISP:

fabisp_prog

programming

Next, the fabISP firmware is used. A firmware is nothing but a software programmed into the FabISP which will allow the FabISP to function.

The arduino as ISP is used as a substitute to a dedicated isp programmer. Of course, if wished, another programmer can be used to upload a sketch to the FabISP.

The firmware must be unzipped and the following commands entered in the shell to program the FabISP:

make clean
make hex 
  

Then, the Makefile is modified to the right port; for this, the following line is entered:

AVRDUDE = avrdude -c stk500v1 -P /dev/ttyACM3 -b19200 -p $(DEVICE) 
  

Note that for windows and mac the usb port will be different.

Image below illustrates the process (please note the line is imcomplete ($(DEVICE)) is missing.

programming

Then, the following commands are entered:

make fuse
make program 
  

Ouput window will show success. If not, the board needs troubleshooting.

programming

The whole shell process is documented below:

jc@jc-X220:~/Repositories$ cd temp/fabISP_mac.0.8.2_firmware/
jc@jc-X220:~/Repositories/temp/fabISP_mac.0.8.2_firmware$ ll
total 84
drwxr-xr-x 3 jc jc  4096 Feb 28 17:29 ./
drwxrwxr-x 5 jc jc  4096 Feb 28 17:29 ../
-rw-r--r-- 1 jc jc  6148 Feb 15  2013 .DS_Store
-rw-r--r-- 1 jc jc  8795 Feb 11  2011 main.c
-rwxr-xr-x 1 jc jc  9635 Feb 18  2013 main.elf*
-rw-r--r-- 1 jc jc  5696 Feb 18  2013 main.hex
-rw-r--r-- 1 jc jc  3380 Feb 18  2013 main.o
-rw-r--r-- 1 jc jc  6989 Feb 13  2011 Makefile
-rw-r--r-- 1 jc jc 17777 Feb 11  2011 usbconfig.h
drwxr-xr-x 2 jc jc  4096 Feb 28 17:29 usbdrv/
jc@jc-X220:~/Repositories/temp/fabISP_mac.0.8.2_firmware$ 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
jc@jc-X220:~/Repositories/temp/fabISP_mac.0.8.2_firmware$ make hex
avr-gcc -Wall -Os -DF_CPU=20000000	 -Iusbdrv -I. -DDEBUG_LEVEL=0 -mmcu=attiny44 -c usbdrv/usbdrv.c -o usbdrv/usbdrv.o
make: avr-gcc: Command not found
Makefile:132: recipe for target 'usbdrv/usbdrv.o' failed
make: *** [usbdrv/usbdrv.o] Error 127
jc@jc-X220:~/Repositories/temp/fabISP_mac.0.8.2_firmware$ sudo apt-get install flex byacc bison gcc libusb-dev avrdude   
[sudo] password for jc: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc is already the newest version (4:5.3.1-1ubuntu1).
gcc set to manually installed.
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-headers-4.4.0-47
  linux-headers-4.4.0-47-generic linux-headers-4.4.0-53
  linux-headers-4.4.0-53-generic linux-headers-4.4.0-57
  linux-headers-4.4.0-57-generic linux-image-4.4.0-31-generic
  linux-image-4.4.0-47-generic linux-image-4.4.0-53-generic
  linux-image-4.4.0-57-generic linux-image-extra-4.4.0-31-generic
  linux-image-extra-4.4.0-47-generic linux-image-extra-4.4.0-53-generic
  linux-image-extra-4.4.0-57-generic linux-tools-4.4.0-47
  linux-tools-4.4.0-47-generic linux-tools-4.4.0-53
  linux-tools-4.4.0-53-generic linux-tools-4.4.0-57
  linux-tools-4.4.0-57-generic pyside-tools python-ply python-pyside
  python-pyside.phonon python-pyside.qtdeclarative python-pyside.qthelp
  python-pyside.qtnetwork python-pyside.qtopengl python-pyside.qtscript
  python-pyside.qtsql python-pyside.qttest python-pyside.qtwebkit
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  libbison-dev libfl-dev libftdi1 m4
Suggested packages:
  avrdude-doc bison-doc
The following NEW packages will be installed:
  avrdude bison byacc flex libbison-dev libfl-dev libftdi1 libusb-dev m4
0 upgraded, 9 newly installed, 0 to remove and 67 not upgraded.
Need to get 1,487 kB of archives.
After this operation, 4,545 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 libftdi1 amd64 0.20-4build1 [15.2 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libusb-dev amd64 2:0.1.12-28 [29.9 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 avrdude amd64 6.2-5 [291 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 byacc amd64 20140715-1 [56.9 kB]
Fetched 1,487 kB in 5s (256 kB/s)
Selecting previously unselected package m4.
(Reading database ... 469841 files and directories currently installed.)
Preparing to unpack .../archives/m4_1.4.17-5_amd64.deb ...
Unpacking m4 (1.4.17-5) ...
Selecting previously unselected package libfl-dev:amd64.
Preparing to unpack .../libfl-dev_2.6.0-11_amd64.deb ...
Unpacking libfl-dev:amd64 (2.6.0-11) ...
S and directories currently installed.)
Preparing to unpack .../av###################################### | 100% 1.45s

avrdude: ve-w----   1 root tty       4,  28 Feb 28 17:57 tty28
crw--w----   
  

LESSONS LEARNED


FILES


PNG fabISP internal traces

PNG fabISP external traces

RESOURCES


Electronic production page


The content of this page is licensed under Attribution-NonCommercial 4.0 International CC BY-NC 4.0. Any source code, if otherwise unspecified, is licensed under the MIT License