using LCD without TX?

hi all,

i'm bulding a midi hardware where i'd like to have an LCD on it.
However, I'm using digital pin 1 (TX) for the midi output.

I assume I can't use serial.print() and lcd.print() at the same time, so I's wondering if there is any other solution.

thanks,
warp

You'd only have a problem if your using a serial LCD.
You can just use digital IO ports to talk to a normal LCD.

i see,

i've got a Hitachi LM016L which i assume is serial as it is based on a HD44780.

I'm kind new to this stuff so any help around the differences between serial and normal LCDs would be much appreciated.
Also, if there's any documents with examples out there...
i think all the examples with Arduino based on serial LCDs (?)

thanks,
warp

A serial LCD will have a separate processor (Atmel, PIC, SX, etc.) on it that will convert the serial stream -- sent with just one pin -- to the proper signals for the LCD. If your LCD has a row of 14 pins (or 2x7) then it's probably just an LCD module and you will need a minimum of six I/O pins to write to it. I'm new to the Arduino so I don't have code (I done dozens of projects with the BASIC Stamp and SX), but I'm betting someone has, or may have developed a library.

you will need a minimum of six I/O pins to write to it.

Personally I only use three wires. ;D

[edit]Personally I only use three wires. [/edit]

don't cheat ;D

can i find any examples?

can i find any examples?

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1193829468/10

The working source is in the first post. You just get a standard 595 and wire up the LCD to it. :slight_smile:

allright, i found the post. However, I assume you need to use the TX port as well.

Are there any examples of using an LCD without the TX (as I'm using TX for MIDI out)?

By the way what's the advantages of using serial LCD rather than 'normal' LCDs?

thanks

allright, i found the post. However, I assume you need to use the TX port as well.

Incorrect assumption. You can use any digital IO ports.

By the way what's the advantages of using serial LCD rather than 'normal' LCDs?

Mainly just simplicity. Connect one wire plus power and then use the standard serial libraries.
As opposed to using 6 wires (or 3 with a chip) and having a lot of code to communicate with it.

you will need a minimum of six I/O pins to write to it.

Personally I only use three wires. ;D

I should have been more clear: You'll need a minium of six I/O points if you're going to connect the LCD directly to the Arduino; if you put something in between, you can get away with fewer.

Hi, look up softwareSerial, a library which comes with the Arduino. This is a wrapper enabling you to use any of the digital i/o ports as a serial port, in a very similar way to the standard serial... functions. Beware though, it only works well for output (because it's all in software, you'll 'miss' input if the Arduino's doing something else at the time).

Luckily, a serial LCD only needs output! I've done something very similar, where I'm using the UART for two-way serial comms, and softwareSerial for writing to the LCD. I can post some example code later when I'm home if that will help.

One other thing worth mentioning is that writing data using softwareSerial is much slower than using the ATMega's UART - your program will effectively block for the whole duration of the serial write rather than just dumping a byte to a register. Depending on your application, this may or may not be a problem. I had a head-scratching moment when a very simple program of mine was running far slower than I expected... turned out it was because I was writing 40 characters per loop @ 9600 baud to an LCD over softwareSerial...

Good luck - be interested in how your MIDI project goes, I'm also a MIDI musician and hope to build some gadgets with my Arduino - one being a bluetooth conductor's iBaton for real-time recording of tempo changes into Cubase... when I finally get time!