Above and below you can see the terminal.
The LCD display is represented by the connector X1. It has a HD44780 compatible LCD controller and I'm using the 4-bit interface to send data to the LCD controller.
The LED's are multiplexed. I've seen the circuit somewhere in the web. It is possible to connect 12 LEDs with only 4 tristate ports with this circuit. You can address the LEDs setting 1 port high, 1 port low and 2 ports to high impedance. I've only used 8 LEDs because of space problemes in the aperture.
The blue points on the photo are four push buttons.
On the left side I've inserted an infrared remote receiver (TSOP1738) so that it is possible to telecontrol the computer.
Additionaly you can see the RS232 interface built with and max232 and the connector X3.
Connector X2 is used for incircuit prgramming.
The software is written in C. I've used the avr-gcc compiler and avrdude for programming.
If you press a pushbutton the terminal sends an "K", the number of the button and a newline character.
If you send something over to the IR-receiver, the terminal sends an "I", a hex code from the remote controller and a newline. The protocol of the ir-data is hard coded for a Grundig remote controller.
The LEDs can be turn on by sending ESC, "D" and the number of the LED. To turn it of use a lowercase "d" and the number of the LED. (example: echo -e "\033D2" > /dev/ttyS1 turns the second LED on)
Writing text to the LCD is much easier, just send it to the serial interface. (example echo "Hello World." > /dev/ttyS1)