View previous topic :: View next topic |
Author |
Message |
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Tue Dec 09, 2014 3:58 am Post subject: WS2812 LED code? |
|
|
I am thinking about making a project with the ever-so-popular WS2812 LED strip arrays. Problem is, finding code for BASCOM. I saw 1 thread here, but it covered the Xmega and had alot of ASM code which I am trying to avoid if possible, And the Xmega code wont pertain to me as I will not be using an Xmega. Possibly a Mega32, or other micro running at 18.432Mhz, maybe even push it to 20Mhz.
Has anyone written a library for BASCOM yet for the WS2812? just curious.
(BASCOM-AVR version : 2.0.7.7 ) |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Tue Dec 09, 2014 4:41 am Post subject: |
|
|
hello techknight
I have not seen any.
It should be fairly simple using shiftout as I have done in the web server projects with the 74hc595s and the matrix clock
You just have to keep track of what is on the display so I recommend M1284 as you have 16K of ram to make a buffer with an array with one element per display
you also have space in flash to store fonts to use text if you want to make such a display with text
Regards Paul |
|
Back to top |
|
|
Evert :-)
Joined: 18 Feb 2005 Posts: 2156
|
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Tue Dec 09, 2014 1:47 pm Post subject: |
|
|
I found the last 2 on google but everything i found was not in english or maybe a little hard for me because the translation would be broken at times.
but the first link that you provided I did not find on google and in the code looks like it is in English so that makes life a whole lot easier for me. I've noticed a trend anytime I look up BASCOM everything tends to be written and commented from another country and another language.
so food for thought am I the one of the only people in the United States that uses this compiler? just curious if there's anybody else that uses it from this country |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Tue Dec 09, 2014 4:36 pm Post subject: |
|
|
I can confirm you are not the only one. But... not everyone takes/has the time to share code. Many users use for profession and they have no time or interest to share their work. But obvious this differs per country.
I would say : it is good to learn english but it also does not harm to learn some other languages especially when google can help to translate so good. _________________ Mark |
|
Back to top |
|
|
peterfido
Joined: 29 Mar 2007 Posts: 25
|
Posted: Thu Dec 25, 2014 6:18 pm Post subject: |
|
|
In Germany are some People who programmed code for the WS2812B. There is a Rainbow-Lib from Galahat and a include-File from me based on code from tschoeatsch. We three are users from the german Bascom Forum. http://www.bascomforum.de/
The Lib from Galahat is faster and smaller than my Include File. On the other Side can my Include call WS2801 too. Both are incompatible so that can not code simply changed to the other.
The minimum frequency for WS2012B is 8MHz. I use > 14 to 20 MHz. So can one single AVR make more than control the WS2012B. ( WS2801, clock with timer, two UARTS for connectiong to another AVR which is the wireless control Receiver and on the second is a Raspberry Pi for Web-Interface and Internetradio. _________________ Greetings
Peterfido
BASCOM 2.0.7.7 |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Thu Dec 25, 2014 6:27 pm Post subject: |
|
|
I am having a hard time find it on your forum? Probably because things are getting broken in translation as I cant read any german, and I am using google translate. |
|
Back to top |
|
|
peterfido
Joined: 29 Mar 2007 Posts: 25
|
Posted: Thu Dec 25, 2014 8:08 pm Post subject: |
|
|
Galahats Lib is on http://bascomforum.de/
My Code is in this Topic: http://www.bascomforum.de/
In this Topic tschoeatsch has some you-tube video which demonstrates the Code.
On Feedback i think that the most people use Galahats Code. There is only few Feedback to my Code...
You see: My english is not so good. Often i must read in english pages an translate to german. _________________ Greetings
Peterfido
BASCOM 2.0.7.7 |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Fri Dec 26, 2014 1:29 am Post subject: |
|
|
I cant register, the security questions arnt translating properly. |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Fri Dec 26, 2014 1:41 am Post subject: |
|
|
Nevermind, I got it. |
|
Back to top |
|
|
Ross_ValuSoft
Joined: 20 Nov 2005 Posts: 275 Location: Melbourne, Australia
|
Posted: Fri Dec 26, 2014 1:44 pm Post subject: |
|
|
Well I tried for 20 minutes to register and gave up in disgust!
Not a happy camper... despite it being Christmas Maybe I will try again next year.
Ross _________________ Ross McKenzie
Melbourne Australia |
|
Back to top |
|
|
peterfido
Joined: 29 Mar 2007 Posts: 25
|
Posted: Fri Dec 26, 2014 3:34 pm Post subject: |
|
|
Ah - the Random Question (Zufällige Frage) could be difficult. Try F5 or Refresh the page manually til the Question is easier. Sometimes there are more words to one word combinated (f.e. dreimalsechs means drei mal sechs = three (drei, 3) multiplicated (mal, x) with six (sechs, 6) = 3 x 6 > The Answer ist 18 or achtzehn) . _________________ Greetings
Peterfido
BASCOM 2.0.7.7 |
|
Back to top |
|
|
techknight
Joined: 21 Apr 2008 Posts: 231
|
Posted: Sat Dec 27, 2014 5:58 pm Post subject: |
|
|
Well if people are having difficulty, I will post the files here:
Now, There doesnt appear to be timing information for 18.432Mhz, so I think i might add it, or just use a different crystal speed. It would be nice though if the ASM routines had some sort of autocalculated delay based off of the compiled crystal speed.
But whatever works. |
|
Back to top |
|
|
Ross_ValuSoft
Joined: 20 Nov 2005 Posts: 275 Location: Melbourne, Australia
|
Posted: Thu Jan 01, 2015 5:34 am Post subject: |
|
|
Thank you Peter and TechKnight.
Happy New Year.
Ross _________________ Ross McKenzie
Melbourne Australia |
|
Back to top |
|
|
|