AS1130 First attempt - working

For anyone interested in this chip here is some sample code.
This is an ongoing project and I’ll update as I progress.

Feel free to alter and use it as you will…but please share your discoveries… :stuck_out_tongue:

Edit 23/10/2012:
Please also see this post for better commented code,123071.0.html

Edit 30/10/2012: See post #113 for latest PWM demo.

AS1130_Frames_demo.rar (3.51 KB)

Latest version uploaded...with full 36 frame movie showing scrolling.

Working on picture animation next with PWM dataset.

Wish me luck :grin:

Hey this is great! I've only just received my breakout boards. Could you please photograph your setup? I'm still a little confused on the charlieplexing that it uses.

Hi Funky

I got the chips from AMS and soldered one onto an adaptor board that I got from China (complete with header pins :D) I then soldered all the components as per the diagram in my upload straight onto the adaptor board. This gave me a little plug-in unit that works as a module.

At present, this is plugged into a very old RS breadboard and driven by a R2 Uno.

This is my first time programming the Atmega chips but I've been programming PICs and micros for a long time.

I'll get some pics together but meanwhile will give you an idea of the stripboard matrix and the sketch uploaded in this thread.

I have just made a Christmas tree (pretty crappy graphics) that demonstrate using 2 frames as pictures and 2 PWM sets to flash the lights.

I'll upload that soon for your perusal and I hope use. :grin:

I think I've got this chip pretty well sussed out now and am just working on a simple spreadsheet to produce the graphics frames as binary data.

Have fun mate and success with your free samples.

ps I've just been shipped another 3.........what a cheek eh? ;)

On the subject of the cross-plexed matrix, here is how I simplified (!) the diagram to enable me to understand what was going on.

Here’s how the stripboard layout started.

Obviously all the LEDs are the same colour but in the pic they illustrate the direction of the cathodes on the board.

Green is cathode down and red is cathode up.

The reason they are soldered to one side is to enable me to solder the AS1130 and an ATMega328 on the same board and also to connect to a mirror image board to give me 24x11.

Also I’ve got lots of ideas for RGB matrices…but I can’t face all that soldering at the moment… :grin:


Okaly Dokaly…

Here’s the demo using Picture mode and PWM sets.

Source code is here:

AS1130_Frames_demo_Xmas_Tree.rar (3.76 KB)

Interesting chip. All above saved for future reference.


Here's an interesting bit change that has lots of possibilities.....

I am working on a board for the AS1130, what did you do with the SYNC and IRQ pins? Did you pull them to logic low?

According to the datasheet IRQ should be pulled high but the sync is left floating.

I have emailed AMS about the IRQ line as all the chips I have stay at logic low even with a pull-up resistor. Whatever I try I can’t get the IRQ to respond.

I haven’t had a reply yet though…

Aw crap, I pulled SYNC to ground on the boards. I guess I can just cut the trace.

I guess I can just cut the trace.

Unless you’re using multiple chips I wouldn’t bother…I pulled it low and high on different prototypes and it made no difference.

I haven’t tried cascading them yet though.

Keep me informed of how you get on. :wink:

Oh thank goodness. The trace is super close to another one and I don’t wanna mess it up.
Will do!

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 8)

I've been working on this chip through an 18F4550 PIC for the last few days and have just added a 512Kbit EEPROM to swap out the frame data. The EEPROM holds 38 full datasets and you can flip the data on the fly.

Great fun this ain't it.... :grin:

Oh wow, thats not a bad idea. 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.

/***** 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");           
/***** 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
             as_config(i, 2*j,   read_eeprom(data));      // i = frame address, 2*j = CS register address (even numbers) then first data byte
/***** Restart AS1130 with changed settings ***********************************/
void AS1130_reset(void)



I'll upload a video of this later so you can see the speed etc.'s the video. (Sorry about the crap quality :blush:)

Its a nice video. I do have a question . You look to have four resistors on your AS1130 board. Are two of those the I2C pull-up resistors? What are the other 2 for?

The resistors are:- 1 SDA pull-up 2 SCL pull-up 3 RSTN pull-up 4 IRQ pull-up

As per the datasheet. ;)