Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: funkyguy4000 on Dec 06, 2012, 03:18 am

Title: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 06, 2012, 03:18 am
Hello!

This thread is for the AS1130 LED driver from austria microsystems.  There has been an on-going discussion thread here:http://arduino.cc/forum/index.php/topic,122138.0.html (http://arduino.cc/forum/index.php/topic,122138.0.html)

This thread will highlight the best parts of that thread as well as serve as an ongoing discussion thread for the specific driver.

:* :* Thanks to Hexadec for the original efforts.  :* :*
Hexadec -> http://arduino.cc/forum/index.php?action=profile;u=142996 (http://arduino.cc/forum/index.php?action=profile;u=142996)

Original code: AS1130_Frames_demo.rar attachment 
^Corresponding Video^ https://www.youtube.com/watch?feature=player_embedded&v=qQ3lE_iK7_s (https://www.youtube.com/watch?feature=player_embedded&v=qQ3lE_iK7_s)

Commented code: AS1130_Frames_demo_diamonds.rar attachment

Picture mode and PWM sets: AS1130_Frames_demo_Xmas_Tree.rar attachment
^Corresponding Video^ https://www.youtube.com/watch?feature=player_embedded&v=yx3FU0CgyPw (https://www.youtube.com/watch?feature=player_embedded&v=yx3FU0CgyPw)

Some other video: https://www.youtube.com/watch?feature=player_embedded&v=8BXjyxig61k (https://www.youtube.com/watch?feature=player_embedded&v=8BXjyxig61k)

PWM Demo: AS1130_Frames_demo_PWM_29102012.rar attachment
^Corresponding Video^ http://www.youtube.com/watch?v=2LYZrHvw264&feature=youtu.be (http://www.youtube.com/watch?v=2LYZrHvw264&feature=youtu.be)

Things to note:
-This is not an IC for beginners, you must know I2C and you must know how to set up an IC without a library, as there is no supported library for it at this point.
-Please refrain from asking questions regarding I2C here, do it elsewhere.
-Please read the datasheet thoroughly.  Many questions are answered there.
-Please listen to the advice, if somebody tells you to read the datasheet again, read the datasheet again! We aren't here to babysit you, we are here to help you answer questions related to the AS1130 and using the arduino to run it.  If you don't follow this one, don't be surprised if somebody gives up on you.

**If anybody would like to create a library, please contact either me or Hexadec**



Questions:

Quote
Quote
what did you do with the SYNC and IRQ pins?  Did you pull them to logic low?
IRQ should be pulled high but the sync is left floating.  If you check out the datasheet (page 28 Table 25) it shows that you have to physically set the sync_out or sync_in bits to get any response on pin 12.

In other words it's not a problem pulling it to VSS


Quote
Quote
Do you just pull in frame data or how to you do the memory management?  Do you pull in the first frame, pull in the second, delete the first and pull in the third and so on
Here's an example of dynamic data change using the internal EEPROM of a PIC18F4550 (256 bytes).
This gives a negative image of each frame.
I've included the reset routine as well. This is easily ported to Arduino code.
Code: [Select]
/***** Flip every bit in eeprom then write to AS1130 **************************/
void flipData(void)
{
printf(usb_cdc_putc, "Flipping Data:\r\n");
char i,j;
char data = 0;
char mask = 0b00000111;
char flipped;
for (i = 0; i <= 253; i+=2)    //size of eeprom
  {
      flipped = mask ^ read_eeprom(i);   
      write_eeprom(i, flipped);
    }
i = 254;
flipped = mask ^ read_eeprom(i);   
      write_eeprom(i, flipped);

mask = 0b11111111;
for (i=1; i <=253; i+=2)    //size of eeprom
  {
      flipped = mask ^ read_eeprom(i);   
      write_eeprom(i, flipped);
    }
printf(usb_cdc_putc, "Data Flipped:\r\n");           
  write_frame_data();
AS1130_reset();
}
/***** AS1130 Copy Frame Data from EEPROM *************************************/
void write_frame_data(void)
{
  char i, j, k;
  char data = 0;
for (i=FRAME0; i<=FRAME10; i++)   
  {
    for (j=0x00; j<=0x0B; j++)  // 0x00 to 0x0b are the Current Segments in each frame (CS0-CS11)
    {
      as_config(i, 2*j+1, read_eeprom(data));    // i = frame address, 2*j+1 = CS register address (odd numbers) then second data byte
      data++;
      as_config(i, 2*j,   read_eeprom(data));    // i = frame address, 2*j = CS register address (even numbers) then first data byte
      data++;     
    }
  }
}
/***** Restart AS1130 with changed settings ***********************************/
void AS1130_reset(void)
{
bit_clear(SHUTDOWNOPENSHORT_BYTE, 0);
bit_clear(SHUTDOWNOPENSHORT_BYTE, 1);
as_config(CONTROLREGISTER, SHUTDOWNOPENSHORT, SHUTDOWNOPENSHORT_BYTE);

        as_config(CONTROLREGISTER, MOVIEMODE, MOVIEMODE_BYTE);
  as_config(CONTROLREGISTER, DISPLAYOPTION, DISPLAYOPTION_BYTE);
as_config(CONTROLREGISTER, FRAMETIME, FRAMETIME_BYTE);
as_config(CONTROLREGISTER, PICTURE, PICTURE_BYTE);
  as_config(CONTROLREGISTER, MOVIE, MOVIE_BYTE);

bit_set(SHUTDOWNOPENSHORT_BYTE, 0);
bit_set(SHUTDOWNOPENSHORT_BYTE, 1);
as_config(CONTROLREGISTER, SHUTDOWNOPENSHORT, SHUTDOWNOPENSHORT_BYTE); 
}
OK...here's the video. (Sorry about the crap quality  )


http://www.youtube.com/watch?v=msn3LvtdRaM&feature=youtu.be (http://www.youtube.com/watch?v=msn3LvtdRaM&feature=youtu.be)



Quote
Quote
You look to have four resistors on your AS1130 board.  What are those for?
The resistors are:-
1 SDA pull-up
2 SCL pull-up
3 RSTN pull-up
4 IRQ pull-up


Quote
Quote
That means: I connect every single VDD Pin with 10uF capacitance so that I need 5 x 10uF capacitances for the 5 VDD Pins or do I only need ONE 10uF capacitance and connect that one to ALL the VDD Pins together?
Nooooooo......all the VDD pins are connected internally...you just need ONE 10uF cap for each seperate AS1130.



Quote
Could you comment your code a bit with reasons behind the code bits?
I don't quite get why you have frame addresses when you have them defined in a Frames array.
Quote
There's a few more comments in the code posted in this post: http://arduino.cc/forum/index.php/topic,123071.0.html (http://arduino.cc/forum/index.php/topic,123071.0.html)  Anyway,
Code: [Select]
//12x11 rectangle                                   <---this tells you what the code displays
  0b00000111, 0b11111111,    //CS0  Frame 0            <---these are the 2 data bytes for Current Segment 0 and this is the start of the first frame's data
  0b00000100, 0b00000001,    //CS1
  0b00000100, 0b00000001,    //CS2                     The 1's mean an LED is on the 0's off
  0b00000100, 0b00000001,    //CS3                     The data is arranged so that it is graphically meaningful ie. if you look at the frame datas' 1's you can actually see a 12x11 rectangle (on its side)
  0b00000100, 0b00000001,    //CS4
  0b00000100, 0b00000001,    //CS5                     The data is in binary format and follows the convention that the rightmost bit of the 2 bytes is LED 0 and bit 2 of the first byte is the LED 0A
  0b00000100, 0b00000001,    //CS6                     (see  datasheet  Table 9 page 15)
  0b00000100, 0b00000001,    //CS7
  0b00000100, 0b00000001,    //CS8                     The 3 MSB of the first byte tell the AS1130 which PWM set to use (0-7)
  0b00000100, 0b00000001,    //CS9
  0b00000100, 0b00000001,    //CS10
  0b00000111, 0b11111111,    //CS11                   <---these are the 2 data bytes for Current Segment 11 and this is the end of the first frame's data
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 06, 2012, 11:30 am
Thanks for doing this funkyguy old chap.

It's nice to clear out the cobwebs and have a fresh start.  :smiley-mr-green:

I am working on a library for the AS1130 which I will post at sometime but I've become a little distracted with writing code to convert video files to matrix LED data to use on my 24 x 22 screen.

I have soldered all the LEDs and connected them...I just need to connect up the other 2 AS1130s and hopefully we'll have a working 4 chip system to analyse.

I have ported my PIC code to the Arduino but have had to change the way the data is written to the chip. It's now faster but there are still issues with the Wire library that I don't encounter by bit banging on the PIC and which I still don't understand (but I'm getting there).

I've spent quite a long time looking at the data stream with a logic analyser...so I know what the problems are...I just need to find what's causing them.  :smiley-eek:

Obviously these issues need addressing before I can release a library.

Also I'm writing the class code to be fully OOP compliant and not just a usable bit of code.

Anyway I'm hoping to post a movie running on the 24 x 22 screen by next week showing a hand waving in full 256 level greyscale.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 06, 2012, 04:55 pm
Aw that sounds awesome!!
I'd forgotten you are more familiar with the pic over the arduino, good luck man!
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 15, 2012, 09:09 pm
Well here it is at last.... :smiley-mr-green:

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.

http://youtu.be/zMzKhonWhq0

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

http://youtu.be/sViovjihxvg

They look better in real life...honest guv.... :P
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 16, 2012, 12:33 am
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 16, 2012, 01:13 am
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....
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 16, 2012, 01:36 am
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.

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 16, 2012, 10:33 am
No pressure...after all this is a hobby.  :smiley-mr-green:

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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 16, 2012, 12:38 pm
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
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 16, 2012, 01:02 pm
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... :smiley-mr-green: :smiley-mr-green:

Do you have a good manufacturer who would produce the board with the LEDs already soldered? Maybe we could look at that option...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 16, 2012, 11:59 pm
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/170786097936?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649)

http://www.ebay.com/itm/300757213438?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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Dec 25, 2012, 07:04 am
Binary, do you have an AS1130 mounted and going?
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 25, 2012, 08:15 pm
Merry Christmas all.  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 28, 2012, 09:32 pm
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 (  :smiley-mr-green: ) 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... ;)

@Binary
Quote
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...."  :P

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.

[font=Verdana]Just like it says in the datasheet.[/font]


Happy New year mate.  :smiley-mr-green:

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 28, 2012, 09:57 pm
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.


http://youtu.be/Agxh7WkdDQs


You can at least see how fast the changeover takes place.  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 12:14 pm
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 12:54 pm
Your logic is a bit flawed...

How do you come to the conclusion that :

Quote
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...  :smiley-eek-blue:

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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 12:57 pm
Tip:

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

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 01:13 pm
Quote
of course I already have a code for one matrix,


That's not what you said in your previous statements.  :smiley-roll-blue:

Quote
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... ;)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 01:36 pm
Your original question:

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

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

Quote
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?

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

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

Quote
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...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 01:54 pm
OK..got your code...

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

Quote
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... :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 02:51 pm
Quote
the compiler crashes!


If the compiler crashes...I'd get a new one.... :smiley-mr-green: :smiley-mr-green:

Do you mean that your programme won't compile?

If so...what does the compiler say? Post the output.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 05:26 pm
..and you say it compiles if you comment out certain parts...

which parts?
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 06:53 pm
I've no idea why your compiler crashes...

but I can see several reasons your code won't compile.

This is just on a quick scan.

1) You declare I2C_write as returning unsigned char...it should be void.
2) You declare:

Code: [Select]
void AS1130config(unsigned char ram, unsigned char command, unsigned char data)

then call AS1130_config(i, 2*j+1, Frames_Data[data]); twice!! (what do you think is wrong with that?)

3)Will your compiler allow inline declarations? ie
Code: [Select]
for (int i=0x01;i<=0x24; i++)

or do you have to declare them first?
Code: [Select]
int i,j,k;

whichever it is you have done both in the same function and you can't declare i as an integer AND an unsigned char in the same bit of code.
4) You've declared Frames_Data[0x360] and then try to step through it using an int. Does your compiler treat int as signed/unsigned or 8 or 16 bit?

5) Will your compiler allow you to define AS1130CONFIG as a constant and then declare AS1130config as a function name?

6) ALL your initial declarations are wrong...they should be #defines NOT variables.




Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 29, 2012, 08:20 pm
You need a good book on C/C++ programming.

I don't believe your compiler has no #define directive...every compiler I have ever seen allows #define it is standard in c.

You need to read through my reply again...

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 30, 2012, 11:50 am

why do I need to read through your reply again? Is there something I missunderstood?


You CAN'T be serious?  :smiley-eek:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 30, 2012, 01:28 pm
void AS1130config(unsigned char ram, unsigned char command, unsigned char data)

Quote
then call AS1130_config(i, 2*j+1, Frames_Data[data]); twice!! (what do you think is wrong with that?)


Tell me what you don't understand about that.


It just demonstrates again how much trouble you cause and how little effort you put in when you get an answer.

I might also point out that you came here asking about the shdn bit...implying that was why your programme won't work. You then moved on to the init bit and the CS register also implying that these were reasons your code doesn't work.

After quite a bit of wasting my time...it turns out that your program doesn't compile... :smiley-eek-blue: :smiley-eek-blue: :smiley-eek-blue: and that you can't even be bothered to copy and paste the code I provided (as is shown above).

You also state
Quote
Nope, that's a part of your code I didn't change. I don't call it twice.


Which is TOTAL rubbish...You DO call it twice and you DID change it (again as is shown above).

I am the only one helping you with your project...try putting in some effort or do as I suggested when you frustrated me to the point of giving up in the other thread you cluttered up with your problems...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 30, 2012, 06:00 pm
Quote
You don't know how much time I'm investigating in this project.


So...why should I care?
How much time have I wasted trying to help you out?

Quote
But I also have to do lots of other things that I can't concentrate the whole time on only this project


Yeah, me too. I could be doing lots of other things rather than being conned into teaching you C programming.

Quote
Please don't be angry, I'm really thankful for your help!


Good...I'm glad you appreciate it.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quote
So the only problem is that underscore?


Errrr NO there are lots of problems....

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quote
I just have to change it like that: AS1130config(i, 2*j+1, Frames_Data[data]);


If you do that you are making the problem worse. (read my reply above again/properly)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quote
and then it's okay?


No...your attempt at compiling has many problems not the least of which is this one.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Quote
or what do you still mean with 'calling it twice'?


Code: [Select]
AS1130_config(i, 2*j+1, Frames_Data[data]); <------FIRST CALL
    data++;
AS1130_config(i,2*j,   Frames_Data[data]);    <-----SECOND CALL
    data++;


It doesn't matter if you call it once or 1000 times...it still won't compile until you call a function that exists.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 30, 2012, 06:34 pm
That would work...but why change things even more?

This could cause more problems later when you copy and paste more of my code.

All you had to do is put in the underscore in the places that it's missing.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Dec 31, 2012, 11:31 am
Quote
because the compiler doesn't work with underscores!


Now I'm getting more and more convinced you are taking the mickey.

You say you are using a compiler that won't allow underscores, doesn't allow the #define directive and won't let you include header files.

All I can say to that is BOLLOX

Goodbye...I'm sure you've provided lots of entertainment for the readers of this and the other thread you filled with your bullshit.

I will be ignoring you from now on.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 02, 2013, 06:57 am
Sounds like you literally have the crappiest compiler ever.
....I thought we made the ignoring clear in the last thread actually.

So I hope life is going well Hex,

I thought I'd give you an update considering I'm not here that often anymore. 
I have my items coming in the mail, solder paste and such.  Once I get them, i'm gonna go get a skillet for skillet reflow.
At that point I may or may not have enough time to work with it until classes start back up again (funny how I'm more busy during my "break" instead of the school semester).
I have 2 Winterm classes, a website, a game, 2 jobs, and my first product to work on so its difficult.

If I get anything at all going, I'll let you know.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 02, 2013, 08:49 am
Hi funky m8!

Happy New Year and all that.  :smiley-mr-green:

It'll be great to see what you produce when you finally get back to Uni and have some time on your hands.... :smiley-mr-green: :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:

...ain't it just the truth...

Can't wait to see the outcome of the reflow attempt...I might have a go with the 'toaster' method myself although I can pretty well hand solder any chip with legs, there are some chips that are only available in TFN packages and that's where the reflow would come in handy.

If I ever win the lottery, I'll get a proper station and pick and place machine... :smiley-mr-green:

Keep me informed, especially software wise.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Jan 02, 2013, 09:33 am
Quote
And I can't remember that I said that it won't include header files.

Even I remember that, back early in the other thread that we thought had been left behind.

Honestly binarygod I'd put money on there being no C compiler in this universe that doesn't handle #define, #include and _, it just can't happen.

Show us a 10 line program with an underscore and the resultant error message and we may believe you, until then as far as I can see you're just taking the piss.

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 02, 2013, 09:53 am
Happy New Year Rob.  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Jan 02, 2013, 09:59 am
Thanks, I totally forgot and wondered what all the noise was a couple of nights ago, must have been fireworks. So apart from being last_year +1, what year is it anyway?

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 02, 2013, 10:11 am
Code: [Select]
#include normally.h

#define last_year 2012

int this_year;

void main()
{
  this_year = last_year++
}

*** Error *** Error *** Error *** Error *** Error [#include ?????? don't be daft]
*** Error *** Error *** Error *** Error *** Error [you can't bung 2012 into an int]
*** Error *** Error *** Error *** Error *** Error [underscores not allowed]
*** Error *** Error *** Error *** Error *** Error [#define not recognised]

*** Error *** Error *** Error *** Error *** Error
*** Error *** Error *** Error *** Error *** Error

*** Error *** Error *** Error *** Error *** Error [compiler will self-destruct in 1 minute]



:smiley-mr-green:
I know what you mean m8...I tend to be unimpressed by all the 'holiday' rubbish as well....
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Jan 02, 2013, 10:25 am
I saw that lot in the notification email and thought it was for real from binaygod's compiler :)

Anyway now I see your problem, no ; after the this_year assignment.

I can't wait for the Xmas/NY BS to be over with so I can buy a satellite dish, but then when I worked I loved the time off of course, I'm just in grumpy old(ish) man mode.

I just realised you're from Southport, is that the Southport sort of half way up on the west coast? If so my best friend's wife's brother lives there.

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 02, 2013, 10:57 am
Yep..that's the one... 8)

I'm not a native though...born in Macclesfield, dragged up in Manchester, 8 years as Army Radio & Electronics Tech moving around a bit, 20+ years near Lands End, Cornwall, then back to Germany, then Hastings, now Southport and thinking of moving back to Cornwall now I've retired.

Not done the whole deal like you old chap...too f%@!ng cold in N. Europe but I've done a bit of nomadding myself and I'm more salt and pepper than gray ( :smiley-mr-green:) but I think we have quite a few things in common...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Jan 02, 2013, 04:50 pm
Quote
but I think we have quite a few things in common...

Sounds like it.

I'm probably still more pepper than salt but I figured I'd think ahead with my forum name :)

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 02, 2013, 05:34 pm
Quote
but I figured I'd think ahead with my forum name



Also fortunate having a (not very) colourful surname.... :smiley-mr-green: :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 03, 2013, 01:04 am
Quote
What can I do to increase the clock?



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



Try winding it up.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: ematson5897 on Jan 03, 2013, 07:04 am
**grabs popcorn**

:p
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 03, 2013, 03:17 pm

**grabs popcorn**

:p


]:D ]:D ]:D ]:D
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 04, 2013, 12:05 am
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
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 11:35 am
post the code producing the trace.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 03:57 pm
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.


Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 05:16 pm
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: [Select]
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:

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 05:22 pm
Also some pics of your hardware might help.

what size pullups have you on the clk and data lines?
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 07:45 pm
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. ;)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 08:01 pm
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.... :P
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 09:06 pm
AHHHH
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 09:07 pm
The driver I am referring to is your I2C driver.  ;)

Hope all becomes clear now... :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 09:31 pm
Quote
why didn't you say that at the beginning!

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

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: *
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 04, 2013, 09:48 pm

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?  :D

Also...


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


Please answer.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 11:55 am
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 12:45 pm
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.

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 12:48 pm
BTW my resistors are under 1K.   ;)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 01:21 pm
I'm no longer angry with you...I'm just astounded.  XD
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 01:46 pm
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...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 05, 2013, 03:42 pm
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 06, 2013, 03:25 am
Sorry guys, my eagle file got corrupted so my circuit boards I received today are just a shell of what they should be.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 06, 2013, 06:32 am
I can and will be as patient as Hexadec has been, but only when I'm getting paid for it.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 01:30 pm

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.... ]:D ]:D ]:D
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 03:02 pm
@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.

Code: [Select]

// 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);



Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 03:30 pm
HURRAYYYYYYYYYY!

Well done mate.  ;)



Go on...tell me what the problem was...(I already think you're an idiot)  :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 05:36 pm
The trouble is...I tend to have a logical approach to fault finding...you just seem to keep changing things until something happens.... :smiley-mr-green:...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... :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 05:39 pm
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 05:52 pm
Quote
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? 
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 08:27 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. ;)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 07, 2013, 09:09 pm
Incrementing the addresses won't work.... :D

Quote
there are only three lines I don't understand...can I ask that question...?

:smiley-mr-green:
ask away...
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 08, 2013, 10:43 am
Quote
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.  ;)

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


Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 08, 2013, 04:29 pm
WTF  :smiley-eek-blue:

Where's he gone??

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 08, 2013, 07:07 pm
lol, I have no idea.  maybe transistorgod got him.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 08, 2013, 07:13 pm

lol, I have no idea.  maybe transistorgod got him.


:smiley-mr-green: :smiley-mr-green: :smiley-mr-green:

...or...hexagod.... ]:D
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 12, 2013, 11:44 pm
Probably accidentally got it working right, and dropped this thread like a hot potato.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 13, 2013, 05:34 am
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 13, 2013, 09:31 am
HEYOOHHHHH figured it out! I have a mounted as1130.
Now its time to find time to test it out
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 14, 2013, 11:51 am

Probably accidentally got it working right, and dropped this thread like a hot potato.


Guess so...the last thing he posted was that it was working how he wanted it using my code! then he disappeared.

No thank-you, kiss my arse or anything.... :smiley-roll-blue:

Makes you really want to help people doesn't it?  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 14, 2013, 11:53 am
Come on Funky man...let's see some action on your project.  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 14, 2013, 01:50 pm
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 14, 2013, 02:28 pm
Students never change...party 'til the last minute...then PANIC!  :smiley-mr-green: :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 14, 2013, 03:02 pm
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 15, 2013, 04:07 am
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.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 15, 2013, 04:20 am
PCBA?
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 15, 2013, 04:21 am
Short for PCB and Assembly shop.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 15, 2013, 04:23 am
Oh weird, I didn't notice that "binarygod" actually deleted everything. That's really antisocial.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 15, 2013, 04:34 am
Why would he go to all that trouble?
I mean its not like he can pass off never having had gotten help from us.  Hexadec has private messages from him, lol.

Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 15, 2013, 05:52 am
Okay time for an honest question though. 

With the TLC5940, there is an ISET pin, where you basically put a resistor there and it would set the sink current for the leds (common anode rgb leds).

With the AS1130, I didn't see any current or voltage setting.  I don't want to burn out 132 red LEDs, do do I put the proper resistor before the CS lines?
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 15, 2013, 11:14 am
Don't turn in to BG FFS.... :smiley-mr-green: :smiley-mr-green: :smiley-mr-green:

The CS register sets the current anywhere from 0 to 30mA (0-255)  :P
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 15, 2013, 11:15 am

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.


It's a shame they only do 1 package for this chip...it probably puts lots of designers off, not to mention hobbyists.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 15, 2013, 04:40 pm
If I did that, then I'd have to delete all my posts.  (Seriously whats up with that?)

Okay sounds good, I have a lot to do today (Speech -> clean room -> E-mail friend -> Finish internship cover letter)  But i might be able to get all that done in 5 or 6 hours.  Then I can make a build and try the code out.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Forcebringer on Jan 15, 2013, 05:00 pm


It's a shame they only do 1 package for this chip...it probably puts lots of designers off, not to mention hobbyists.

Well you can also get the Ssop-28 package which is available too.
that will solve your problem with soldering. The package was available shortly after the wlp.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 15, 2013, 05:11 pm



It's a shame they only do 1 package for this chip...it probably puts lots of designers off, not to mention hobbyists.

Well you can also get the Ssop-28 package which is available too.
that will solve your problem with soldering. The package was available shortly after the wlp.


OOps...yep forgot about that... :smiley-red: :smiley-red:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: JoeN on Jan 16, 2013, 10:36 pm


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.


It's a shame they only do 1 package for this chip...it probably puts lots of designers off, not to mention hobbyists.


They do?  I see a 28 TSSOP

AS1130-BSST

http://www.digikey.com/product-detail/en/AS1130-BSST/AS1130-BSSTCT-ND/3028666
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 17, 2013, 03:43 am




It's a shame they only do 1 package for this chip...it probably puts lots of designers off, not to mention hobbyists.

Well you can also get the Ssop-28 package which is available too.
that will solve your problem with soldering. The package was available shortly after the wlp.


OOps...yep forgot about that... :smiley-red: :smiley-red:


we know
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 17, 2013, 08:46 am
I know about the TSSOP, but it's actually way too big for my application.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 17, 2013, 05:23 pm
Unfortunately, to this day, I haven't been able to find anybody who can make a board that made for a WL-CSP footprint.
Its more of a massive company, large production kind of capability. 

If anybody knows of some fabricator, throw it out.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Jan 18, 2013, 12:12 am
Most places that can handle 4mil rules can do it, but I still have to cheat by altering the shape of the outer BGA pads. A couple of PCBAs have reviewed this and seem to think it will work fine; one even said it's approximately what they would have done to my Gerbers without my asking.

(https://dl.dropbox.com/u/610802/Screen%20Shot%202012-11-15%20at%201.46.11%20AM.png)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 18, 2013, 02:29 am
Hmmmm, my board isn't lighting up.
Do you really need the IRQ and the RSTN hooked up for your PWM sketch Hex?
If not, my circuit board must suck
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 20, 2013, 08:35 pm
Sorry about the delay...been away for a few days.... 8)

The RSTN pin needs to be pulled to logic 1 or the chip will keep resetting.

The IRQ pin has no effect whatsoever if you're using the PWM example code. (It's not used).

Are you using the code "as is" or modified?

Also let's see your hardware/schematic... ;)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jan 23, 2013, 06:38 am
The code is not changed at all. 
Okay, I didn't solder a pin to my RSTN hole.  I'll see what I can do about getting one soldered on after some class tomorrow.  I just tried to heat up my iron in my dorm and I smelled awful.  Didn't want the alarm to go off.

Schematic...Lemme see...I can't find it right now, BUT! I know its right.  I went over it about seven times.  I always do a check like that before I send something to fab.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Forcebringer on Jan 30, 2013, 10:56 am
Astron will do WLP for example:
http://www.astron.co.at/
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Jan 30, 2013, 08:01 pm
Thanks for the link Mr Force...good to know for future reference.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Feb 11, 2013, 06:53 am
Lol, wow I feel dumb.  turns out a few of my pins weren't soldered to the pad on the AS1130.  Should look closer next time.
Good news is I have to go home to get my suit so I can solder those down.  I'll report back when I have it soldered down
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Feb 11, 2013, 04:12 pm
I had a similar problem with one of my chips on the 528 LED board, it was intermittently working and after a lot of messing about I found 1 pin was not soldered properly!.

Remember it for the future (like I didn't)  :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: michinyon on Feb 11, 2013, 06:29 pm
It's amazing that there are now chips which will drive more than 100 individual LEDs.

When you get that number up to something like half a million LEDs,  you might be
able to invent something like, um, television.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: Hexadec on Feb 11, 2013, 08:37 pm
Hey...you should try to market that idea...it might catch on... :smiley-mr-green:
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: khoeg on Mar 23, 2013, 05:41 am
Hi All,

I am working on a project using AS1130 and have problem in making scrolling works. I would like to do scroll of 'digit' accords 5x48 LED using 2 AS1130. (Similar to page 32 of datasheet) . I can already display the 'digit' on the LED matrix, but when I start scrolling, the 'digits' just do not pass the CS11 boundary. Can anyone give me some direction? Thanks in advance.

Follow is the way I am using now:

  as_config(0xc0, 0x0B, 0x02);  //IC1 sync out
  as2_config(0xc0, 0x0B, 0x01); //IC2 sync in

  as_config(0xc0, 0x01, 0x40);  //movie of frame0
  as_config(0xc0, 0x02, 0x01);  //play 1 frame
  as_config(0xc0, 0x03, 0x31);  //scroll digit in 5LED block
  as_config(0xc0, 0x04, 0x2B);  //CS0 to CS11

  //repeat for IC2
  as2_config(0xc0, 0x01, 0x40);
  as2_config(0xc0, 0x02, 0x01);
  as2_config(0xc0, 0x03, 0x31);
  as2_config(0xc0, 0x04, 0x2B);
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Mar 30, 2013, 02:51 am
:)
(https://dl.dropbox.com/u/610802/wxzp.gif)
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Mar 30, 2013, 04:59 am
nice.

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: JoeN on Mar 30, 2013, 07:14 am
Whoa.  Can you see out that while it is going?  Add a mode when you can power blast.  Be a superhero!  Also, remake with RGB leds, you could be totally freaky.  I love that.  If that was your idea that is a great one.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: graynomad on Mar 30, 2013, 08:17 am
It doesn't matter if you can see when you look so cool :)

______
Rob
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: macegr on Mar 30, 2013, 09:09 am
I made some long ago using a traditional strobed matrix approach. These use two AS1130 (on the BGA WL-CSP package) and are way more capable.

Easy to see through them.

Writing code for some RGB ones now :) But those aren't relevant to AS1130.
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Apr 04, 2013, 06:13 am
Oh wow! Did you make those glasses yourself?
Code, codeeeeee
Title: Re: AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver
Post by: funkyguy4000 on Jul 09, 2013, 12:28 am
For anybody who may be interested, I'm porting the existing code over to Raspberry pi