I've been using a LCD display and the number of pins it is taking is kind of worrying as my project keeps expanding. Is there a simpler way to drive LCD's? can i use any external ic's? is there a way to do it using shift registers?
You can (if your LCD support it) use 4bit. That will leave you using 4 + 3 ? And this is less than 8 so you could implement using a 595 shift register http://arduino.cc/en/Tutorial/ShiftOut using 3 outs.
[if sum is greater than 8, just add a 595]
It will cost some programspace, to implement the logic, but it can be done I think.
Another option is to get a display that is controlled over a serial connection. They can usually be driven with the softserial lib. this takes up a minimum of pins, and keeps the "ordinary" serial port for other purposes.
There's code and schematics for a 3 line interface for HD44780 LCD's on the playground.
Checking the code.... Looks good... let me try it out and let you know how it goes...
http://phanderson.com/lcd106/lcd107.html
this is probably the most complete serial interface for lcds I've seen. It is sooo easy to use.
If you want a PCB version modern device (creator of BBB and RBBB) has one based on the chip: Displays – Modern Device
Check it out, its fairly cheap as well (programmed pic costs about 4 bux plus shipping, if you have the rest of the components). Only downside is the code is not open source so you can't modify the pic
http://www.byvac.com/ has a similar microcontroller that use I2C. Might be easier than using a serial device when developing. I haven't tried it but ordered a couple of these yesterday.
I've never worked with I2C even though I've seen many devices for it. What are its advantages to arduino' serial? From what it uses on less wire and is slightly more expensive.
I2C allows upto 112 devices on the same bus, and since it doesn't use the serial interface it doesn't interfere with serial communication between the PC and Arduino.
Also, this specific chip costs around £4, LCD's are a couple of punds each on eBay. I don't know what the serial displays costs, but I doubt they're that much cheaper.
perhaps i can use a dedicated Atmega8 to control LCD and send data over the serial interface from the arduino.. Is this a bad idea?
If i'm right, i would need a crystal and power supply to run this Atmega8... Right? has someone tried this?
yeah, thats basicly what skumlerud and I are suggesting.
At the phanderson website you can get a kit for $7 for communication over serial. It just uses a pic instead of an atmega.
I havent seen any pre made LCD controllers with Atmega8 and serial interface. That being said it is completely possible and could be a cool project to build. A basic version wouldn even require too much programming. Just buffer all the character you receive through serial and once you receive a termination character (CR) output like you normally would to the LCD
i just figured out that i can make a complete display driven by atmega8 for under $4 i'm surely hooked on to this project now!
yeah its pretty cool eh! are you going to do it using the c compiler or are you going to upload the arduino bootloader?