How to flash the firmware
(AT90S4433 version) on Win NT/2000/XP
- programming cable: 10 pole SP12 compatible from "cable.sch"
schematic (V0.7 and later)
- PC parallelport LPT1 on the mainboard
- modularEEG hardware version: V0.7 and later
- Operating system (OS): Windows XP
Download the "sp12 v2.0.7 for XP/NT/W2000" package from
or directly from:
Unpack the tgz archive file until you get the SP12v2_0.7 folder.
Follow these instructions:
(If you have already installed GIVEIO or some other driver that enables
direct port access under Windows XP you can skip the first part)
From "readme.win" in
If you are running Win NT/2000/XP, you
will need to install the GIVEIO device driver.
To install the device driver you need Dale Roberts' device
giveio.sys and the program instdrv.exe. Both of
these are included
in the WinNT sub-directory of this installation. The
and documentation for Giveio can be found at
from the device driver kit (DDK) for Windows NT.
* Copy the driver giveio.sys from the archive directio.zip
* Use command line to install the driver using instdrv:
* In order to start this driver at every reboot
change the start up behaviour to automatic:
* 2000/XP: start regedit and
change the value of the key "Start" in
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\giveio" to 2.
* NT: Control
Sp12.exe should be put somewhere in your PATH. It is
to set the environment variable SP12 by adding a line like
"Set SP12=C:\SP12\" to your environment. Sp12 looks for
files in the directory pointed to by this variable:
_sp12rc. Without it, you'll need copies of those files in
your project directories.
Copy _sp12dev into the chosen directory, and run
To make sp12 create an _sp12rc for your system. Depending
computer it may take a few seconds or somewhat longer to
calibrate the timing loop.
Note: If heavy multitasking is going on, the
produce time constants which are too small. Therefore
should be created on a lightly loaded system. When
actually programming an uC, heavy background loads may
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
instance to make SP12 use a different parallel port (read
_sp12rc and sp12rc.txt for details).
The command presents a progress bar, which should take
seconds to complete, counting from the moment when you hit
return on the command line. (There may a brief pause
bar appears, which nevertheless is part of the ten
I wouldn't worry if it's eight or 15 seconds. But the
is large, read `bugs & bother' below.
Connect the programming cable (2x5, 10 poles, digital pcb version 0.7
and later) with the PC-parallelport and the modularEEG 2x5 pinhead
programming connector. Make sure PIN1 of the connector is aligned with
PIN1 of the programming cable.
Activate the power supply for the modularEEG.
Flash the ROM-image (AT90S4433_modeeg_v0_07.rom
into the AT90S4433 uP:
sp12.exe -wpfC AT90S4433_modeeg_v0_07.rom -T1
You should see the following:
SP12 version 2.0.7 performing init...
Path to _sp12rc and _sp12dev: Local directory
Running in SP12 cable/dongle compatible mode.
Enabling AVR serial reading/programming...
The device code bytes 0,1,2: 0x1e, 0x92, 0x3 were read
from parallel port 0x278 and indicate the following:
You have connected an AT90S4433
The device was made by Atmel
Performing chip erase...
Writing content of AT90S4433_modeeg_v0_07.rom into program area.
AT90S4433_modeeg_v0_07.rom written and verified.
write retries: 0, byteWrite: 25 percent of default
Checksum program area: 4893
Reset was left high.
If you see the above you have successfully flashed the firmware into
One final but important step:
|Always disconnect the SP12cable before connecting
the EEG to a test subject !!!!
That is important
because the programming cable (SP12cable) crosses the opto-isolator and
connects PC-ground to EEG-Ground. So with the programming cable
attached the modularEEG does not have any safety isolation.