Read this section only if you need to flash the AT91SAM7S64
microcontroller by yourself. If you have purchased a kit from us, we have already done this for you.
Modern microcontrollers, such as the Atmel AT91SAM7S64
have highly-packed footprints, making it difficult to find traditional programmers supporting them. That's why ISP (In-System Programming) has developed very rapidly in the recent years. ISP allows for assemble the entire circuit board first, and then flash the firmware, often using very simple tools. The AT91SAM7S64
implements a very convenient ISP solution, based on the built-in USB module. It's called the SAM-BA (SAM Boot Assistant), and requires only a USB cable and a few simple jumpers. To run SAM-BA on your Wireless Keylogger mini-boards, first download the AT91 ISP
tool. Then, follow the steps below to complete firmware flashing on the transmitter and receiver unit.
: Applies for the transmitter unit only. Prepare a USB cable with a type A male plug on one side, and isolated wires on the other side. Solder the USB lines VCC, GND, D+, and D- to the appropriate pads on the PCB. This step is not necessary for the receiver, as it already has a USB connection.
: Prepare a few short wires for short-circuiting the SAM-BA pins: TST, ERASE, PA2, PA1, PA0, 3.3V. Solder one end of each wire to the SAM-BA pads on both boards. Alternatively, you may prepare special jumpers as seen on the pictures.
SAM-BA wiring scheme (PDF version)
: Install the AT91 ISP
: Connect the device to a free USB port. A Device Not Recognized
message is normal at this stage.
: Short the ERASE and 3.3V signal wires for a moment. This will erase the microcontroller's flash memory.
USB cable and jumpers for SAM-BA bootloading
Memory erasing (ERASE pin shorted to 3.3V)
Bootloader activation (PA0, PA1, PA2 and TST shorted to 3.3V)
: Disconnect the device from the USB port. Make sure the ERASE pin is not connected to 3.3V any more. Now short the set of pins PA0, PA1, PA2 and TST to 3.3V. Connect the device to the USB port again (Device Not Recognized
may appear again). Leave the device connected for approximately 10 seconds, and then disconnect the device from the USB port. This operation should have activated the SAM-BA bootloader.
: Remove all shorts or jumpers and connect the device to the USB port. The New Hardware Found
dialog should appear. Please follow the default procedure and allow the wizard to find the drivers itself.
Found New Hardware wizard
: Open the Device Manager and verify that the SAM-BA bootloader has been activated.
Device Manager with Atmel AT91 device
: Run the SAM-BA application from the AT91 ISP
software suite and select the AT91SAM7S64-EK
target microcontroller board.
Microcontroller board selection
: After establishing the connection with the board, switch to the Flash
tab, select the appropriate firmware
for the transmitter/receiver, and click on Send File
. When the application asks whether to lock and unlock the involved flash regions, select yes. If you were successful in finalizing this step, it means the firmware has been downloaded to the microcontroller.
SAM-BA Main Window
Remember to go through the SAM-BA procedure for both the transmitter, and the receiver. When finished, both devices are ready to go.