AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver

What can I do to increase the clock?

I just couldn't resist this one.... ]:smiley: ]:smiley:

Try winding it up.

grabs popcorn

:stuck_out_tongue:

ematson5897:
grabs popcorn

:stuck_out_tongue:

]:smiley: ]:smiley: ]:smiley: ]:smiley:

popcorn.gif

YESSSS!! A real question. (at least from my point of view)
Binary, I can research a little bit tonight when I'm done with my classes if they end as planned. For me, I don't mean to hate, I just don't like babysitting another persons project. I've planned my life on that notion. I just can't stand it, its not how I roll.

But this is also a chance for me to learn something too.

I'll see if I can find something when I get a chance

post the code producing the trace.

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.

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....

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... :fearful:

Popcorn anyone? :grin:

Also some pics of your hardware might help.

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

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

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.

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.

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.

already used google translator but he doesn't understand it neither

:grin: :grin:

A schematic is useful if it shows YOUR hardware.

Photographs of your hardware are more useful. :wink:

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. :fearful:

So binarygod mate...you can forget the frequency of the I2C clock.... :stuck_out_tongue:

AHHHH

Ahhh.jpg

The driver I am referring to is your I2C driver. :wink:

Hope all becomes clear now... :grin:

why didn't you say that at the beginning!

I did..you didn't understand. :stuck_out_tongue:

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

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.... :grin: *

binarygod:
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:

Also...

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

Please answer.

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.

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)

from binarygodand thanks for the information about the VDD pin!!

Rectify these and then we'll see what happens.

  1. So which one should I use? 47k?

I REALLY can't believe you said that. :fearful: 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.

  1. 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. :fearful: 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

BTW my resistors are under 1K. :wink:

I'm no longer angry with you...I'm just astounded. XD

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...

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.