
Bookmaker
USA
Asked
— Edited
DJ,
I am out of Digital Ports and I want to use a LCD Display. Can I use a 12C port and if so do I need to purchase a special interface and how would I input the text since the only control available under 12C is blinkin and nothing that I can see in Script? I await your input.
Ill post something soon as I can think of anything else... hmm
Love V13. Does the read I2C help any to find out how to print with my LCD?
Try sending more data to 0x27 and see what you get. Try different things like
Code:
and other things like..
Code:
and try incrementing 0x01 by 1 .. try 0x02, 0x03, 0x04... etc
I will give that a try.
PS, i ordered one. So i'll be able to help you when i get it
sendI2C(0x27, "Hello World") Blanks the screen.
I get a lit screen with the curser flashing in position one when I send:
sendI2C(0x27, 0x20, 0x10) # put in 8 bit mode
sendI2C(0x27, 0x20, 0x08) # configure for 2 line display
sendI2C(0x27, 0x01) # clear display
After those commands, try sending something like
sendI2C(0x27, 0x80, "Hello World")
I downloaded the new version and firmware. Tried sending I2Cwrite(0x27,"test") and it blacked out the EZ-B. NEXT?
In order to "talk" to a slave from the master (Ez-b), a Ttart sequences is one of two special sequences defined by the i2c bus. The other sequences is the Stop sequence. So a master must send a Start or a Stop. The master in our case is the EZ-B. The EZ-B plays the roll of a master on the i2c network. Your LCD device would be the slave.
So in your case, you would now need to do this...
Code:
But that's not going to do much. I doubt it would even blank the screen. This is because the first bit (also called the least significant bit or LSB) is set to a 1. What? Ha, let me tell you...
So how I originally implemented the i2c was for simple devices like stepper motor controls, blinkm and one of the lcd's i have. Lately there have been people using different i2c devices that require special care. That means I had to dramatically change the i2c command structure. We have an ez-robot member, for example that is building a flying drone and needs to talk to a specific g sensor.
What's this about bits? It's an i2c thing... Here's how it works. So the address of i2c devices or functions are really 7 bit, and the 8th bit is used for the direction (kinda). So let's say your LCD address is 0x27. Well that's 00100111 in binary IF it was an 8 bit number. But because the address is 7 bit and we use the 8th bit to determine the communication direction (Read/Write), we need to shift the bits over by 1.
So you always need your first bit to be a 0 when writing. That means your address is actually 0x4E and not 0x27. Because you have to shift the bits over of 0x27. When you shift bits from left to the right, you multiple the number by 2.
0x27 = 0010 0111
0x4E = 0100 1110
See how the last bit is now a 0 with the 0x4E? That means "write to the device".
Read more here www.robot-electronics.co.uk/acatalog/I2C_Tutorial.html
Did you receive your LCD yet? If so any progress on getting something to print? Buster wants to know. Gosh, it has only been a week. It seemed like alot longer. Anyway, after our Etiquette lesson I am feeling realy stupid. Please disregard my impatients. I will just wait.
Did you ever figure out how to get the LCD to work? Mine is still blank.