A silly pun. This is the provisional name I’m giving to my bicycle wheel LED persistence of vision (POV) project. The idea is put a row of LEDs controlled by a microcontroller onto the wheel, and have it spell things out as you ride, as a safety feature (making you much more visible from the side), a propaganda tool, and for fun.
Other possible names:
- Spoken words
- Spoken text
- Velolover’s Revolver
- Revolutionary words
- Revolutionary text
etc. You get the idea.
Update: I’ve changed my mind about this again, but I’m embarrassed to say when. I will admit that in late 2008, when I started working in earnest on muforth support for the Freescale S08 series of 8-bit microcontrollers, I fell in love with them.
The QG series has some problems, however. There is at least one serious erratum about the ICS – internal clock source – preventing it from running reliably at 10 MHz. The workaround is to run it at only 5 MHz. This seems rather ... sad.
The QE series – which also comes in DIP 16 packages and 8 KiB flash versions – is very similar, and is actually a slight upgrade from the QG. It’s probably what I would use if I could ever get traction on this project...
As of 2006 December 18 03:24, I’ve changed my mind on this. I was planning on using a Freescale MC9S08QG8 (part of the HCS08 family). This chip has 8k of Flash, 512 bytes of RAM, lots of peripherals, just enough I/O, and comes in a handy (for me) 16 pin DIP package.
This is a nice enough chip, but there are other options, and for various (mostly hysterically non-rational) reasons I’ve decided to start out using a Microchip PIC instead. Probably a 14 pin midrange part – either the 16F684 or 16F688. I won’t have as much Flash to work with (2k and 4k words, resp.), and I can’t store bitmaps or character strings as efficiently – because of the Harvard architecture I can only put 8 bits of data in each 14 bit program word – but I think there is room to have fun. If I really need more space I can put an 8 bit EEPROM in the circuit and store the bitmaps and strings there, like Limor, aka ladyada, does.
Another option is the Freescale MC908QB8, a member of the (slightly older) HC08 family. The 9S08QG8 and 908QB8 are broadly similar: both have 16 pins and 8k of Flash, and similar peripherals, but there are both subtle and significant differences:
- the HCS08 CPU core has extra addressing mode encodings for LDHX and STHX that the HC08 lacks; these are very useful for Forth;
- the HCS08 CPU is pipelined and has a faster top clock speed;
- the HCS08 CPU will run at 1.8 to 3.6 volts; the HC08 runs at 2.7 to 5.5v; as I plan to run my gizmo from two 1.2v NiMH AA cells, I need to be able to run at 2.4v;
- the HCS08 CPU has a background debug mode (BDM) which requires only one pin and allows for fancy debugging, but requires specialized hardware (a $50 evaluation board) and software (Windows only!), while the HC08 has a built-in ROM bootloader which talks over the serial port, and will work with any host;
- the 908QB8 has “only” 256 bytes of RAM, compared with the 9S08GQ8’s 512 bytes.
I have five free samples of each part to play with.
The HC08/HCS08 is the latest “incarnation” of the 6800. Hmm, but eight bit microcontrollers are obsolete, aren’t they? Maybe, but they come in small packages, and these were free (samples).
I chose the HC08 partly out of nostalgia: the very first “computer” I ever laid hands on was a 6800 evaluation board (the kind with a hex keypad, 7-segment displays, and 128 bytes of RAM) that I helped to build. This was 1975 or ’76. I wrote a program that animated a single segment running around the outside of the display.
For this project I wanted to use Forth, for which these processors aren’t well suited. Unlike the 6809, which has four 16-bit index registers, the HC08 has only two, and one is in use as the hardware stack pointer. Using the other for the Forth stack makes it hard to access memory. I made it work, and it’s not terrible, but for this project I may work in assembler. The code isn’t going to be that large.
The AVR architecture is a really nice fit with Forth, however. I’m sure I’ll be trying it out on future projects.