
The SP-12 Programming Cable & Programming Introduction
The ATMega8L Brainboard
SP-12 Programming Interface:
If you’re doing this on-the-cheap, you’ll most
likely program the Brainboard via your computer’s parallel port (most often
connected to a printer cable). The SP-12 serial programmer is released under the
GNU license by Ken Huntington, Kevin Towers, and Pitronics (learn more at
http://www.xs4all.nl/~sbolt/e-spider_prog.html). We’ve combined some of the
parts (the resistors, transistor, LED) into the brainboard to make building the
cable a simple project. Find a discarded printer cable, and get hacking!
Completed cable, with heatshrink sleeve and
scrap plastic 5-pin header support
13
1
14
25
Back of DB25 connector (looking at SOLDER/Wire side!)
Programming
header
MISO
MOSI
SCK
RESET
GND
SP-12 Physical Wiring Diagram
2
3
9
11
Your ATMega8L comes pre-programmed, ready to go
, but if you want to
make changes, you’ll need a “development suite” to help you program, compile
and download to your robot. Most people start by using “C”, so we suggest
using the “GNU C Compiler” (aka: “GCC”) with “WinAVR” from
tm
http://winavr.sourceforge.net/ (on the Windows XP platform). Install the
package, and make sure you run the “giveio.bat” program, which enables direct
port access. Full installation notes are available with the download, or from the
“resources” section for the Brainboard at http://www.solarbotics.com.
Connect the cable the robot and the PC.
Disable
the motors
on your robot
before powering the robot on (use the robot’s motor enable switch). A good
connection makes the green programming LED glow. No light = no connection,
so make sure the cable is connected the right-way around to the robot.
Grab the latest code from our website, and open the “Sumovore_2.proj” project
file with WinAVR, which will automatically load up all the support files. “Click on
“Tools”, then “[WinAVR] Program”. This creates the machine code, and
downloads it to the robot!
There are three sections to the code, startup, Sumo, and the Line-follower. If you
start your Sumovore on a black sumo-ring surface, the low signal from the edge
sensors kick into sumo mode. White surface reflection (white table with black
electrical tape line)kicks the Sumovore into running the line-follower routine.
Pin1
Pin25