AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver

Well here it is at last.... :grin:

I've found it really difficult to film this with my iphone, but you get the idea I hope.

The LEDs are covered with a sheet of inkjet paper to try to difuse the light a bit.
The vids are full 8 bit PWM and are converted from animated gifs.

Second one is further away...hope it makes some sense. XD

They look better in real life...honest guv.... :stuck_out_tongue:

Oh nice!
Is are those each still just the 6 frames of PWM?

What I'm hoping to do is create some sort of dynamic animations. Created on the arduino due to certain set params and then uploaded to the AS1130 on the fly.

Yeah...pretty much the same code as before but for 4 chips and with the first chip as master sync, the other 3 as slaves...I didn't blank the changeover to the next six frames to show how fast it is.

So...frame data is just 6 frames all LEDs on...and 6 sets of PWM data for each animation. 8)

I've written a program which takes 6 frames of an animated gif and converts them to the data required for the 24x22 screen...I separate the frames in photoshop first then feed them to the C++ prog, then copy and paste to the MCU datafile.

I'm interested in what you want to do with this project as well...perhaps we can come up with something together....

We will, I just need to fiddle this winter break. I have so much to do though, so it might be here and there. I need to reinvent something and then make an entire website and program as well as work at the bakery.

No pressure...after all this is a hobby. :grin:

I've got a few things to do myself but will continue with this project. I'd like to find some RGB LEDs that I can solder in a tight, even matrix then run with AS1130s...this chip would be perfect for colour mixing and I have ideas for full motion video if I can bulid a suitable screen.

True,

If you get the itch to use SMD RGB 5050 LEDs, I found a vendor in china on eBay who sells them at really cheap (100 for $8). Those are pretty small so they can go into tight spaces

It'd be good if you could let me have the details...only problem is that I would have to have a board made for them and hand soldering 528 5050 LEDs does not fill me with joy... :grin: :grin:

Do you have a good manufacturer who would produce the board with the LEDs already soldered? Maybe we could look at that option...

I've been looking at getting copper glads and then making my own 5050 SMD RGB Led boards. They'd be small enough that I could use my own reflow oven (which i'm going to make once these infernal finals are over) and they'd do what I need. I'll post pics when I make em. Eventually i'll make boards with the 5050 footprint as well as 2 1206 footprints for a cool white LED and a B.L. Led.

http://www.ebay.com/itm/170786097936?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649

http://www.ebay.com/itm/300757213438?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649

I should be able to make about 60 of the boards from a single 9x12 copper clad. Just need the chems.

Binary, do you have an AS1130 mounted and going?

Merry Christmas all. :grin:

Just a quick update...I've now got the I2C bus running at 1Mhz and it's very stable. I spent a couple of hours today with the 'scope on the SCL pin and by experiment with the resistor values I've now got a very fast rise time on the clock pulses and it's almost a clean square wave. The bus capacitance on these chips is quite high individually and this was causing the problem. I originally used 4K7 resistors and they worked fine @100Khz and not bad at 400Khz...then while playing with changing almost a 1KB of data after a frame interrupt I found that there was a definite visible lag on changeover... :0 I then upped the bus speed in increments of 100KHz until the reliability dropped dramatically.

Anyway...the time between the interrupt firing at the end frame and the start of the new frame PWM set is now very slightly over 217mS which I'm more than happy with. I've ordered some free sample 128KB, 1 MHz I2C EEPROMs from my lovely Microchip ( :grin: ) today so we'll see how fast it runs when pulling data from the external EEPROM...the sky should then be the limit for long animations with full 8 bit PWM... :wink:

@Binary

If you do a software reset and set the shdn-bit to 0, are all controll registers resetted then (set to default
values) ? because thats not written in the datasheet.

We have a saying in English Pantomime....

"OH Yes it is...." :stuck_out_tongue:

To save you looking (as it's your Christmas present).

If you reset 'shdn' the internal state machine stops and all outputs are turned off.
If you set 'shdn' the internal state machine starts and all outputs are turned on.

So you DON'T lose the register values.

If you reset the 'init bit' then the state machine resets and you DO lose the register values.

**[u]Just like it says in the datasheet.[/u]**

Happy New year mate. :grin:

Oops...forgot to mention...

The CS register is limiting at 15mA and the whole 528 LEDs, four AS1130 chips, 1 512Kb EEPROM and an 18F2550 running at 48 MHz are all powered by the USB.... 8)

Here's the usual crappy video...with and without 1 sheet of inkjet paper masking the LEDs.

You can at least see how fast the changeover takes place. :grin:

I can only assume that there are only the registers that work directly with the LEDs in the FSM.
It also says in the datasheet that to reset ALL the control registers you have to pull RSTN to logic low.

A few points...
I've changed a lot of my code.
I only know what I've learned by experimentation with the chips.
The code is not optimised.

So far it all works great.

Your logic is a bit flawed...

How do you come to the conclusion that :

That means if the Current Source Register is once set, it can only be reset by making a reset by pulling RSTN to low? And it can't be reset by the 'init bit'?

especially as I've posted numerous examples of changing the CS reg value while the chips are running... :fearful:

I would strip down the code to it's simplest form and get 1 picture showing on your matrix to test the hardware etc. before going any further.

Tip:

You can use the AS1130_status_all() function to read out the control registers at any point. :wink:

of course I already have a code for one matrix,

That's not what you said in your previous statements. :roll_eyes:

mounted yeah, going no. the code isn't working.

I also don't understand what it is you are asking if my answer above is not what you want.

If you do a hard reset then the MCU sends the setup data to the AS1130 from the start...including the CS reg.
If you only do a soft reset with the shdn then the CS reg doesn't change as far as I know from experimentation.

The trouble is (in my experience)...you make statements that are wrong...argue about the answer and then go on to another subject and repeat the cycle.

Either your code works or it doesn't...that is still unclear.
Does your hardware work?
What is it that doesn't work?

Post your hardware setup.
Post your code to run it.
Indicate what isn't working.

Then we might get somewhere... :wink:

Your original question:

If you do a software reset and set the shdn-bit to 0, are all controll registers resetted then (set to default
values) ? because thats not written in the datasheet.

What you say now:

And i'm not talking anymore about the shdn-bit but about the init-bit.

You've already said that your code isn't working so...

And I have a second code for two matrix, where I just wanna understand the logic

...makes no sense. 2 chips running is virtually the same as 1 chip running...they both get the same code.
Also, if you can't get 1 chip to work, what makes you think that understanding 2 chips working will make it better?

the CS is 0x00, so the leds won't light!

This statement is true...you have to set it between 1 and 255 to make the LEDs light up.

Both codes are yours which you posted here.

My code runs perfectly on my hardware as shown by various videos I've posted.
If you have EXACTLY the same hardware and use my code it will work perfectly.

If you don't...then it's no wonder it won't work.
If you modified the code to work on your hardware, then it is YOUR code that doen't work.

My hardware is working for sure, I measured each pass.

What did you measure and what do you mean by a 'pass'?

No wonder I am confused...

OK..got your code...

I've got to go out for a couple of hours but will have a look when I get back.

when I uncomment the for-loops the programm crashes!

Most of the program is for loops...which crashes...?

What does the compiler say?

Be back soon... :grin:

the compiler crashes!

If the compiler crashes...I'd get a new one.... :grin: :grin:

Do you mean that your programme won't compile?

If so...what does the compiler say? Post the output.

..and you say it compiles if you comment out certain parts...

which parts?