What makes no sense is you rewriting the I2C driver. You need to either redownload the original or be absolutely certain that every change you have made is back to it's original state.
Everything written in the datasheet is EXACTLY following the I2C protocol. Your driver DOES NOT need to be changed.
Until you rectify this then we can't continue.
To help later:
Rewrite this code to run on your compiler.
// This function writes the slave address to the i2c bus.
// If a slave chip is at that address, it should respond to
// this with an "ACK". This function returns TRUE if an
// ACK was found. Otherwise it returns FALSE.
int8 get_ack_status(int8 address)
{
int8 status;
i2c_start();
status = i2c_write(address); // Status = 0 if got an ACK
i2c_stop();
if(status == 0)
return(TRUE);
else
return(FALSE);
}
//=================================
void main()
{
int8 i;
int8 status;
int8 count = 0;
printf("\n\rStart:\n\r");
delay_ms(1000);
// Try all slave addresses from 0x10 to 0xEF.
// See if we get a response from any slaves
// that may be on the i2c bus.
for(i=0x10; i < 0xF0; i+=2)
{
status = get_ack_status(i);
if(status == TRUE)
{
printf("ACK addr: %X\n\r", i);
count++;
delay_ms(2000);
}
}
if(count == 0)
printf("\n\rNothing Found");
else
printf("\n\rNumber of i2c chips found: %u", count);
while(1);
}
The trouble is...I tend to have a logical approach to fault finding...you just seem to keep changing things until something happens.... ...so no I haven't had that problem.
Before changing anything I think about what I expect to happen and what effect the change will have on the rest of the system.
I would get one matrix under your control (say the chip at 0x60) and then move on to the next.
One thing that occurred to me is....(listen carefully) you DO realise what the addresses of the next two chips will be?
I was going to tell you but I thought I'd let you work it out and tell me what your answer is...
If I remember rightly, when you reset the AS1130s the EEPROM data is not cleared so if the chip starts up it will light up the LEDs with the data it already has in it's memory.
Also:
While you have access to the 'scope...take some screenshots of the I2C working properly so that you can see where the ack fires and what the known data looks like.
dropped it like its hot, dropped it like its hot.
On a better note, I am feverishly working on getting one mounted.
I've never done such a tight pitch IC, last time one of the legs bent while soldering and I was so pissed.
You'll see some soon! I have a very pressing project that is due in exactly........................68 days! An entire website! So I just literally stayed up all night, in fact I think I see a little sunlight brightening up the night sky out there.
Yea, last party was new years! That was a crazy night.
Its for a worldwide competition.
I can probably find some time tomorrow after a speech. I need to construct the circuit yet, I just have the AS1130 mounted.
I am very slowly designing a 4-layer board with some AS1130's. The biggest pain has been finding out that my usual cheap PCBAs don't want to do 0.5mm BGA/WLCSP.