AS1130 Ongoing Discussion 132 Individually controllable, PWM LED driver

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

which parts?

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

for (int i=0x01;i<=0x24; i++)

or do you have to declare them first?

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?

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

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

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

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

You CAN'T be serious? :astonished:

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

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... :fearful: :fearful: :fearful: and that you can't even be bothered to copy and paste the code I provided (as is shown above).

You also state

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

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?

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.

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

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


> So the only problem is that underscore?

Errrr NO there are lots of problems....

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)


> and then it's okay?

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

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

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.

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.

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.

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.

Hi funky m8!

Happy New Year and all that. :grin:

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

...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... :grin:

Keep me informed, especially software wise.

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

Happy New Year Rob. :grin:

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

#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]

:grin:
I know what you mean m8...I tend to be unimpressed by all the 'holiday' rubbish as well....

I saw that lot in the notification email and thought it was for real from binaygod's compiler :slight_smile:

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

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 ( :grin:) but I think we have quite a few things in common...

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


Rob

but I figured I'd think ahead with my forum name

Also fortunate having a (not very) colourful surname.... :grin: :grin:

What can I do to increase the clock?

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

Try winding it up.

grabs popcorn

:stuck_out_tongue: