Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
siprax345 said:Code:void i2c_write(unsigned char d) { unsigned char i; scl=0; for(i=1;i<=8;i++) { sda=(d>>7); scl=1; d=d<<1; scl=0; } sda=1; scl=0; scl=1; if(sda) { disp_string("ACK missing",line1); disp_val(d,l1col1); } scl=0; }
sda=(d>>7) ;
OK, we're crossing messages. So is there another register besides the incrementing clock that you can read to narrow the problem down to the I2C write transaction or the I2C read transaction. Maybe a status register or an internal RAM location? I will take a look at the data sheet since you may have a hardware problems. Would posting a schematic be out of the question?siprax345 said:sir,the problem we are when we start reading from the clcok register the value is not at all incrementing .
We are in dobut that whether the chip is getting the instructions or not coz we tried out 1Hz sqw wavw osc also but it didnt work, we tested the thing using LED at pin7.
We also wrote many debug strings to be displayed in the LCD , the program flow was correct but nothin was happening when we access the clock registers.
How to confirm whether the chip is getting our instructions or not ?
Plz help !