Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #60 on: January 05, 2013, 09:25:50 pm » |
Sorry guys, my eagle file got corrupted so my circuit boards I received today are just a shell of what they should be.
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
SF Bay Area
Offline
Edison Member
Karma: 6
Posts: 1215
Arduino Ninja
|
 |
« Reply #61 on: January 06, 2013, 12:32:30 am » |
I can and will be as patient as Hexadec has been, but only when I'm getting paid for it.
|
|
|
|
|
Logged
|
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #62 on: January 07, 2013, 07:30:28 am » |
I can and will be as patient as Hexadec has been, but only when I'm getting paid for it.
Yeah... I was tempted to post my hourly rate for this sort of thing.... 
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #63 on: January 07, 2013, 09:02:57 am » |
@binarygod 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); }
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #64 on: January 07, 2013, 09:30:24 am » |
HURRAYYYYYYYYYY! Well done mate.  Go on...tell me what the problem was...(I already think you're an idiot) 
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #65 on: January 07, 2013, 11:36:42 am » |
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... 
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #66 on: January 07, 2013, 11:39:07 am » |
Another point.
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.
|
|
|
|
« Last Edit: January 07, 2013, 11:42:24 am by Hexadec »
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #67 on: January 07, 2013, 11:52:57 am » |
I don't really understand what you mean... OK You have 3 AS1130s. The address of the first one is 0x60. What are the addresses of the second and third?
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #68 on: January 07, 2013, 02:27:44 pm » |
You can choose them with the multiplexers...yes...but what addresses will you use for the I2C writes? No problem...I just want to see if you know what the addresses will be when you set your jumpers. 
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #69 on: January 07, 2013, 03:09:51 pm » |
Incrementing the addresses won't work....  there are only three lines I don't understand...can I ask that question...?  ask away...
|
|
|
|
« Last Edit: January 07, 2013, 03:49:26 pm by Hexadec »
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #70 on: January 08, 2013, 04:43:44 am » |
why not? you did that in your code you sent me and why that doesn't work?! You called yourself binarygod....you tell me why it won't work.  in the function 'load_data' you wrote these three lines:
IC_SEND(i); IC_SEND(0); IC_SEND(0); That doesn't look like any code I have ever written...neither for the Arduino nor the PIC.
|
|
|
|
« Last Edit: January 08, 2013, 04:46:55 am by Hexadec »
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #71 on: January 08, 2013, 10:29:01 am » |
WTF  Where's he gone??
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
Wisconsin
Offline
God Member
Karma: 4
Posts: 994
I LOVE THIS STUFF!!!!
|
 |
« Reply #72 on: January 08, 2013, 01:07:45 pm » |
lol, I have no idea. maybe transistorgod got him.
|
|
|
|
|
Logged
|
Accelerate to 88 miles per hour.
|
|
|
|
Southport UK
Offline
Full Member
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
|
 |
« Reply #73 on: January 08, 2013, 01:13:50 pm » |
|
|
|
|
|
Logged
|
Sponge. I'm allowed to have it 'cos it's not sharp.
|
|
|
|
SF Bay Area
Offline
Edison Member
Karma: 6
Posts: 1215
Arduino Ninja
|
 |
« Reply #74 on: January 12, 2013, 05:44:13 pm » |
Probably accidentally got it working right, and dropped this thread like a hot potato.
|
|
|
|
|
Logged
|
|
|
|
|
|