To get one more additional output pin, you could use the serial output pin (the one that gets driven by sertxd). You'd have to access it through poke commands to set it high and low. I remember there was a thread about that topic (which register addresses to peek/poke) but can't find it right now. Maybe hippy or somebody else knows?
The other good options (that can provide many more pins) are:
- use a 74HCxx series serial shift register (very cheap, around $0.25); typically 8 parallel outputs, driven by 2 lines for the Picaxe (clock and data), can be cascaded for even more outputs. On the X1 parts you can use hardware SPI for very fast update rates. On types that have parallel load you can use then as additional inputs as well. Disadvantage: you need to supply all the data for all outputs every time you want to change a single output, and unless the parallel outputs are latched, they will randomly change states during the load process (often ok for display drivers, but not for logic that may get clocked by those changes).
- port expander, e.g. Maxim MAX7300 or MAX6956: driven through I2C or SPI bus. Can access outputs individually. Usually pins can also be set as inputs, so very flexible. Typically 16 - 20 I/O's per expander (28 pin DIP package). Microchip has suitable expanders as well. You can get the MAX6956 as free sample fromk Maxim.
- slave Picaxe: communicate through serial (serin/serout) - simple - or SPI (more involved and only on X1 parts which can be I2C slaves). Advantage - potential for multitasking (second Picaxe can do other things, especially X1 series that can do background serial receive and background I2C). Disadvantage - more complex, and a X1 Picaxe is much more expensive than an I/O expander or shift register.
Wolfgang