LCD I2C Strangeness (waveform included)
i'm trying interface i2c lcd (http://www.newhavendisplay.com/specs/nhd-c0216ciz-fsw-fbw-3v3.pdf) arduino. i'm pretty sure have wiring hooked correctly (including mosfet based level conversion) looking @ waveforms on scope.
here initialization code got library francisco (had modify few things lcd).
if @ waveform logic analyzer i'm getting valid ack lcd slave address byte. here's image: http://www.glacialwanderer.com/_blog/blog2012/april/i2c_debug.png
i have tried putting in wrong slave address , nak. so seems lcd sending ack back. basically looks me, after slave address byte , ack broken. in code above i'm writing lot more bytes , none of shows on waveform. also _status i'm printing out in code 2 (failure address nak). so reason seems arduino failing send bytes after intial address , don't know why. does have ideas on going wrong?
here initialization code got library francisco (had modify few things lcd).
code: [select]
wire.begin();
wire.begintransmission ( _i2caddress );
wire.write ( (byte)0x0 ); // send command display
wire.write ( func_set_tbl0 );
delay (10);
wire.write ( func_set_tbl1 );
delay (10);
wire.write ( 0x14 ); // set bias - 1/5
wire.write ( 0x78 ); // set contrast low byte
wire.write ( 0x5e ); // icon disp on, booster on, contrast high byte
wire.write ( 0x6d ); // follower circuit (internal), amp ratio (6)
wire.write ( 0x0c ); // display on
wire.write ( 0x01 ); // clear display
wire.write ( 0x06 ); // entry mode set - increment
delay(10);
_status = wire.endtransmission ();
serial.println(_status);
if @ waveform logic analyzer i'm getting valid ack lcd slave address byte. here's image: http://www.glacialwanderer.com/_blog/blog2012/april/i2c_debug.png
i have tried putting in wrong slave address , nak. so seems lcd sending ack back. basically looks me, after slave address byte , ack broken. in code above i'm writing lot more bytes , none of shows on waveform. also _status i'm printing out in code 2 (failure address nak). so reason seems arduino failing send bytes after intial address , don't know why. does have ideas on going wrong?
i'm trying interface i2c lcd (http://www.newhavendisplay.com/specs/nhd-c0216ciz-fsw-fbw-3v3.pdf) arduino.
i have found more information. looking @ 3.3 side of i2c bus looks fine. but, when @ 5v side of bus (master/arduino) don't ack , fails.
here level conversion circuit:

the things possibly matter mosfets. i'm using there: http://www.mouser.com/productdetail/fairchild-semiconductor/fqn1n50cta/?qs=sgaepimzzmsrr1kxjis%252bjwanxo1jtn8amqxukbegcxu%3d
does have idea what's going wrong , why when 3.3 side of i2c bus pulled low 5v side of bus not pulled low?
i have found more information. looking @ 3.3 side of i2c bus looks fine. but, when @ 5v side of bus (master/arduino) don't ack , fails.
here level conversion circuit:
the things possibly matter mosfets. i'm using there: http://www.mouser.com/productdetail/fairchild-semiconductor/fqn1n50cta/?qs=sgaepimzzmsrr1kxjis%252bjwanxo1jtn8amqxukbegcxu%3d
does have idea what's going wrong , why when 3.3 side of i2c bus pulled low 5v side of bus not pulled low?
Arduino Forum > Using Arduino > Networking, Protocols, and Devices (Moderator: fabioc84) > LCD I2C Strangeness (waveform included)
arduino
Comments
Post a Comment