AS1130 First attempt - working

If you don't use pullups on those pins they'll be like the Grand Old Duke of York...they won't know whether they're up or down :grin:

I use interrupts whenever I need them.

For instance (if I could get the IRQ line to respond :astonished:) I would play through 36 frames of data, then have the interrupt fire, then change the data and restart the movie with new frames.

I'm doing this at the moment but I have no control over when the change happens - if I used interrupts I would be in charge... ]:smiley:

Fire away mate.... :grin:

To be honest mate...I think private messages are for 'private' communications.

If questions are answered on the Forum, then everybody benefits and mostly you get more than one answer which also benefits everybody. Also the recipient of a private message ends up answering the same questions over and over again.

Anyway...the bottom line is I don't answer private messages unless they are errrrr private... :grin:

To contradict the above... ]:smiley:

I don't have a schematic for the board other than what is posted in this thread. The LEDs are wired exactly as shown in the datasheet and so is the AS1130. There is also quite a bit of example code posted in this thread.

The code for the video you refer to is written for the PIC18F4550 because I am more familiar with PICs and I have lots of them. I will port it to Arduino when I get the time but it's not a priority. Also I have hung on a 64K EEPROM which gives me room for 77 full pages of 36 frames.

I will be glad to answer any specific questions you have on the Forum and I suggest that you dive in and build yourself a panel, get the AS1130 and Arduino fired up and then see what problems you have.

The AS1130 will work fine with the ATmega128. The only hurdle I see really is that I'm not sure if the Arduinos Wire library will work with it. I don't see any reason why it wouldn't but at the same reason I don't know if it would, i'm not an expert on libraries. The only thing that would really "kill" the 128 chip in terms of compatability is if it had TWI (I2C) or not, and it does, so you are golden there. The 128 also has the same operating speed as an ATmega328P like on the popular arduino boards. The thing is that the PIC18F4550 has a max clock speed of 48MHz, so it may run a little slower than the video(if there is one, i'm sick so I don't feel like looking) but it should still do fine.

I'm actually incorporating this chip into one of my projects and I plan on using an ATtiny85 clocked at 10MHz to run it, I think it'll do fine. Only 2 ways to find out and I don't wanna pull up the datasheet! (Lazy! cause i'm sick (that excuse works wonders))

Regarding the programming language, the microcontrollers are generally written in C code and then uploaded via an ICSP or some other type of programmer.

Regarding the frames, hexadec will have to answer that one.

Hope you feel better soon funky mate.... :cold_sweat:

Anyway....

The AS1130 runs completely independently once the microcontroller has told it what to do.

Basically, you set up the registers, upload the frame and PWM data and tell it to start...it then runs on it's own.

While it is running you can upload more data and it'll display that.

All this is explained in the first post of this thread along with the answer to all your other questions.... :wink:

Read the sketch posted in the first post....and here http://arduino.cc/forum/index.php?topic=123071.0

BTW the speed of the processor is irrelevant it is only used as a master on the serial bus to send commands and data.

I don't really understand every english expression

I'm not being rude but I think the basic problem is that this is not a chip to be playing with if you are a complete beginner.
If you need to ask questions like the ones you have asked (both in the PMs and in the Forum) then you need to start at a more basic level.

Questions like "what if I don't use an eeprom?" and "what language is used?" tell me that either:

a) you are a complete beginner
or
b) you can't be bothered reading the sample code or the data sheet.

I suggested to you that you build the system and use the supplied code to get the thing working....THEN ask questions about any problems you have (which I will be pleased to answer) or if you are really a beginner then try some simple matrix led experiments to give you a better understanding.

It took me many hours reading the datasheet of this chip to finally get a good understanding of it's functions...but I have a long background both in software and hardware and started off from a position of 'knowing' how to manipulate registers, write code etc. :wink: (also the English in the datasheet is not very accurate in some places!)

I'm not trying to put you off but just think that you are trying to run before you can walk (as we say in English :grin:)

You will need a breakout board to be able to use the AS1130 if you don't already have a board. The chip doesn't come in a DIP package, it comes in a SSOP-28 package so you won't be able to stick it in a breadboard when you get it.

ALL your questions HAVE been answered you are just not understanding/listening/making any effort.

I see little point in continuing with this until you have a specific question about something you don't understand in the datasheet.

He's kinda right. What exactly do you not quite get yet, so we can help you out?

"The only hurdle I see really is that I'm not sure if the Arduinos Wire library will work with it."

Do you (or anybody else) know if there is another library I could use instead?

//Use Wire Library to do I2C communication  
#include <Wire.h>
/***** Function to write commands and data to I2C bus ***************************/
uint8_t I2C_write(uint8_t command, uint8_t data)
{
  Wire.beginTransmission(AS1130ADDRESS); 
  Wire.write(command); 
  Wire.write(data); 
  int ack = Wire.endTransmission(); 
    #ifdef DEBUG
      if (ack != 0) 
      {
        Serial.print("Error: ");
        Serial.print(ack);
        Serial.print("\r\n");
      }
    #endif
  return ack;
}
/***** Start-up sequence as per datasheet - see Page 13 ******************************/
// (1) define ram configuration - see table 20 page 25
// (2) Fill the On/Off Frames with our data
// (3) Set-up Blink & PWM sets
// (4) Set-up Dot Correction (if required)
// (5) Define Control Registers - see table 13 page 20 
// (6) Define Current Source (0 to 30mA) - see table 19 page 24
// (7) Define Display Options
// (8) Start Display (Picture or Movie) Movie takes precedence over Picture

The above answers every question you asked to start with and is all taken from my example code. :wink:

And if I use four AS1130 to build a 11x48 Matrix, how do I have to connect the Sync Pins?

  1. I'll do it like in the datasheet, on p.32 Figure 27., that there is only one Sync-Pin configured as Sync_Out and the other three AS1130 are Sync_In and then the Sync_Out is connected to the three Sync_In? But that means that the clock speed will decrease?!
    Therefore I have a 2. solution: To configure every Sync Pin of the four devices as Sync_Out that each of them works (with their own oscillator) independent from the others ?

You need to understand what the sync does.
How do you conclude that the clock speed will decrease? :~
GOLDEN RULE: If it says it in the datasheet...it is 99.9999999% the way it's GOT to be done.

In the Datasheet is written: "After a first write of data to the frames, the configuration is locked in the AS1130 config register and can be changed only after a reset of the device. A change of the RAM configuration requires to re-write the frame datasets."

That is refering to the RAM configuration. You have to choose at setup time which configuration you want (1-6) For example you can have 36 frames and 1 PWM set or 18 frames and 4 PWM sets etc.
See Table 8 in the datasheet.

A soft reset can be performed using the Shutdown register...Table 23 but I have a reset button because I am developing software and want to ensure that all the data etc is cleared on restart.

cracklings1017:
thanks

for what? :grin:

I asked you some questions in my last post hexadec

That's right...you did. Trouble is (for you) that it isn't one of my life's priorities to answer your questions immediately...

So of what was funkyguy4000 talking there?

Don't know (and don't really care) why don't you ask HIM.

But would the circuit also work if I use four Sync_In Pins and let them work with their own oscillator that they are independant of the other devices clock?

You STILL haven't looked at what sync is/does...
If you want the chips to work independantly then don't use sync...if you want them synchronised then use sync. Not rocket science is it?

Now go away, learn some politenness and manners - then come back.

I know this isn't strictly Arduino, but here's a video of where I'm up to and what's possible with this chip.

I'm now uploading the page data to the AS1130 through the MCU (could easily be an AVR :grin:) from the PC.
The PC app takes data produced in a spreadsheet, converts it to binary format and uploads it to the external eeprom on the PIC board.
It then gets uploaded to the AS1130 as 36 frame pages. At the moment I'm using 10 x 36 frame pages (which will fit easily onto an AtMega328).

If anyone wants the source code for the PIC or the PC app. just ask.

I WILL be porting the code for the Arduino...but time is at a premium unfortunately :frowning:

I'm really sorry Hexadec

No problems mate...I was feeling a bit grumpy that day. :grin:

It's best to think of the AS1130 as a completely separate entity which can receive data and instructions at 1Mhz over the I2C bus.

Once you have set up the AS1130 by sending instructions and the frame data and telling it to start, it will display the frames one by one at whatever rate you told it to.
It will do this forever without any more communication with whatever is sending instructions to it.

The fastest time between frames is 32.5mS which is about 31 frames per second - the slowest is 487.5mS which is about 2 per second. (see Table 17 frame_delay)

While the AS1130 is displaying the frames you can upload another set of frames and it will display them. (It displays whatever is in it's eeprom 1 frame at a time)

Now think of the microcontroller as a seperate entity.

It can send instructions over I2C and stream data as fast as the receiver connected to it can process it.
It has eeprom memory that can hold binary arrays (in this case our frame data) until it is full.
It can communicate and exchange data with an external eeprom and send that data out over I2C.

Now put them together...

MCU sends instructions and frame data to AS1130 and tells it to start.
AS1130 displays the frames on it's own and ignores the MCU.
MCU gets another 36 frames of data either from its own eeprom, an external eeprom, the serial bus or anywhere else that can be connected to it.
All this time the AS1130 is happily displaying the frames...
MCU sends new frame data to AS1130.

The cycle continues until the power goes down. :grin:

Don't forget you can also send instructions to the AS1130 while its running as can be seen in the video.

The speed that the frames are displayed is constrained to one of 15 different speeds set in the Frame Time/Scroll register and has nothing to do with the clock speed the I2C bus speed or the MCU speed.

Hope that is now clear.... 8)

binarygod:
@funkyguy4000 :

Of what were you talking there about that library?

I was speaking of the Wire library that Arduino uses. I'm not sure if the ATmega128 that you are hoping to use will work with it, my advice would just to try it out and see what happens. I see no reason why it wouldn't work but also I wouldn't stand by that statement. Just do some experimentation to see if it works. If it does, could you kindly let us know?

You'll have to go to the libraries folder of the arduino ide program and open it up in some sort of C programming environment

libraries\Wire


Rob

Well spotted.... :grin:

When I was first looking at this chip I read somewhere that the sync line was open drain which I don't like to leave floating. (it isn't)

So, yes it's a mistake. =(

As stated earlier in the thread, it doesn't matter if the sync is up, down or indifferent unless you are using it. :slight_smile:

I don't think it will make any difference...I just have loads of electrolytics :grin: