Bascom and AVR, Morse code sender with OLED and Avago (formerly Agilent) HDSP-R881 display

Generating morse code has been explained in the sound chapter. Here, an extra 'gimmick' is added by using an Avago HDSP-R881 8x8x3 led display. This display is used in the program to display a single character as it is sent to both the LCD and the loudspeaker. Make sure you read the complete datasheet before using a HDSP-R881 display. I used only the blue and green leds from this display. The blue and green led cathode columns are switched by TI PCF8574AN eight-bit I2C I/O extenders. Note that the TI PCF8574A I2C addresses differ from the Philips PCF8574!
The anode led rows are switched directly by the ATMega8. The switching is done in a timed interrupt. The morse code is produced with the the Bascom 'sound' command. As it is often interrupted, it sounds rather 'raspy'.
I used an OLED 16x2 display for the first time. It is really great! Much better contrast than backlit LCD's.
See the morse code sender in action . (poor quality, 0.5MB AVI, highly compressed, I apologise for the creaking chair...)
Have a look at the program and have fun!