Coding design help
 
Notifications
Clear all

Coding design help

16 Posts
6 Users
0 Reactions
6,334 Views
Posts: 48
(@keithw)
Trusted Member
Joined: 17 years ago

Do you use this for driving DC LED strings, RGB's or individual LEDs? I always thought an arduino would be great for this, but didn't know how to drive AC store-bought strings....sounds fun!


Reply
Posts: 180
Topic starter
(@jonpro03)
Estimable Member
Joined: 15 years ago

I'll be driving DC LED strings. I'm converting AC LED strings.
I'm using the MBI chips because we threw out tons of them at work 😀


Reply
Posts: 255
(@frankv)
Reputable Member
Joined: 17 years ago
Do you think using assembly will get you more speed than C+?

I'm using QBASIC for my prototyping

The average assembler programmer writes WORSE code than a modern compiler, so unless you are very good at assembly language, you're better off writing in C (or perhaps C++).

I don't know whether the QBASIC you're using is interpreted or compiled. If interpreted, you can get a 10-100 times speedup by going to a compiled language.


Reply
Posts: 183
(@buckanear)
Estimable Member
Joined: 15 years ago
LightUp wrote:I looked at your first post again. Now I see how I missed the question. I only recalled asking for an opinion. 🙂

Do you think using assembly will get you more speed than C+?

I'm using QBASIC for my prototyping :ohmy:

Assembly can be very fast if you know what you are doing. C and its derivatives all have improved over the early days. Run Time libraries are better written and the optimizer code it better. Get a good compiler with a good optimizer.

If that is the QBasic that from the old days of Windows, then it is an interpreted basic and is rather slow. The last QBasic Compiler that I know of was version 4.5 that is now free. It is still somewhat slow compared to assembly.

Assembly is a lost art now. Back in the Dark Ages of computers there was only assembly and having a computer with more than 8K of RAM meant you were super rich. Before assembly, to program the Altair 8800, you had to flip toggle switches on the front panel for address and data. That was fun. Then they got punch cards. That was okay until you dropped the tray of 1000 cards and it took a day to put the cards back into correct order. O well I am getting off track.

james


Reply
Posts: 1
(@wediggers)
New Member
Joined: 15 years ago
Jonpro03 wrote:Haha Thanks!

Actually my original question was how to pull the latch high for 3 clock pulses on the last channel output. I eventually got it sorted out though.

Last night at class I hooked the Arduino up to an (old) analog o-scope at school. I found that my grayscale clock was only running at 250hz. Far too slow for me. So I reworked the code a bit and got about 700hz, which will look a lot better.

I was also able to watch the serial data and clock, which looks good. The latch also appeared to be working correctly. This weekend, I hope to have some hardware put together and give it a run.

Fingers crossed.

Oh and the processor I'm using is a Atmel ATMEGA328P, Arduino is just the rest of the hardware and IDE surrounding the processor 😀

Did you ever get this working to control any lights?
what did you do to get the GCLK running faster?
i am trying to use 2 of the MBI5042 chips to control 24 mofsets running some led strips but am having trouble finding much info on how to do it, but your code seems close to what i am trying to do so i am trying to figure out what you have done and how to make it work:-/


Reply
Page 3 / 4
Share: