GTA03 LED controller: LP5521

Werner Almesberger werner at
Tue Nov 18 08:23:52 CET 2008

This is a discussion that started on an internal list but that really
ought to be public. So I'm dragging it here, kicking and screaming ...

In GTA03, we'll use the following controller chip for some LEDs:

One thing that's interesting about it is that it can be programmed
in some form of primitive assembler language. National magnificently
call the tool to translate this language to its binary representation
a "compiler".

There's been concern about whether National would give us the right
to redistribute their Windows-based compiler. However, since the
translation task seems to be more than trivial, I think we're better
off just rewriting the thing from scratch.

To make a nice parser in little time, lex and yacc are useful. Here's
an example using them:

The above example also shows how one can easily add cpp to one's
parser. That way, the usual convenience items (comments, macros, and
include files) are taken care of.

Some people have suggested that the translator is so simple that one
should even put it into the kernel ...

- Werner

More information about the hardware mailing list