GTA03 LED controller: LP5521

andrzej zaborowski balrogg at gmail.com
Tue Nov 18 10:18:12 CET 2008


Hi,

2008/11/18 Werner Almesberger <werner at openmoko.org>:
> 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:
> http://www.national.com/pf/LP/LP5521.html
>
> 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:
> http://svn.openmoko.org/developers/werner/greg/
>
> 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 ...

linux-omap-2.6 people thought so and made a very simple interface for
programming the lp5521 where the compilation is left to be done in
user's head.  It's described in this mail:
http://markmail.org/message/nbfweohulpjd5fx2
Obviously it's very limited compared to your compiler, I find the
compiler very cool.  (Is it turing complete? ( - assuming that cpp
isn't))

Their driver is at
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=blob;f=drivers/i2c/chips/lp5521.c;h=c0862d9f2690f0f0daa38f21659aed7011dff175;hb=HEAD
, I don't know if you planned to use it.

Cheers



More information about the hardware mailing list