Here are some further details of my software projects - although
these tend to be a bit more longer-term than my hardware projects.
I've programmed embedded system both professionally and for home
projects for many years. One aspect that has always bugged me is
the use of
printf() in embedded systems. Sometimes
the compiler vendor does not provide it. Others provide an
implementation which consumes a lot of ROM and RAM. Very few
offer a useable version suitable for use in these memor-constrained
The other thing which bugged me was using it in
applications which had some funky output, such as an LCD.
The proscribed method is to
sprintf() into a
buffer and then spit that out to the display. That just seems wrong.
So wayback around 1998 or so I started writing my own version of
printf() that incorporated many of the ideas I had had
to solve my specific needs. And so came
- a general-purpose string formatting library for embedded systems.
Its main features are:
- Small code size (2kB compiled for ARM with GCC 4.4)
- Low system overheads (no large buffers)
- Fully re-entrant
- Supports most of ANSI C99 printf() format specifications
format itself does not send any output characters to any
device. Instead, it calls a consumer function, supplied by the
caller, to process any output. A simple example would be a function
to send the characters to a UART. A more advanced use might be
sending characters to an LCD.
I've been developing MIDI devices for several years now
(the first one being my Masters project - a MIDI-controlled
Walsh Function additive synthesizer.). I've worked on a few
And every time I found myself rewriting the same MIDI
parsing code, and hitting the same kind of bugs. And reading
on the internet I realised I wasn't alone. So I decided to
fix that. And
miby - MIDI Byte Stream Parser
is the result.
It is work-in-progress, but as it stands today it is a
working system that will parse multiple MIDI byte streams, calling
to handler functions when various MIDI messages are successfully
It is written in an object-oriented approach, so it could be
used for processing multiple MIDI streams.
Work to do includes adding controller message processing,
SysEx processor, sample dump library, file transfer library, etc.
For more years than I can remember I have been exploring small
processors, from the veneral 6502 in my first home computer (a
Commodore VIC-20), to the
Intel 8096 in a Roland W-30,
and more recently the
NEC uPD78310 in a Kawai K4.
With the 8096 I enhanced and further developed and refined an
existing disassembler by
Willem Jan Hengeveld,
the result being dis96. When I started exploring
the uPD78310 I extended that disassembler, restructuring it in a
modular fashion so it was relatively easy to support another processor.
The result --
dasmxx - Small processor disassembler suite
-- looks like forming the basis of a suite of disassemblers for smaller
8-bit and 16-bit processors.
To date, it supports the Intel 8096 and NEC uPD78310. The next
processor I intend to add is the 6502, mostly for historical reasons
rather than a specific project need.
I first came across Tcl (Tool Command Language) when I installed Linux on my
venerable home PC. Coupled with the graphical toolkit Tk it looked like a
Visual Basic for Unix, but after playing with it for a while now I think it
has much more to offer than VB. So much so that I prefer to write programs in
Tcl rather than in VB.
I suppose what impresses me most about Tcl is that it works. Period. If I want
network support, it's there. If I want cross-platform development, it's there.
If I want loadable module support, with a simple, easy to understand interface,
it's there. Tcl offers closer "one source, many platforms" implementation than some
other languages I've used. Basically, I'm a devotee!
The main Tcl/Tk home page is at Tcl.Tk.
- InOut - Dynamically loadable Tcl library giving access to the PC's
hardware ports using the inp and outp functions. This is useful if you want
to twiddle around with, for example, the PC's printer port at the hardware
level. This library is written specifically for, and used with, the Windows 95/98 platform.
I have used it to implement a proprietary synchronous serial comms link between the
PC parallel port and a large FPGA (big, programmable chip with lots - about 70,000 - logic
- Minesweeper - the classic game! Works both
standalone and inside a web browser using the Tcl plugin.
Download the source.
Save the file, then unzip it to get mines.tcl. Under
Windows just double-click on the file and it will start (if you have already installed
TclTk on your machine). Under UNIX/Linux either source the file in a
wish shell, or edit the path to wish (first line of the file) and make it
executable with chmod.
Copyright © 2001-2024 Neil Johnson