Can you spot the difference?

web PSoC4 WS2812B Photo 1.jpgweb PSoC4 WS2812B Photo 2.jpg

 

All previous articles for the exception of my first article seem totally unrelated to my Very Compact Christmas Display but nothing could be further from the truth.

A hint is provided in the two above photos. Can you spot them?

 

Yeah, in one photo there is a PSoC 4 Pioneer Kit and LED panel in the other there are two PSoC 4 Pioneer Kits and the same LED panel.

So what....

 

Oh, there are two LEDS lit in the first photo and there is one LED lit in the other.

So what....

 

Go on. Have an even closer look.

Oh, the character LCD Module has some numbers on it.

So what....

 

This all seems seem exceedingly ho hum but to me it is a major milestone.

Well what the blazes is it?

 

Well it's not the first PSoC 4 Pioneer Kit driving WS281x LEDs. This is was accomplished in project #100 of the 100 projects in 100 days series..

PSoC 4 Pioneer Kit Community Project#100 – PSoC 4 Times Square LED Billboard

Therefore it's got to do with something about the second PSoC 4 Pioneer Kit.

 

Maybe, the second PSoC 4 Pioneer Kit is could be emulating one of the WS281x LEDs?

Big deal! - You've just bit bashed or banged it. Ho hum!

 

Big deal - Yes. Bit bashed - No!

If you can bit bash this on a normal Arduino or other non-PSoC platform with a low speed microcontroller running at 24MHz or less please show me how just using C and no inline assembly code.

Please tell me how. I may have overlooked something obvious and I'd really like to know.

There's also something else that's interesting with the photos. Can you spot it?

 

Well there's no additional parts on the PSoC 4 Pioneer kit assisting the WS281x LED emulation.

What? Wait a sec... Then how's the LED protocol passed through to the next LED?.. Surely not...

 

Surely Yes. The PSoC4 is doing all of the work emulating a World Semi WS2812B LED alone without requiring any additional components.

It's my latest invention and it opens up a huge horizon of capabilities.

I am now in a position to place a PSoC 4 within a chain of WS2812B LEDs and have it do other functions than just being an RGB LED.

Combined with a PSoC 4's low price point and functionality it is surely a winner!

 

The WS2812B fast speed protocol deals with pulse durations as short as 350 nanoseconds and cycle times of 1.250 microseconds. To give you a idea of how fast 350 nanoseconds, it is the access speed of fast Static RAM in the early 1980's.

These specifications doesn't give much time for many microcontroller instructions to execute. To put it into perspective 1.250 microseconds is about 30 clock cycles for a 24MHz microcontroller and 350ns is about 8.4 clock cycles.

This capability is only made possible with the PSoC UDBs (Universal Digital Blocks) and their internal interface to its ARM Microcontroller and other peripherals.

I've accomplished with the limited resources of the PSoC 4. The design fits within its 4 UDBs. (The PSoC 5LP has up to 24 UDBs and many more components types available.)

 

The first photo shows the first PSoC 4 generating data for two WS2812B LEDs.

The second photo shows is the second PSoC 4 connected to the output to the first PSoC 4 decoding the incoming WS2812B protocol input stream, displaying the decoded bytes allocated for the first on the character LCD Display and forwarding all the data for subsequent LEDs. This is why only one WS2812B LED is lit. The PSoC 4 has consumed the data originally for the first LED and processed it for its own use leaving only the data for the second LED being displayed on the immediately downstream LED.

 

For now all I can say that it works and works well.

I'm wrapped!

 

It's December 1st so it's time to put up my other Christmas Lights. May be for the last time.