You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I said in the other ticket - this is not supported yet, there is already a ticket (which you just commented on) tracking supporting compiling outside of the arduino environment.
Also, as mentioned on the other ticket, you can ask on the g+ community where some users have hacked something together that works, but is not supported.
I don't know why but even the threepixeldemo.c and WS2811.h from Alan doesn't seem to work properly. I compiled the project using Atmel Studio 6.1 and flashed the .hex using FLIP.
When I put the 5V to the LED Strip (leaving ATmega32u2 at my Notebook -> USB) LEDs lit up once, if I disconnect the 5V from Strip and reinsert it seems the next color is lit up.
But it doesn't loop, just if I put the 5V back. Is this maybe a Fuse error?
Hmmm - that’s a tough one - and unfortunately, I haven’t done much work with raw setups. It is also possible there might be a slight problem with the strip that you have - but i’m not sure either. Any chance that you have an arduino board handy that you can do a quick test with using the FastLED code, just to verify that your strip is ok?
Yes, the code should start when the atmega is given 5v - as to the other problems - you're working in a tool chain that i don't support, or have any experience working with yet - so, I think you would be better off asking in the g+ group (http://fastled.io/+) and see if any one on there has any advice for getting things working with atmel studio or avr-g++ directly. I suppose it is possible that you have a bad stick, i'd say try doing some other programs and see what's happening - you can use Serial to write output and use a serial monitor to see if your program is running and writing things out to the serial port.
So I'll try to get the teensy 3.0.
is it working fluently with 3.0 and how will i have to flash?
i will have to search for a HCT to get TxD working at 3,3v to RPi RxD too right?
Thanks a lot for the help.
Thank You for the post.
Here's something I found on a Wiki on the web:
All ATmega, AT90CAN and AT90PWM have a multiplicator on board, which can process 8 x 8-Bit multiplications in just 2 clockcycles.
My stick has USB support and 16Mhz Quarz on board.
Another Wiki says theres no hardware multiplier, I guess You are right ^^
Maybe You get to have a look this weekend, would be great :)
Do you have a link for that? I was surprised about the 32u2 myself, which means I might be wrong -- but on the other hand, the compiler IS saying that MUL is unavailable, so who knows!?!
Hey look at that: no MUL on atmega32u2.
Ok. Now we know what to fix. Thanks for the supporting evidence! I'll take a look at the code over the weekend for a fix.
It makes the code larger and slower -- which can affect realtime functions like FastLED.
If you program only in C/C++, you probably don't care or notice. But if you program in assembly language (much of FastLED is programmed in assembly language), you have to write and maintain two versions of your code: with MUL and without. We already do this. The problem you're seeing is that it's trying to use the MUL version on a chip that has no MUL. We just need to force it to recognize this oddball atmega that doesn't have MUL; all the other ATmegas have it.
this is what i thought, that it will affect the speed of the code. wouldn't it be easier to implement the ws2811.h which works in an minimus32 as it is mega32u2 too? just something i was thinking about.
We also do a lot more than ws2811.h, including arbitrary rgb reordering and inline, 0 extra overhead brightness scaling (and will be doing more, soon). So using ws2811.h isn't even on the radar.
Activity
focalintent commentedon Feb 6, 2014
As I said in the other ticket - this is not supported yet, there is already a ticket (which you just commented on) tracking supporting compiling outside of the arduino environment.
focalintent commentedon Feb 6, 2014
Also, as mentioned on the other ticket, you can ask on the g+ community where some users have hacked something together that works, but is not supported.
mYreme commentedon Feb 6, 2014
Already searched the complete G+ Communities, there's nothing about 32u2 and WS2812B.
But thank You anway...
focalintent commentedon Feb 6, 2014
https://plus.google.com/106133687591204787878/posts/GXjwo4cojTC is where someone mentions getting the code to build without the arduino environments. However, there's a second issue here as well - which is that the ATmega32U2 is not a currently supported chipset (I was confusing that with the ATmega32U4, which is what is used in the Leonardo, which is supported in the library).
Once you take care of the issue with building without the arduino environments by searching for the line:
#elif defined(AVR_ATmega32U4)
in the file fastpin.h (or, if you're using the 2.1 branch, fastpin_avr.h) and changing it to:
#elif defined(AVR_ATmega32U4) || defined(AVR_ATmega32U2)
(this is what I get for answering issues off of the phone). I would suggest spending some time working on building via the arduino environment instead of avr-g++ directly and testing/shaking out the ATmega32U2 issues there - http://www.mattairtech.com/index.php/development-boards/atmega32u2-usb-development-board-arduino-compatible.html has a modified arduino environment for building for the ATmega32U2.
mYreme commentedon Feb 6, 2014
I don't know why but even the threepixeldemo.c and WS2811.h from Alan doesn't seem to work properly. I compiled the project using Atmel Studio 6.1 and flashed the .hex using FLIP.
When I put the 5V to the LED Strip (leaving ATmega32u2 at my Notebook -> USB) LEDs lit up once, if I disconnect the 5V from Strip and reinsert it seems the next color is lit up.
But it doesn't loop, just if I put the 5V back. Is this maybe a Fuse error?
focalintent commentedon Feb 6, 2014
Hmmm - that’s a tough one - and unfortunately, I haven’t done much work with raw setups. It is also possible there might be a slight problem with the strip that you have - but i’m not sure either. Any chance that you have an arduino board handy that you can do a quick test with using the FastLED code, just to verify that your strip is ok?
mYreme commentedon Feb 6, 2014
Hmm, maybe its because I got WS2812B :/ ?
And no, got no arduino handy to try. Just an Xilinx but without QUARZ
Thats the strip I bought: http://www.aliexpress.com/item/Free-shipping-dc-5v-4m-240-leds-60-pixel-m-5050-smd-rgb-ws2812b-ws2811-led/1519096378.html
Seems to be WS2811 though?
mYreme commentedon Feb 6, 2014
Is it possible that I am used to have the 400Khz Strip type?
focalintent commentedon Feb 6, 2014
The library supports all the variations - including the 400khz one - I don't have a quick lookup for the chipset name in the code but I can grab it.
--Dg (on mobile phone, pardon terseness and typos)
mYreme commentedon Feb 6, 2014
the problem is i cant verify if the .hex created by Atmel Studio is corrupt or not. FLIP just programs and verify passed too. The ATmega32u2 I have is this one: http://re.reworld.eu/de/produkte/avrstick/index.htm
Maybe the stick just doesn't work?
Usually if the 5v is supported to the atmega the code should start or not? so would it be possible for me to test with a multimeter if portb pin0 toggles? just to prove the atmega is working :/
EDIT seems like communication is not working properly. portd pin2 always 4,94v and portb pin0 between 0,6-0,7 sooo huh i dont know :S
focalintent commentedon Feb 6, 2014
Yes, the code should start when the atmega is given 5v - as to the other problems - you're working in a tool chain that i don't support, or have any experience working with yet - so, I think you would be better off asking in the g+ group (http://fastled.io/+) and see if any one on there has any advice for getting things working with atmel studio or avr-g++ directly. I suppose it is possible that you have a bad stick, i'd say try doing some other programs and see what's happening - you can use Serial to write output and use a serial monitor to see if your program is running and writing things out to the serial port.
mYreme commentedon Feb 7, 2014
So I'm giving up on this with my ATmega, tried all night but doesn't seem it runs the Code.
Will teensy 3.0 or 3.1 will work? as i have each in the company i guess, maybe i can try it and than order one.
focalintent commentedon Feb 7, 2014
There's teensy 3 support, I haven't had a chance to finish teensy 3.1 yet.
--Dg (on mobile phone, pardon terseness and typos)
mYreme commentedon Feb 7, 2014
So I'll try to get the teensy 3.0.
is it working fluently with 3.0 and how will i have to flash?
i will have to search for a HCT to get TxD working at 3,3v to RPi RxD too right?
Thanks a lot for the help.
5 remaining items
mYreme commentedon Feb 15, 2014
Thank You for the post.
Here's something I found on a Wiki on the web:
All ATmega, AT90CAN and AT90PWM have a multiplicator on board, which can process 8 x 8-Bit multiplications in just 2 clockcycles.
My stick has USB support and 16Mhz Quarz on board.
Another Wiki says theres no hardware multiplier, I guess You are right ^^
Maybe You get to have a look this weekend, would be great :)
kriegsman commentedon Feb 15, 2014
Do you have a link for that? I was surprised about the 32u2 myself, which means I might be wrong -- but on the other hand, the compiler IS saying that MUL is unavailable, so who knows!?!
mYreme commentedon Feb 15, 2014
First I found an excel sheet: http://abload.de/img/32u2_mulqckkk.png
And then I found this site: http://translate.google.com/translate?hl=de&sl=de&tl=en&u=http%3A%2F%2Fwww.avr-asm-tutorial.net%2Favr_de%2Frechnen%2Fhardmult.html
kriegsman commentedon Feb 15, 2014
Hey look at that: no MUL on atmega32u2.
Ok. Now we know what to fix. Thanks for the supporting evidence! I'll take a look at the code over the weekend for a fix.
mYreme commentedon Feb 16, 2014
So it has no MUL what would this mean to the code? Extra corrections for multiplying by code?
kriegsman commentedon Feb 16, 2014
It makes the code larger and slower -- which can affect realtime functions like FastLED.
If you program only in C/C++, you probably don't care or notice. But if you program in assembly language (much of FastLED is programmed in assembly language), you have to write and maintain two versions of your code: with MUL and without. We already do this. The problem you're seeing is that it's trying to use the MUL version on a chip that has no MUL. We just need to force it to recognize this oddball atmega that doesn't have MUL; all the other ATmegas have it.
mYreme commentedon Feb 16, 2014
this is what i thought, that it will affect the speed of the code. wouldn't it be easier to implement the ws2811.h which works in an minimus32 as it is mega32u2 too? just something i was thinking about.
kriegsman commentedon Feb 16, 2014
We already have good no-MUL code that's works, just need to turn it on for this particular chip.
Patience :)
mYreme commentedon Feb 16, 2014
Was just a thought :-) i'll be patient :D
focalintent commentedon Feb 16, 2014
We also do a lot more than ws2811.h, including arbitrary rgb reordering and inline, 0 extra overhead brightness scaling (and will be doing more, soon). So using ws2811.h isn't even on the radar.
mYreme commentedon Feb 17, 2014
please don't take offence, i reall appreciate the work you're doing here. i am just trying to figure out how and why things work and don't :)
i also included a pinlibrary for the mega32u2 too in the fastpin.h
#elif defined(AVR_ATmega8U2)
|| defined(AVR_ATmega16U2)
|| defined(AVR_ATmega32U2)
#include "mega32u2pins.h"
so this seems to work but i cant compile
refactor(fl::string): drop StrN<N> template, make basic_string the pu…
refactor(fl::string): drop StrN<N> template, make basic_string …