staverlogo.gif (2487 bytes)


Important Information

When you get the StAVeR-24M32/DevKit2, it is allready programmed with a demo program inside and to verify that the hardware is working the way it shall do. So before you go ahead with erasing and try to program one of the sample programs below, walk though this test to verify that all is OK.

The StAVeR-24M32/DevKit2 comes pre-programmed with the ICCAVR demo program which could be downloaded below under Sample Programs. This program demonstrates all the hardware on the kit such as buttons, LCD, LED's, buzzer and USART (Serial RS232).

Connect the serial cable from the kit to the PC and open your favourite Terminal software and set it up for 57600 baud, 8 databits, no parity and 1 stopbit and open the COM channel. Then apply power to the StAVeR-24M32/DevKit2 (9-15VDC) through the 2.1mm plug. Out on the COMport you will see the following information showed below which is a screendump from a terminal program

You will also see the 3 LED's on the StAVeR-24M32 module blink very fast plus that the LCD will lit up (backlight) and that it displays the texts "StAVeR24-M32" and the "www.lawicel.com" URL. There are 4 buttons and if you have the LCD towards you and you press the left button, the buzzer will sound, then if you press the 3:rd button from the left, the backlight will turn OFF and finally if you press the second button from the left, the backlight will be ON again. If no text appear on the LCD, it could be the contrast potentiometer that has turned a bit during transport or you accidently moved it when you first got he kit and wanted the "first feel" of it. So turn the potentiometer clockwise until you have a nice contrast on the LCD. Now you have done the first tests and are ready to program the unit with one of the sample programs below or your own software, but before starting with you own software, test with one of the sample programs below and try to compile and download, so you have tested all.


Sample Programs

Currently there are 2 programs availible in 2 diffrent ZIP files, one in C for ICCAVR and one in BASIC for BASCOM-AVR. To be able to use these programs with the built in programmer of StAVeR-24M32 (i.e. Bootloader) you need at least version 6.29 of ICCAVR or 1.11.7.4 of BASCOM-AVR. They both have built in programmer for StAVeR-24M32 using the standard RS232 connection to a PC. Both programs are well commented what they do and behave in almost the same way. Reading the source code should be enough to explain what they do and how to get you started to write your own programs in either C or BASIC.

Sample program for ICCAVR in zipped format

Sample program for BASCOM-AVR in zipped format


How the download mechanism (Bootloader) works

Before downloading the code into the StAVeR-24M32, you need to connect the RS232 cable (marked 1 on the picture below) to a free PC COMport and the power cable (marked 2 on the picture below) to a DC power supply (9-15VDC). Polarity doesn't matter, since the StAVeR-24M32 motherboard has a rectifier on board.

When using one of the compilers below and programming the StAVeR-24M32, you will be asked to push the RESET button (it also works byremoving the power and turn the power back on again). The download tool of both compilers sends out some characters on the COM port and tries to initiate the download tool in the StAVeR-24M32. The Bootloader is only active during the first half second when the power comes on (or the RESET is activated / pushed) and it will not download automatically, this is indicated by the yellow led on board of StAVeR-24M32 each time power is turned on or RESET is released. If the StAVeR-24M32 recognizes a pattern of bytes being sent to it during this short period of time (when the yellow led is ON) it initiates the XMODEM download, this is indicated with the green led. The green led stays on (for about 1-2 seconds) before the first package is being sent to it and then the green led is turned off and the red led changes state (blinks) for each package being sent to it (each package has 128 bytes). When all packages are downloaded, the StAVeR-24M32 jumps to your application at once.


Getting started with ICCAVR and StAVeR-24M32

To be able to dowload code with the built in download tool (bootloader), you need to set up ICCAVR with the correct programmer, that is done from the main menu Tool and the In System Programmer as indicated on the picture below.

Then a window will appear, select the STAVER option in the Programmer Interface group as indicated on the picture below. Select the COM port you are using (COM1 in this sample).

After that you can decide if you want the programs to be downloaded automatically after a successful build of not, please refer to the ICCAVR manual or online help for more information. Note you cannot change any fusbits with the STAVER download tool. The fuses are set in a way that all code is locked, i.e. nobody can read out the data being programmed into the StAVeR-24M32. This is good for company secrets and data security (note it isn't either possible to read out the program using a standard ISP programmer or JTAG programmer).


Getting started with BASCOM-AVR and StAVeR-24M32

To be able to dowload code with the built in download tool (bootloader), you need to set up BASCOM-AVR with the correct programmer, that is done from the main menu Options and Programmer as indicated on the picture below.

Then a window will appear, select the Lawicel BootLoader option in the Programmer dropdown selection as indicated on the picture below. Select the COM port you are using (COM1 in this sample).

After that you can decide if you want the programs to be downloaded automatically after a successful build of not, please refer to the BASCOM manual or online help for more information. Note you cannot change any fusbits with the STAVER download tool. The fuses are set in a way that all code is locked, i.e. nobody can read out the data being programmed into the StAVeR-24M32. This is good for company secrets and data security (note it isn't either possible to read out the program using a standard ISP programmer or JTAG programmer).


Download Utility for StAVeR-24M32

We have developed a Windows software that makes it possible to download binary files into the StAVeR-24M32. This software makes rapid programming possible for production or for compilers that do not support our protocol or from within AVR Studio. It could be used as a windows program manually or be automated from a batch file from the command prompt. Simply add the program.bat after a successful build and it converts your hex file into a binary file and dowloads it. If your compiler supports a binary file, then the conversion isn't needed. Note the program.bat uses COM1 which could be changed to suit your needs.

Download the zip file and extract all files in your working directory of the project (or to a common directory where there is path to the files). To test the program, simply start the executable file and select COM port from the menu (speed should be set to 115200baud) that you have the StAVeR-24M32 connected to, then open binary file from menu File->Send and then the dowload wait for you to push reset or power up the StAVeR-24M32. When this is done, download begins. If you need to send same file again, push F5 (or select resend from menu). The picture below shows a successful download.


© Copyright 1997-2005 LAWICEL. All rights reserved.
Information in this document is subject to change without notice. Other products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.

Last updated on the 26:th of April 2005