Hector Yuen's Home Page
MAS.863 How to make almost everything 

 

Projects
Blending ideas
Cutting fun
Say Hello
3D Madness
Efe-XMMS
Making a car (1)
Making a car (2)
Vaccum Forming

Final Project

Make the tracks as wide as possible
Write a Makefile for assembling and loading

 

The assignment this week was to practice building circuits, we made a microcontroller saying Hello World through the serial port.

The design was provided as an Eagle board

schematic
board
gerber

In Eagle, you must export the file through the CAM processor into a Gerber File, to be used at the Modella Milling Machine.

After that, we must write the file into the modella machining computer, this can be done easily with ssh.

scp design.cmp modela@IP:

to position the machine, we use the command

move x y

where (x,y) are the coordinates.

To run the cam.py script and write the toolpath, we run the following command.

python cam.py design.cmp
cat out.rml > /dev/ttyS0

After milling the board, we solder it, and the next step is to program it.

I used a Linux Debian box, so it is very easy to install all the required packages in the machine to be used.

apt-get install py-serial
apt-get install avra
apt-get install uisp

To check in which apt package does a file exist, I used the following website

Package search

 

Sometimes the parallel port is not enabled by default in linux, so you must load the kernel module.

modprobe parport

The next time you recompile the kernel, make sure you enable it :)

It is very useful, when we want to run a command, and don't know the name of the package, this can save you a lot of time.

hello.asm

To assemble the code, we use

avra hello.asm

it will generate

hello.hex

Then we load it into the chip. To do that, we must first turn it on, by running the rx.py script.

python rx.py

After that, I used the following command in another window:

uisp -dlpt=/dev/parport0 -dprog=dapa -dvoltage=3 -dt_sck=50 --erase --upload if=hello.hex

All this can be put in a Makefile. available soon.