Pages: 1 2 3 [4] 5 6 ... 8   Go Down
Author Topic: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver  (Read 10849 times)
0 Members and 1 Guest are viewing this topic.
Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A couple of points.

1) who commented out the delays in the I2C driver?
2) you need to ignore the SYNC line at this point. It makes no sense to read it until you have followed the setup procedure for the chip.
3) you are not understanding the datasheet correctly. The master only ever sends an ACK when it is READING. In this case it is writing.
4) I started to analyse your traces until I noticed someone had tampered with the driver. The clock seems to be doing the right thing but the SDA appears to be random (which is no wonder if someone has f*cked up the timing)

Anyway...I'm not inviting a barrage of unrelated questions but attached is a trace from a LA which shows EXACTLY what the trace should look like with NO ack from the slave.
and also the first write to a different address to show you what the ACK pulse timing should look like.

HTH.




* I2CTrace.png (18.61 KB, 4130x249 - viewed 23 times.)

* I2CTraceACK.png (4.24 KB, 708x254 - viewed 27 times.)
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So the main problem are the timings?

The main problem (at the moment) is that you had a perfectly good driver that works for everyone with your compiler...and you changed it so that it doesn't work any more.

You need to post what happens when you haven't tampered with the driver.

You also need to ignore the CLKSYNC register..it has nothing to do with this.

I suggest you compile this....

Code:
void main()                  
{
IIC_INIT();

while(1)
 {
   IIC_start();
   IIC_write(0x60);
   IIC_write(0xfd);
   IIC_write(0xc0);
   IIC_stop();
 }
}

...which will compile on your compiler and run it (forever) until you get an ACK back from the AS1130. If you don't it can only be 1 of 2 things.

1) You have the wrong address (Iwould suggest trying 0x30 which is the 7 bit addr)
2) Something is wrong with your hardware.

Every write should get an ack.

NEVER EVER think you can solve a problem by changing ANYTHING that comes with a compiler (unless you know EXACTLY what you are doing)
The delays in your driver are there for a reason... smiley-eek-blue





Popcorn anyone?  smiley-mr-green

« Last Edit: January 04, 2013, 11:19:04 am by Hexadec » Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also some pics of your hardware might help.

what size pullups have you on the clk and data lines?
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry you don't understand. I forget sometimes you are not a native English speaker

Quote
The main problem (at the moment) is that you had a perfectly good driver that works for everyone with your compiler...and you changed it so that it doesn't work any more.

The problem is: You changed the driver. Now it doesn't work.

Quote
You need to post what happens when you haven't tampered with the driver.

Undo what you changed in the driver and then post the results of running the code. 'Scope pictures or compiler errors.

Quote
NEVER EVER think you can solve a problem by changing ANYTHING that comes with a compiler (unless you know EXACTLY what you are doing)
The delays in your driver are there for a reason... smiley-eek-blue

Don't change driver source code. Professional drivers that come with compilers are 99% sure to work as they are.


Quote
already used google translator but he doesn't understand it neither
smiley-mr-green smiley-mr-green


A schematic is useful if it shows YOUR hardware.

Photographs of your hardware are more useful. smiley-wink
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Of interest to everybody.

I've just reduced the I2C clock to 10KHz and all four AS1130s in my setup perform EXACTLY the same as at 1MHz.

The ONLY difference is the amount of time it takes to upload data. Time between interrupt and restart on screen (data upload time) is 3.76 seconds as opposed to 217mS at 1 MHz.  smiley-eek-blue

So binarygod mate...you can forget the frequency of the I2C clock.... smiley-razz
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

AHHHH


* Ahhh.jpg (1.48 KB, 102x102 - viewed 93 times.)
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The driver I am referring to is your I2C driver.  smiley-wink

Hope all becomes clear now... smiley-mr-green
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
why didn't you say that at the beginning!
I did..you didn't understand.  smiley-razz

Quote
well in fact I changed nothing, I only commented those IIC_wait-functions.
So you DID change something...you destroyed the timing of the I2C bus

Quote
If I uncomment them the SCL will be again 30kHz
Yes but it will be working properly.

When you say drivers...do you mean the AS1130 chips?

You will know if the chips are dead if you do what I suggested above AND you don't get a response from the chips (ack).





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* note to self....I should have been a dentist...this is just like pulling teeth.... smiley-mr-green *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

can I please send those pictures to your email? I don't want to post things about my project until it's working...

OK mate but that won't help all the other people watching this thread.
Is your soldering crap?  smiley-grin

Also...


Quote
When you say drivers...do you mean the AS1130 chips?

Please answer.
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
when I say driver then it is ALWAYS the AS1300

Yeah well...when I say 'driver' it depends on the context. It could be a chip, it could be software.

Quote
the postman was at your message box

I've just spent 10 mins looking at your schematic and the first 3 things that come to mind are:

1) 100K pullups on SCL and SDA are far too high. Increasing the resistance tends to reduce the effective length of the bus and the bus speed
2) Even though we had a discussion about it which you took part in....you don't have pin 18 connected to VDD so the chips won't work.
3) Are you absolutely sure that the multiplexers are selecting the correct addresses for each of the chips. Don't just say yes...read with a meter the resistance connected to the ADDR pin AT THE PIN of each chip.
   You may have 2 resistors in parallel or have the wrong ones selected.
   You could also scan the whole address range in software to see if you get an ack.

proof of 2)
Quote
from binarygodand thanks for the information about the VDD pin!!

Rectify these and then we'll see what happens.
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
1) So which one should I use? 47k?

I REALLY can't believe you said that.  smiley-eek-blue Try reading this thread AND the other thread and look at my code comments.
It's no f*%cking wonder you can't get your project to work.

Quote
2) well we talked about it and you said that those vdd are connected internally but not pin18, but I thought because pin18 is also VDD I didn't have to connect it, well then I have to connect it too to VDD...

I REALLY can't believe you said that.  smiley-eek-blue Try reading this thread AND the other thread and look at my code comments.
It's no f*%cking wonder you can't get your project to work.



* popcorn.gif (57.6 KB, 120x150 - viewed 42 times.)
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW my resistors are under 1K.   smiley-wink
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm no longer angry with you...I'm just astounded.  smiley-lol
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may also want to put some 1nF decoupling capacitors across pins 1 and 3 for each AS1130 chip as close to the pins as possible, especially if you intend to run the I2C bus at 1MHz.

Personally I would also decouple the MAX4617 supply pins as well...
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 10uF caps only stabilise the power rails...the 1nF caps would stop any HF interferance caused by the switching in other circuits like the AS1130s and the SCL and SDA lines.

You might get away with it if you stay at low speeds on the I2C bus, but the AS1130s clock is 1MHz and if you want a decent refresh rate on your matrix then you need to leave it at 1MHz.
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Pages: 1 2 3 [4] 5 6 ... 8   Go Up
Jump to: