I wouldn't use the same pin number for both Tx and Rx.
Are you sure that the compiler is doing the logical operations the way that you expect it to?
I would start out by sending the specific numbers that the Sparkfun controller is expecting.
Don't bet on it. Read the datasheet - including the notes.
How about this one:http://www.arduino.cc/playground/Code/SLCD
QuoteAre you sure that the compiler is doing the logical operations the way that you expect it to?Why, is the arduino compiler known for such bugs? I didn't check the generated assembly (is there an easy way to do that with the Arduino tools?) if you mean that. I'm fairly certain the code is correct though.
QuoteDon't bet on it. Read the datasheet - including the notes.That quote is from the datasheet actually. I don't see any other information about initialization. (But I'm not sure what I would be looking for.)
Don,Hmm, this doesn't belong here really, but is that playground full of not well tested and possibly bad instructions? Anybody can send their creations there and look like it's made by someone who looks like he/she knows what they are saying? That's not good...Cheers,Kari
Do you think I should use SoftwareSerial(2, 2)? Or some other unused input pin?
Follow the LCD initialization link at http://web.alfredstate.edu/weimandn for a complete explanation.
delay(110); // Step 1: > 100ms lcd_do(0x30); // Step 2: Function Set delay(5); // > 4.1ms lcd_do(0x30); // Step 3: Function Set delay(1); // > 100us lcd_do(0x30); // Step 4: Function Set delay(1); // > 100us lcd_do(0x38); // Step 5: Function Set D=1 N=1 F=0 delay(1); // > 53us lcd_do(0x08); // Step 6: Display off delay(1); // > 53us lcd_do(0x01); // Step 7: clear delay(5); // > 3ms lcd_do(0x38); // Step 8: Entry Mode set: I/D=1, S=0 delay(1); // > 53us // step 9 = nothing lcd_do(0x0C); // Step 10: Display on D=1, C=0, B=0 delay(1); // > 53us
People normally use SoftwareSerial(255, 2) or some other large value that will never be used by an output pin.
change to the newsoftserial library rather than the software serial one.
have you tried resetting the serial LCD (as far as I can remember - there is a command for this or is it just to reset to 9600 baud?)
I presume it is a Sparkfun one - did I miss this somewhere?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16