
pacomms
So i have bought an I2C display and controller for my robot, the ebay link is http://www.ebay.co.uk/itm/310246198837?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 , i can get the display to power up but cant get any characters to display on it, the default address is 0x42 so i am sending the following via a script
I2CStart()
I2CWrites(0x42, "Test")
I2CStop()
nothing happens, there is a link to a datasheet on the ebay page but i am a total noob with I2C, i get the idea but not sure what im doing wrong, the only thing i noticed is that on the ezb board the I2c interface is listed as SDA and SCL but on my display and controller that comes with it its listed as SCK and SDA ? have i gone and bought the wrong thing ?
Thanks
Kurt
Upgrade to ARC Pro
Get access to the latest features and updates with ARC Early Access edition. You'll have everything that's needed to unleash your robot's potential!
Thanks
Kurt
Thanks
Kurt
You can use the windows calculator. Put it in Programmer mode (because you are treading into i2c world, its programming)
1) load windows calculator
2) put in Programmer mode
3) select HEX mode
4) enter 42
5) select BIN mode
6) Notice 42 in HEX is 1000010 in binary. Notice it is only 7 bits long.
7) Let's shift the bits over by one. You can do that by either multiplying 42 x 2. Or simply type in BIN mode this: 10000100 (see, i put an additional 0 at the end LSB)
8) Now switch back to HEX mode once you have 10000100 entered in BIN mode
9) 10000100 is 0x84 in HEX . So you would write to 0x84 on your i2c.
10) But for reading, you would set the LSB to a 1 rather than a 0 like we just did. So 10000100 is WRITE and 10000101 is READ.
Write = 10000100 = 0x84
Read = 10000101 = 0x85
where 1 is on ans 0 is off, the command listed for the cmd bit in the datasheet is 0x91 to write to eprom , so in the ezb i tried
I2CStart()
I2CWrite(0x84, 0x91, 0) to turn off the display (its on when power up)
or
I2cStart()
I2CWrite(0x84, 0x91, 1) to turn it on
Nothing happens it doesnt even blink, kinda stuck with this now.... tried it many ways the dsiaply does work and my connection to the I2C bus seems ok when i press start on the script box the led on the ezb flashes for a millisecond but the display does nada. any ideas guys ?
Thanks
Kurt
Kurt,
no 0x42 is the 8 bit address, what you need is the text command for the display, something like
start I2C (which is start condition followed by 0x42)
send 0x20
write "hello" (which I assume sends 0x68 0x65 0x6c 0x6c 0x6f)
stop I2C
See http://doc.byvac.com/index.php5?title=Product_BV4512
"Getting Started" which shows the commands required.
Jim
so by my assumption my ez b script should read...
I2CStart()
I2CWrite(0x42, 0x20, "hello")
I2CStop()
again this does nothing at all, his datasheet at the link above is like chinese to me lol i know i keep on about this but its the only I2C device i wanna use on the bot and the screen looks really really cool in the from of omnibot, for that and also debugging my program.. Any ideas
Kurt
Thanks
Kurt
You can try shortening the wire length to ~1 inch. That will probably prevent you from needing an additional pull-up.