title: How to write a 16bit data to I2c protocol
body: <p>I am making a program in which I am interfacing INA226 with atmega8 using I2C. I need to write its register with value <code>4127h</code> . Following is the code I have done. when I am reading the register, I am  getting <code>41 FF</code>. That means I am able to write 41 but not 27. How can I do this.?</p>
  
  <p>Also when I try to change the value like from <code>4127h</code> to <code>3637h</code> (just to check), it doesnt get change and display the older value <code>41 Ff</code>.
  Please help, thanks.</p>
  
  <p>CODE</p>
  
  <pre><code>i2c_init();
  i2c_start();
  i2c_write(0b10000000);  //slave address
  i2c_write(0x00);        //register address
  i2c_write(0x41);        // data
  i2c_write(0x27);        // data
  i2c_stop();
  
  i2c_start();
  i2c_write(0b10000001);
  temp1 = i2c_read(1);
  temp2 = i2c_read(0);
  i2c_stop();
  </code></pre>