FABulous christine

Monday, October 04, 2004

microcontrolling the world

[milling via modela, surface-mount soldering, tied up in knots, and windows assembly]







my procedure for getting this going on windows follows. i was a little hesitant to install linux from scratch on my computer, because that might invite more trouble, especially in the limited time window i had for the assignment.

download avra with the include files tn15def.inc and tn26def.inc, download uisp [on the download page, you want the link that's
like the 3rd down [ uisp-20040311.tar.bz2 ; i used winrar to extract the
files], download python, download pyserial, pyparallel, giveio, and pywin32 (all on sourceforge)

you need cygwin to compile uisp; when installing cygwin, make sure you install the auto-make and gcc components [in that dialog box during setup, click 'view' in the upper right and the components are in alphabetical
order]

then go in cygwin, get in the uisp directory, and type ./configure. after
that, type make. and then make install. things should go ok.

you have to change the paths in windows; to to my computer, right-click,
properties, advanced tab, and then environmental properties. edit the path
settings (on the bottom) and add the directories that python, avra, and uisp
are located (separated by semi colons)

alright, now you have to check what your parallel port and serial port are
called. go to my computer - properties - device manager. check out the
ports. my serial port was COM5 [although every time my computer started up it would rename the port to COM4 or COM6, you want to check each time]; my parallel port was 0378 (click on lpt1 and do properties, resources tab, the number should be on top; all of ours were 0378 so i think that's the default)

edit your rx.py file so that the serial port reflects your COM port. mine
has '/COM5' instead of '/dev...' whatever is there.

now... run->cmd.exe. go to your directory with the rx.py file. type python
rx.py. keep this window running in the background. [this is where the hello
world stuff should display when it's running]

open another cmd window. go to directory with your hello.asm file. type avra
hello.asm -- this compiles the code and creates a hello.hex file.

type the uisp command that neil has to load code, except change the parallel port to reflect yours; mine looks like:
uisp -dlpt=0x378 -dprog=dapa -dvoltage=3 -dt_sck=50 --erase --upload if=hello.hex

once you type that, it should say something like 'uploading; flash
installed' or something to that effect, and you should see random letters
streaming down on the rx.py window (or hello world if you're really lucky).
most likely you'll get some weird error. check to make sure all the cables
are really connected, and shove those serial cable wires even tighter.
anyway, it should work if the connections are good.

and then, if you find you're getting gibberish letters, edit the hello.asm
file and change the b value. every time you edit it, save, and then
recompile using avra. load onto chip using uisp and keep trying til it
works.

and voila! here's the beautiful evidence...



metal crimp madness!

it took me about an hour to do my first one; then realized you're supposed to thread the wire through, not shove it in from the top! :)

i just heeded raffi's advice; strip a wire, twist the strands, then thread
thru the crimp. make sure there's rubber wire covering going through the
first (the largest) pair of clips. take needlenose pliers or something and
just squeeze the clips to tighten around the rubber (like tongs). put a dot
of solder in the middle of the crimp to secure the wire inside (although i
think mine are not really that secure). i was careful not to put too much
solder because i know that's diastrous too. cut off the excess wire from
the end.

then, bend off the crimp from the metal tape and stick into the serial
connector. i used pliers to shove the thing in completely. make sure the
widest part of the base is in.

i think the best thing is to check every time that all the crimps are in the connector before trying to upload/download to the chip. they arent the most secure things; i thought the metal crimps would catch onto something inside the plastic serial connector to help them stay in but there's always danger of them slipping ever-so-slightly out.

2 Comments:

  • At April 14, 2005 at 2:50 PM, Blogger starchild~ said…

    hello christine...

    you don't need to download uisp for windows - you can do it with avrdude programmer (maybe by changing some attributes on its .conf file depending on the programmer you have)

    have a nice avr programming

     
  • At September 24, 2007 at 12:21 AM, Blogger Unknown said…

    Christine ! microcontrolling with the avrdude programmer is the best solution....o.k. I am posting it little late...but I just got to know it from my friend at aquabot who is a hydraulic engineer....Anycase great going...

     

Post a Comment

<< Home