Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - majorninth

Pages: [1]
1
I have 3 boards they all exhibit the same problem. The display is the only device on the I2C bus. It is interesting to note that the display seems perfectly happy if I ignore the NAK and if I try to keep reading (waiting for an ACK) it will never supply one. It appears that it thinks things are ok even tho I got a NAK. And all the characters NAKed display fine.

2
I'm bit banging (a port of the given example). From the capture it is running about 150K. I did try adding another CLK_LO at every CLK_LO and a CLK_HI at every CLK_HI to run at 50% of my nominal speed. No difference.

static void I2C_out(unsigned char j) //I2C Output
{
//   int t=0;
   int n;
   unsigned char d;
   d=j;
   for(n=0;n<8;n++){
      if((d&0x80)==0x80)
         SDA_HI;
      else
         SDA_LO;
      d=(d<<1);
      SCL_LO;
      SCL_HI;
      SCL_LO;
   }
      SCL_LO;
   SCL_HI;
        //ignore the ack info for now
   //while(SDA_READ==1)
   //{
      //SCL_LO;
      //SCL_HI;
      //if (++t>100)
         //break;
   //}
   SCL_LO;
}


3
see attached logic analyzer screen dump. The same thing happens for all 255 characters. A scope dump also shows the NAKs/ACKs.

4
I'm trying to understand why only the odd numbered ASCII characters are NAKed (even numbered are ACKed).
10K pull ups on clock and data. Custom board, I2C communications.
Characters are all displayed correctly if I remove the ACK/NAK check completely from the comm layer.

Pages: [1]