Reflection Technology
   

RunAVR, The Newbie Starting Point.

Introduction

  • Build a  "No Parts AVR Programmer"
  • Free windows software to drive it.
  • For programs up to 2K the Basic Compiler is FREE. 
    That's enough to program the full memory capacity of the low cost AT90S2313-10-PC 20 pin DIP. This micro has a real UART.
  • Simple step by step instructions for both software and hardware.
  • This free programmer will program: 90S2313,  90S2323,  90S2343,  90S4414,  90S4434,  90S8515,  90S8535,  90S2333, 90S4433, MEGA603, MEGA103, and ATTINY22.
  • Forget the other toy basic compilers and interpreters. This is the real thing. And as you can program your own micro, you only need purchase blank chips.
  • You don't need to learn PBasic or STAMP type languages. The user only needs to know QB or VB.
  •  
  • Please Note *** 
    • The 2K code capacity is the only restriction for the demo version. You can fully program the 2313, which is a very powerful Microcontroller in itself
    • this "Free Basic Compiler" gives you access to all the  features of  Bascom-AVR. Many users may never want to go further than this minimal level. 
    • For instance, if you are a PIC16F84 Basic language programmer, how much have you spent on programmers and interpreters/compilers? 
    • Well, this is zero. Zero dollars for the Compiler, zero dollars for the programmer. This price doesn't include the cable and connectors, and the three optional resistors if fitted.
    • The AT-TINY-22 is an 8 pin flash device with 2K of program area, so you can get started programming these tiny devices in QBasic also.
  •  

BASCOM-AVR Starter Kit:

  • This is a promotional vehicle for both Bascom-Avr and SimmStick. This is the simple cost effective method of getting started in Microcontrollers and programming in the Basic Language. Anyone familiar with QBasic can dive straight in.
  •  

Little "rAVeR!" QuickStart Board

  • The little rAVeR! board is now available, so this project is now done on our our new DT006 SimmStick Board.

It is based on the DEMO version of Bascom-Avr which can be downloaded from: http://www.mcselec.com/download.htm
This has 2048 bytes in the demo mode, which is already greater than the storage capacity of the TOY Basic Interpreters that are around. You don't need a serial EEPROM, and you don't need a Programmer, as you can program it with 5 wires connected to your Printer Port.

This is a compiler, not an Interpreter, which means it runs at lightning speed by comparison. PICmicros have a divide by 4 clock. AVR's run at 1 instruction per cycle, so a 10Mhz device is running at 10 mips. A similar PICmicro with a 10Mhz clock would be running at 2.5 mips.

The program runs from within the micro, not from a slow external serial EEPROM. There is simply no comparison. You don't need an external serial EEPROM.

This setup is based on the AT90S2313-10-PC 20 pin DIP, 10Mhz, 2K Flash Micro, however most popular Atmel AVR micros can be used. The AT90S2313-10 is a 10 mips device. Unlike the PICmicro chips used in some Basic Interpreters, these micros have real UART's for RS-232 Communications.


31-Mar-2000 From B.T. Salt Ash NSW Australia.
Hi Don, I got the AVR kits up and running in no time, the BASCOM compiler is
a joy to use!  (Unlike that pig of a thing I bought from Dick Smith)

Why should you use a Stamp or other pre-programmed chip when it is so simple to program the chip yourself?

  • BASCOM-AVR is a BASIC compiler for the AVR microprocessor. Instead of an interpreter, you get a real native code compiler.
  • BASCOM-AVR is not intended as a replacement for the well known and handy to use Stamps but it sure is as simple to use.

BASCOM-AVR is an IDE (Integrated Development Environment) with a multiple file editor, syntax highlighting, terminal emulator and integrated programmer.

Making a program is as simple as:
  • Load or write the program
  • Press F7 to compile the program
  • Press F4 to program the chip
  • Watch the serial output(if any) on the terminal emulator (CTRL+T)
Yes that is all. The BASIC language has a rich set of statements and functions. Too many to describe here but among them are special statements for SPI, I2C, 1WIRE, LCD display, RC5 code reception, matrix keyboard input, serial input and output etc.

The available data types are bit, byte, integer, word, long, single and string.

The programmer cable is simple to make:
 
DB25 male
connector
DT104 , J5  
Pin 2, D0   Pin 4 MOSI
Pin 4, D2   Pin 8 RESET
Pin 5, D3   Pin 6 CLOCK
Pin 11, busy   Pin 5 MISO
Pin 18-25, ground   Pin 1 GND

Note that pin 18, 19 , 20, 21, 22, 23 , 24 and 25 of the DB25 male connector must be connected to each other.

The simple cable programmer design is from Sample Electronics. To protect your LPT port you can put 330 ohm resistors in series with the MOSI, RESET and CLOCK signals. However, all was tested without these resistors without any problem.

  • The circuit above shows the connections for a DT104 SimmStick.
  • The +5V from the target circuit (DT104) is used and should not be connected to the LPT port.
  • A suitable crystal must be fitted to the DT104 board.
  • The AVR microprocessors can be programmed repeatedly up to 1000 times!

You can download the DEMO from our website for free. All you need more is a PCB with an AVR microcontroller and a simple LPT connector. In order to get you up and running fast we provide the BASCOM-AVR Starter KIT.

Steps to success
  • Download the files bcavrd_1.zip and bcavrd_2.zip from http://www.mcselec.com/download.htm and store them in a temp directory (C:\TEMP for example)
  • UNZIP the files with the command PKUNZIP *.ZIP
  • Two files will be created : SETUP.EXE and SETUP.W02
  • Execute the file SETUP.EXE by entering the name on the DOS prompt or by double clicking on it from Explorer.
  • A window will be displayed that suggests that you close all other programs.


  • Click the Next button.

  • Some info about the DEMO will be shown now.

  • Click the Next button.

  • Now you have the option to change the default installation map.
  •  

    Change it and/or press the Next button.

  • Now the SETUP gives you the option to backup the system files. Choose Yes (default)

  • Now you will be informed that SETUP is ready to install the files. Once again press the Next button. The files will be copied now and the windows looks like the one below.
  •  

  • After all files have been installed a final Window will be shown:
  •  

    Press the Finish button. 

    Now you MUST REBOOT your PC. This will register the used OLE controls.

  • Load the DT104.bas file into the editor
  •  

Configuring the environment and the compiler
Set the CPU Options
  • Choose from the Menu Options, Compiler, Chip
  • Select the chip 90S2313
  • Change the stacksize to 16
  • Change the framesize to 30
  • Select the Output tab
  • Select HEX , DEBUG, BINARY and AVR studio Object File file generation
Set Serial Comms Options
  • Select the Communication tab (of the Compiler tab)
  • Select a baudrate. (9600 for example)
  • Select the used crystal in your DT104 or DT006. This should be 8000000 Hz. (10000000 Hz. for 10Mhz crystal)
  • Select the Communication tab(above)
  • Select the COM port you have connected to the DT003 or DT006.(if appropiate)
  • And select the baudrate (9600 in our example). Databits should be 8, parity None, stopbits 1 and handshake None. The emulation type can be ANSI for example.
Set Programmer Options
  • Select the Programmer tab.
  • Choose the Sample Electronics Programmer. 
  • Select the Parallel tab the right LPT address. For LPT1 this is (probably) 378. The autoflash and other options should be turned off to start with. (You can check the LPT address in your PC BIOS settings)
Set the Above options as the Defaults
  • Now select the Compiler tab again and press the Default button. 
    Now for each project you start these settings will be used. 
  • Press the Ok button to return to the editor.
  • Now you can compile the file by pressing F7. When everything is ok, no errors will be shown.
  • Now you can press F4 to bring up the programmer window.
  •  

    Now you can ERASE and program the loaded file to the target chip.
    The chip should be recognized automaticly by the programmer. When you have selected another chip in the compiler options you will get a warning. In the helpfile you can learn more about the programmer.
     

  • Return to the Options Programmer menu and select the Auto Flash option. Close the Options window to return to the editor. Now when you press F4, the chip will be programmed without showing the programmer window.
Hey are we forgetting something? Yes we must first make the DT boards and the programmer cable!

On the next pages, I will describe how to build up the DT boards and the programmer cable.

"rAVeR!"
The little rAVeR! board is now available, so this project is now done on our our new DT006 SimmStick Board.


Sample Electronics programmer

The parallel port Sample Electronics programmer is described above but for completeness, here are the connections again:

  • Connect a wire from the DB25 pin 2 to the J5 connector pin 4
  • Connect a wire from the DB25 pin 4 to the J5 connector pin 8
  • Connect a wire from the DB25 pin 5 to the J5 connector pin 6
  • Connect a wire from the DB25 pin 11 to the J5 connector pin 5
  • Connect a wire from the DB25 pin 18 to the J5 connector pin 1
  • Connect the pins 18-25 of the DB25 connector to each other
  • Optionally use 330 ohm resistors in series with MOSI, RESET and CLOCK

Now you should have a full working system.

The programmer can be used to program other AVR chips as well. In addition, of course you can create your own PCB or prototype board too. When you are using the Sample Electronics programmer take in mind that a crystal must be connected to most of the AVR chips. (the 8 pin parts are an exception they have a built in RC oscillator).

When you encounter problems or have question please send an email to avrdemo@mcselec.com
Normally we should respond within 24 hours but of course, questions of customers have a higher priority so in the worst case it can take a day more.

Have fun,
Mark Alberts MCS Electronics


BASCOM-AVR Full Version:

The full version Bascom-Avr compiler is just ($69USD)
This is the best Author supported compiler available today. MCS Electronics already have an excellent track record with their Bascom-8051 compilers, and support groups are firmly established. 

"rAVeR!"
The little rAVeR! board is now available, so this project is now done on our our new DT006 SimmStick Board.



Additional information on the 2313 Micro can be found on the Atmel site at:
http://www.atmel.com/atmel/products/prod200.htm

http://www.mcselec.com/bascom.htm has details for subscribing to the Bascom Mail list and the archives can be viewed at:  http://www.grote.net/bascom/maillist.html


Other boards of interest for the RunAVR family of Micros are:

  • DT004 Printer Port - SimmStick Interface
  • DT107 40 pin Atmel AVR CPU board
  • DT104 20 pin Atmel AVR CPU board 
    (for AT90S2313AVR or the 8051 compatible 89C2051)

and in fact you should check out all of the SimmStick info.


Subject:        Re: PC Based or BSII etc?
Date:            1 Feb 2000 23:32:11 GMT
From:           dlc@fc.hp.com (Dennis Clark)
Newsgroups:  comp.robotics.misc

  References: Gordon McComb (gmccomb@gmccomb.com) wrote:
: Don McKenzie wrote:
: > Have a look at:
: > http://www.dontronics.com/runavr.html
: > you can program a 40 pin flash chip in Qbasic.
: > This can be the same type of chip that the basic-x is using.

: Don, I've been looking at BASCOM AVR the past few weeks, and this
: "QBasic" stuff you've mentioned here a few times just doesn't do it
: justice. Anyone here who has used QBasic may get the wrong idea. Yes,
: the syntax is comparable, but the functionality definitely is not!

: Sorta like calling filet mignon a McDonald's hamburger... <g>

 I agree - the BASCOM stuff is far more flexible!  Ever hear of creating ISR's with QBasic?
DLC
------------------------------------------------------------
 Dennis Clark  (970)898-4313    email dlc@fc.hp.com

BACK    TOP  
 

All rights reserved 1999-2005 Giovanni Moretti Palmerston North, New Zealand

  Privacy Statement Contacting Reflection Technology Product Return details