summaryrefslogtreecommitdiff
path: root/readme.dos
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2010-01-06 17:55:16 +0000
committerDimitri Sokolyuk <demon@dim13.org>2010-01-06 17:55:16 +0000
commit09381c6097773b08622c810428a84840b5b08070 (patch)
treef62afce58620ebbffe6abcf1b8e1d8df6a09a5b8 /readme.dos
AVR SP12 programmer
Diffstat (limited to 'readme.dos')
-rw-r--r--readme.dos130
1 files changed, 130 insertions, 0 deletions
diff --git a/readme.dos b/readme.dos
new file mode 100644
index 0000000..eaf0d08
--- /dev/null
+++ b/readme.dos
@@ -0,0 +1,130 @@
+
+NAME
+
+ SP12: A serial programmer for working with Atmel AVR uCs.
+ Copyright (C) 1997-2003 Ken Huntington, Kevin Towers, Pitronics.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA.
+
+ Pitronics can be reached by email: sbolt@xs4all.nl
+ Kevin Towers can be reached by email: ktowers@omnexcontrols.com
+ Ken Huntington can be reached by email: kenh@compmore.net
+
+URL
+ The home page for sp12 is
+ http://www.xs4all.nl/~sbolt/e-spider_prog.html
+
+DESCRIPTION
+
+ Sp12 version 2.0 is a serial mode (in-circuit) programmer for the
+ AVR family of microcontrollers. When new AVR uCs arrive, you can
+ easily add support for them yourself, by adding a plain text entry
+ to the runtime configuration file _sp12dev. Editing this file also
+ allows you to customize the way sp12 deals with existing uCs.
+
+ Customization means, among other things, that you can define the
+ write (high, extended) fuses commands so they won't touch the bits
+ that can lock you out of your uC. For instance, the Mega8 and the
+ Tiny15 both allow serial mode access to RSTDISBL, which can take
+ away the resetpin - thus ending serial mode programming access.
+ The Tiny15 also permits writing to SPIEN. If you use the _sp12dev
+ entries as provided, these fuses will never be altered by user
+ errors.
+
+ Sp12 is one of the few programmers capable of uploading new
+ software to several uCs on a single target, in one go. Yet it is
+ a small and simple command line tool, easy to use in scripts and
+ batch files.
+
+ Depending on your PC and target, the hardware can be as simple as
+ a nearly plain cable between your target and a parallel port.
+ A special `dongle' design is available to improve the signal
+ quality and make the programming lines high-Z unless sp12 is
+ active.
+ Sp12 can also adapt its use of the paralel port to the
+ cable/dongles supplied with the Kanda STK200/300 starter kits.
+
+INSTALLATION
+
+ Sp12.exe should be put somewhere in your PATH. It is advisable
+ to set the environment variable SP12 by adding a line like
+ "Set SP12=C:\SP12\" to your autoexec.bat file. Sp12 looks for two
+ files in the directory pointed to by this variable: _sp12dev and
+ _sp12rc. Without it, you'll need copies of those files in all
+ your project directories.
+
+ Copy _sp12dev into the chosen directory, and run
+
+ sp12 -i
+
+ To make sp12 create an _sp12rc for your system. Depending on your
+ computer it may take a few seconds or somewhat longer to
+ calibrate the timing loop.
+
+ Note: If heavy multitasking is going on, the autocalibration will
+ produce time constants which are too small. Therefore _sp12rc
+ should be created on a lightly loaded system. When you are
+ actually programming an uC, heavy background loads may slow down
+ the job, but they won't really hurt; the AVR serial mode
+ programming time constraints are minimum values.
+ _sp12rc is in plain language and may be edited (with care), for
+ instance to make SP12 use a different parallel port (read
+ _sp12rc and sp12rc.txt for details).
+
+ If you are using plain MS-DOS or something like it without a
+ DPMI host, you must also put CWSDPMI.EXE (found in SP12\CSDPMI\BIN)
+ in your PATH.
+
+ NOTE: Be sure to erase any previous runtime configuration file
+ (_sp12rc) and let this version make a new one.
+
+ Finally, run
+
+ sp12 -t
+
+ The command presents a progress bar, which should take about 10
+ seconds to complete, counting from the moment when you hit the
+ return on the command line. (There may a brief pause before the
+ bar appears, which nevertheless is part of the ten seconds.)
+ I wouldn't worry if it's eight or 15 seconds. But the deviation
+ is large, read `bugs & bother' below.
+
+BUGS & BOTHER
+
+ Certain time constants necessary for proper upload of flash and
+ eeprom data (serial clock sck low & high, write delay) are
+ realized by autocalibration based on timing nearly empty loops.
+
+ So for starters, you should let sp12 generate its runtime
+ configuration file (_sp12rc) while your computer is lightly loaded.
+ If heavy multitasking is going on, the autocalibration will produce
+ time constants which are too small. When you are actually
+ programming an uC, heavy background loads may slow down the job,
+ but they won't really hurt; the AVR serial mode programming time
+ constraints are minimum values.
+
+ There is no obvious alternative for these loops, as for instance
+ the usleep() function is often limited by the timer resolution of
+ the system (to about 10ms). And this method usually works fine.
+ However, trouble may occur when recompiling sp12 with compilers
+ other than gcc.
+
+ If all else fails, you might edit the line
+
+ LOOPCOUNT=<a number representing 1 second>
+
+ in your _sp12rc, referring to the command "sp12 -t" and your
+ watch to get it right.