AS1130 First attempt - working

This is a discussion that should be open for all. The only issue I can see is that it is programmed on a PIC. Anything other than that is needless problems. Please develop in proper IDEs. If you have problems with I2C, understanding it and all. I can write something up if you like.

It's arduino code so there can nobody tell me I'm in the wrong topic

ROFLMAO :grin: :grin:

I did post at the beginning somewhere that this is my first attempt at using the Arduino system and the AtMega chips....before I started this project I'd never heard of the Wire library... :stuck_out_tongue:

I can read though...and have a background in electronics and computer science. ]:smiley:

The code is not optimised or elegant...I just posted it to show how I got the AS1130 working with an Arduino.

Anyway....

I now have the 24 x 11 version working and am starting this weekend to solder up the other 2 chips and 264 LEDs which will give me 24 x 22. My plan then is to look into optimising the code and porting it to the Arduino...then I'll look at RGB, but I haven't found any RGB LEDs that I can solder in a very tight matrix.... :frowning:

Until the code is optimised and debugged I don't really want to share it because I am changing it all the time...and I haven't even started to include blinking and dot correction yet :fearful:

To answer your question...the begin method initialises the I2C bus and sets the internal pullups on SDA and SCL. The beginTransmission method does exactly what it says.... :smiley:

Just another thought Mr God of the Binaries...

If you look in the Arduino installation on your computer, you can find all the code for the libraries and follow what they do and how they work...

...the only problem is that they are written as C++ classes and you need to understand the basics of the Class system and how to create them.

Me....I'm working class and proud of it.... :grin: :grin:

  • Idk
  • Idk
  • Yes
  • that is just the serial baud rate between the arduino and the computer. 9600 is just a convention. Its just your go to baud rate. The choice has no affect on the actual operation of the AS1130.

^^^^Please done forget to answer binaries questions^^^^

Once we seem to have no more questions ever coming up and have this AS1130 thing figured out completely, we'll start a new thread with concise descriptions and all that so that people can do it. It'll still be a discussion thread but we'll try to boil it down to get all the fluff out. We are at 15 pages and thats kind of a lot to read through when you aren't sure if you'll get your answer.

I do believe that just means that it is capable of accepting a 1MHz transmission rate in "fast mode".
What fast mode is, I don't quite know entirely. It may be something that automatically switches over at a certain threshold in which no coding is needed.
If there is coding needed, It would be initiated in the Power-On sequence.

  • int ack = Wire.endTransmission();
  • the loop function HAS to be there...I'm just using it to start the AS1130 then pausing for a bit, then resetting, then it loops. It doesn't HAVE to. I could have changed data sets during the pause. etc.
  • I already told you where to look for the answer to this and the first question. Did you look?
  • why didn't you read about it BEFORE you asked the question?

Why have you STILL not read about I2C?

Here are some links:

There are 100's more.

Oh BTW the Arduino defaults to 100kb/s for I2C or you can set fast mode which is 400kb/s.

The AS1130 can work at 1Mb/s but you'll have to bit bang at that speed...or get a compiler that will do it automatically. eg CCS C allows:

#use I2C(master, scl=PIN_B0, sda=PIN_B1, fast=450000)

//sets the target speed to 450 KBSP

Ohhh okay, that makes wayyy more sense haha.
I love bit banging I2C. SO AWESOME! Haven't done it with the arduino platform yet though.

What details do you need? We may be able to help out.
How about this. Link me the resources you've read and post your questions too.
I'll look through the links and answer the questions as best I can.

@binarygod

As far as I am concerned I posted some code which will run the AS1130 chip with 132 LEDs in the hope that other people would contribute their own efforts and we could all learn something.

This thread has turned into something completely different :roll_eyes:

I don't have the time, inclination or skills to teach you C, C++ or any other kind of programming. The same goes for electronics.

Most of the questions you have asked have been about basic programming or electronics not about my programme or the AS1130.

Many of your questions have already been answered in the software I spent ages commenting but you have either not bothered to read or don't understand because you lack the basic knowledge.

For instance:

so where do I have to put the as_config(CONTROLREGISTER, SHUTDOWNOPENSHORT, 0b00000011); without making loops all the time?

Just makes my blood boil....I have posted code that works well that is commented AND answers this question and there was also a discussion with funkyguy about why all the setting up was done in the setup function and not in the main loop...

This is even worse:

But where can I set those 400kb/s? Or are they automatically set?

I've posted links which would answer this question, but even if I couldn't be bothered...a simple "arduino fast mode" bunged into Google brings up millions of pages. You only need to look at the first 20.

I've already suggested that you do some basic experiments with an LED matrix before you get involved with a VERY, VERY complicated chip like the AS1130...you have ignored this and continue to ask questions that have already been answered or should not need to be asked in the context of this thread. Not knowing what the setup() and loop() functions are there for is not a good starting point if you want to programme an AS1130.

You don't have a clue about the Arduino IDE and as far as I can ascertain you don't own an Arduino of any kind.

I on the other hand do have an Arduino and know enough of the basics of programming it that I can get the AS1130 working all on my own...I did this by spending a long, long time reading the datasheet and using Google. There is a mountain of information on every aspect of the Arduino freely and easily available...all you have to do is read it. There are 1000's of knowledgeable people willing to answer any questions on any subject, all you have to do is ask.

You also don't appear to have a working AS1130, an LED matrix or a compiler that allows the inclusion of header files (I find that very hard to believe) and spend lots of your time wasting my time by asking questions you should already know the answer to, not responding to the answers and then asking more questions...I've already said in this thread what I think of this, I suggest you start at post 1 and read the whole thread again.

The bottom line is...AND I have said this before to you...get an AS1130 hooked up to an LED matrix, connect your driver MCU, programme it and come back and ask SPECIFIC questions about the AS1130 which I will gladly answer. If your MCU is an Arduino and you have problems I or someone else will try to help...but basic questions about setting up things like I2C DO NOT belong in this thread.

Im with Hexadec on this one.
You can't work on a program or anything electronic without actually DOING it.
Electronics is logical but if you are a beginner such as yourself, its a lot to grasp so you might as well experiment. Things may work for some reason without you knowing it.

As for my contributions with the AS1130, I'm having a hard time finding a soldering iron that actually freaking works. I spent $50 on two soldering irons from radioshack, one never heat up, and the other wasn't sealed properly so it scorched itself. Hate radioshack so much.

I'll update when I FINALLY get one mounted.

@ binarygod

Thank-you so much for your last post and for the apology. :wink:

I will spend as much time as I have trying to help you with your project and I have no wish to see you leave this thread at all.

I just hope that you understand why I posted my feelings above and why I was a bit annoyed.

Please feel that you can contribute to the thread as well when you get your matrix working...we don't want to be "liberated" from you at all! :grin:

Now go on....ask me a question......I dare you..... ]:smiley: ]:smiley:

Take care mate, Roy

As soon as you have the hardware set up we can work through it and get your project working. I'm sure funky will be up for that as well. :grin:

Spend whatever time you have on enjoying learning the basics and worry about the AS1130 when you have one.... :wink:

I spent $50 on two soldering irons from radioshack

Madness...pure madness... :grin: :grin: :grin:

You are quite welcome to the Arduino code which will scroll a message across a 24 x 11 matrix using movie mode...

...BUT...

a) it is not well commented.
b) it is split into 4 files
c) I have no time to explain how it works
d) I am in the process of changing it on a daily basis.

If you want it on the basis that you are entirely on your own with it and will get very little help from me then I will email it to you. :wink:

It's changed quite a bit but the principles are still the same.

PM me your email address and I'll zip it and send it.

Email sent...

In answer to your question in your PM I refer you to the following....

You are quite welcome to the Arduino code which will scroll a message across a 24 x 11 matrix using movie mode...

...BUT...

a) it is not well commented.
b) it is split into 4 files
c) I have no time to explain how it works
d) I am in the process of changing it on a daily basis.

If you want it on the basis that you are entirely on your own with it and will get very little help from me then I will email it to you.

Sorry. :.

@binarygod

I don't know what you don't understand about "you are entirely on your own with it and will get very little help from me" but you bombarding me with PMs and emails asking questions about the code is the very reason I did not want to share it in the first place!

I WILL NOT answer PMs about the code in any shape or form.

I WILL NOT answer emails about the code in any shape or form.

I MAY answer Forum posts about the code if I have the time which is VERY unlikely

If that is not now clear I will give up entirely and you will never get any code from me in the future.

You agreed that if I sent you the code you would not ask questions about it.

So...why did you send the PMs and emails asking questions?

If I share any more code here...it will be when I want to so don't bother asking again.

If you don't understand the code then go and learn somewhere else.

I give up.

@ Mods/Admin

Feel free to delete this thread as most of it is useless. I will post again when I have something to contribute.

You're very welcome.

Now go and find a hobby that you are capable of....