Hi -

I have a MSAVR running in simulation with Mega_Stim. I hope to install on my air cooled VW soon. The configuration is 1600cc Tbi 4 cyl.

My home page is :


Demo of VEMS souce code documentation is :

Source code in CVS was updated to include the DOXYGEN comments on 4/27/04.

To generate the DOXYGEN html directory on your computer:

  1. download DOXYGEN from
  2. intall it
  3. download the VEMS source code from CVS
  4. enter the folowing command in the firmware directory: doxygen doxygen.cfg


I have been working on upgrading the terminal emulation program that I use to add flash programming capability.

Megaloader from MembersPage/DavidHelland for win, linux (src + binary) is text-only terminal emulator with up-load and down-load capability for MSAVR. Also programs HEX files into AVR Flash.

I hope someone would try it and give some feedback. It can be built for Win32 or Linux.

The main functions are:

Program Name: Megaloader



Usage: megaloader [fileword] [flagword] [speedword] [port]

Terminal Mode Commands:

David Helland

Possible Text Data Field Description Language

Purpose: define an intermediate data format for decoupling engine computer code from display / tuning / configuration programs.

I checked into SYLK formats for text language and found that it is not very concise and GNUmeric (Linux spreadsheet) only imports this format (no output). I suppose we could get the GNUmeric sources an customize the program for our own purposes but that is not in my scope of things.

GNUmeric does have a WK1 binary format that is compatable with excel. I still think it would be very handy to prototype a display with calculations in Excel and the export to a file that could be read by other spreadsheets or our own custom programs.

SYLK and WK* formats are located at:

I found the following C-code spreadsheet for Linux (can be ported to Win32). This supports the WK1 binary format and has its own ASCII text format that is more readable and concise. We could convert this into our own custom programs or just use the parser for other purposes. I loaded and built it on my Linux box. It is simple but powerfull. It will allow referencing cells by name in the text file format and also has a 'Z' axis in the spreadsheet for hiding intermediate calculations and data structures. The functions can easily be expanded to fit our needs.

teapot (Table Editor And Planner, Or: Teapot),a spread sheet program for UNIX.

The current release has the following features:

teapot should work on any system which supports the following:

The changes compared to 1.06 are:

A GNU zipped tar file is available from:

====Asc file format definition====

-- parse cell
parse x y and z
parse optional attributes
A -- adjustment
'l': adjust=LEFT;
'r': adjust=RIGHT;
'c': adjust=CENTER;
L -- label
P -- precision
S -- shadowed
E -- scientific
O -- locked
T -- transparent
I -- ignored
convert remaining string into token sequence
(values, or formulas : see teapot.doc for list)
i.e. @(reference) is a an indirect to x,y,z or label
W -- column width
'# -- comment

====Sample Asc input/output file example====

This is a work sheet generated with teapot 1.07.

C1 5 0 T................................#set x,y,z (1,5,0) to transparent
C1 3 0 Lcalcdata3 :@(line2data)+32...#at x,y,z (1,3,0) name "calcdata3" with formula: add 32 to line2data
C0 3 0 :"line three".................#set x,y,z (0,3,0) to string
C1 2 0 Lline2data :sin(3).........#at x,y,z (1,2,0) name "line2data" with formula: sin(3)
C0 2 0 :"line two".....................#set x,y,z (0,2,0) to string
C1 1 0 Lline1data T :123..........#at x,y,z (1,1,0) name "line1data" with value: 123
C0 1 0 :"this is line1"..............#set x,y,z (0,1,0) to string
W0 0 25..............................#set col 0 width to 25

David Helland

The Sylk format might be sufficient, but it seems to me a lightweight custom language with reverse polish notation for the formulas and simple text-format for display-layout description would be easier, and just as good.

Maybe all this decoupling can be postponed a bit:

in the worst case we will need to maintain the common part in 2 branches for some time:

as I expect that we will not have a perl codebase for the tuningprogram.

On the other hand, being compatible with external programs is nice, takes jobs off our shoulder. We also want to support logs for spreadsheets, but the csv is the simplest for it.

I cannot judge how hard would it be to use alien sylk code, and what legal consequences it will have. If we need to implement sylk, we probably want only a subset of sylk: the subset we actually need.

I have finished my design of the Mega_Squirt_AVR board. (see photos)

My MSAVR Board with Mega_Stim and LCD


My MSAVR Board


I made a few changes i.e.

  1. layout in PADS
  2. more surface mount parts
  3. size changed to 4" by 6" to fit original MegaSquirt box.
  4. more trasient voltage protection
  5. programming header compatible to my cable
  6. no parts on the bottom
  7. Misc LED at board edge with transistor driver

other than that I have made the board very faithful to the Mega_Squirt_AVR 2.2 layout

per :