Some pretty nice colours and some pretty big numbers 🙂
See the assembly language code: http://hastebin.com/xuxoquwinu.vbs
Read about LFSRs: https://en.wikipedia.org/wiki/Linear-feedback_shift_register
The table of maximal length taps I was reading: http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf

By Julian

Youtuber, shed dweller, solar charge controller aficionado

17 thoughts on “Neopixel lfsr update: pseudo random colours”
  1. Avataaar/Circle Created with python_avatars fleshka usb says:

    please update source code. link is not working.

  2. Avataaar/Circle Created with python_avatars Unclerojelio says:

    This is my next project although I'll probably implement using CircuitPython on an Arduino based platform.

  3. Avataaar/Circle Created with python_avatars Stahlfabrik says:

    I think when you would add gamma correction your eyes would perceive even more colors and many more dimmer shades. Especially those dimmer shades.

  4. Avataaar/Circle Created with python_avatars James Myatt says:

    You should combine this with a string of WS2811 for some kick-ass christmas tree lights

  5. Avataaar/Circle Created with python_avatars Juggle4Evr says:

    Where did you find the interesting table with the maximum length taps?

  6. Avataaar/Circle Created with python_avatars Aidan Brown says:

    How much would something like this set me back, I'm wanting to put it In my pc

  7. Avataaar/Circle Created with python_avatars R. Rob says:

    looks nice!
    from where did you get that beautiful light beam,
    and would it also can be driven by Arduino?
    or…..?

    Friendly greetings from the Netherlands!
    Rob.

  8. Avataaar/Circle Created with python_avatars Friendroid says:

    Julian, have you come across those flexible strip potentiometers? Saw them as a part of an arduino project on youtube, traced it back to Sparkfun but surprisingly no ultra cheap chinese version. They would be useful for projects meant to be used by people with limited mobility, besides hobby stuff.

  9. Avataaar/Circle Created with python_avatars andymouse123 says:

    merry Christmas !

  10. Avataaar/Circle Created with python_avatars Karl Ng says:

    Hi Julian,
    Where did you get your PIC Development Board. Can I have the link?
    One last thing, I love your videos.

  11. Avataaar/Circle Created with python_avatars Cornish Miner says:

    I need to make one of those for when the in-laws come for Christmas…

  12. Avataaar/Circle Created with python_avatars devjock says:

    Next up: fading between color values? I think after that, it's time to slap a few potentiometers on some analog inputs to vary rate and fade slope, but yeah, the project looks about done. Nice work dude!

  13. Avataaar/Circle Created with python_avatars arif anwari says:

    That thing will mess with your subconscious if you dare to stare long enough. 🙂

  14. Avataaar/Circle Created with python_avatars bwack says:

    Looking at the lfsr subroutine code on hastebin. After realising it is an external type shift register, things started to click 🙂
    lfsr
    rlf shiftreg_mh,w ;copy/rotate LFSR hi byte to W
    xorwf shiftreg_mh,w ;compare LFSR hi byte with W
    andlw 0x20 ;mask all bits except bit n
    addlw 0xff ;copy bit to Carry flag
    rlf shiftreg_lo,f ;rotate LFSR lo byte (thru C)
    rlf shiftreg_lm,f
    rlf shiftreg_mh,f
    rlf shiftreg_hi,f ;rotate LFSR hi byte
    return

    I think I now understand why you wanted two adjacent taps now. With two adjacent taps you align the taps on top of eachother by rotating the file into w, xor it with the old self, then pick the resulting bit into carry by overflowing the accumulator. That is amusing. I used bit-tests for that. Lol, that is brilliant (the overflow thing).

  15. Avataaar/Circle Created with python_avatars BillyF1289 says:

    Enjoy your videos. Especially the pic stuff, and thanks for the code. Do you have a link for the document you showed? I haven't found it yet with Google.

  16. Avataaar/Circle Created with python_avatars Proluxelectronics says:

    Is ASM fast enough to do a POV display with that type of LED, Apparently not on the Aduino.

  17. Avataaar/Circle Created with python_avatars Andrew Ballard says:

    when you gaze into the neostrip, the neostrip gazes into you.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.