For a Open Source Laser driver project, I designed a LCD Display + Keyboard solution via I2C. It was tested with the Arduino Duemillanove and then moved to a simplified home-made PCB. The panel uses an ATMEGA168 as it's brain.
It's a simple example of combining the Wire, LiquidCrystal and Keypad library.
Since a simple keyboard/display combination is a basic need for many hardware projects, I thought I'd post it here. Share and enjoy!
Nice work! I am working on something similar except it runs on serial. I thought about I2C or SPI interface a friend suggested me but ended up with just serial so the atmega328 onboard can act as masters and access EEPROM, RTC, or SD cards. Did you implement carriage return and line wrap etc?
liudr:
Nice work! I am working on something similar except it runs on serial. I thought about I2C or SPI interface a friend suggested me but ended up with just serial so the atmega328 onboard can act as masters and access EEPROM, RTC, or SD cards. Did you implement carriage return and line wrap etc?
We implemented serial (TTL) on the board as well, so you could use a serial port instead of I2C, too. There's a very limited implementation of carriage return and line wrap in the code, because we're using it for a menu (so we know what will be send to it anyway). As a bonus, sending some ASCII chars will turn on/off two leds
liudr:
So basically the panel runs a menu interface and tells arduino that which item is selected, is that right?
It's even worse: the menu interface is running on the master and the slave arduino (which connects to the display and keyboard) only accepts print commands and buffers keys. The only smart thing it does is making a key repeat when you keep it pressed.
I suppose you can later upgrade your firmware on the panel to handle interaction and reduce the workload the master arduino needs to do. So the master can send the entire menu and wait for response in term of which menu item is selected. That is what my panel will do. Except it can't talk I2C.
Right. Then the master can say, render menu number 2 and the panel loads the menu from its own storage and renders it, handles keys and gets back to the master only after the user has made a choice. My panel PCB is being made. I am working on the software. I will post my result once I get it to work.