Jump to content
43oh

yspede

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. yspede

    i2c read ?

    cool you help me a lot thanks. it work now, im able to read the last byte i wrote to the lcd working read code i2c_start(); i2c_write8(0x20 << 1); i2c_write8(0x00); i2c_stop(); i2c_start(); i2c_write8(0x20 << 1 | 1); readreg = i2c_read8(0x0); i2c_stop();
  2. yspede

    i2c read ?

    Hello. im trying to read from the i2c port on my g2231, i have found a i2c libary from this website link but as I see the libary dont support repeated start. I have tried to add this, with some code I found on this forum. im trying to read from a expander ic MCP23016. but the only thing I read is 0xFF ?. im able to write to the expander ic with no problem. its the first time i work with i2c. thanks for looking I have added the full code to. void main(void) { WDTCTL = WDTPW + WDTHOLD; __delay_cycles(500000); i2c_init(); // startup i2c exint(); // init the expander ic lcd
×
×
  • Create New...