11# Example Chapter09_08a
2+
23## Controlling an RGB LED of type ws2812
34
45Example chapter09_08a utilizes object oriented programming techniques
@@ -18,7 +19,7 @@ color bits is set to the value $1$ or $0$ depending on the
1819half-width of a low/high signal pair.
1920
2021In this example (as in most other examples), both a hardware
21- version for the target system as well as a simlulated PC
22+ version for the target system as well as a simulated PC
2223version are available. For this exercise, it was
2324decided to implement a rather detailed PC simulation
2425using old-school traditional Win32-API programming.
@@ -52,7 +53,7 @@ These very specific mcal/microcontroller-dependent parameters
5253are used to generate the real-time ws2812 control signal.
5354
5455The third template parameter `LedCount` provides the ability
55- to link multiple ws2812 devices seqentially and control them
56+ to link multiple ws2812 devices sequentially and control them
5657in an LED chain, as is common for this particular device.
5758
5859In example chapter09_08a, a ws2812 LED device is used.
@@ -62,7 +63,7 @@ In example chapter09_08a, a ws2812 LED device is used.
6263The RGB-color-light-show in example chapter09_08a (this example)
6364differs slightly from the one in example chapter09_08 (the previous example).
6465
65- In this example the color transitions are a bit lenghtier in time
66+ In this example the color transitions are a bit lengthier in time
6667(instead of the normal $20~\text{ms}$). Also the color transitions
6768at and around the points $255~\text{bits}$-RGB
6869have been lengthened in time. This results in color emphasis
@@ -76,7 +77,7 @@ This enhanced RGB-color-light-show can be found in the file
7677The chapter09_08a Win32-API simulation in its Windows-based
7778application is shown in action in the image below.
7879
79- 
80+ 
8081
8182## Hardware Setup
8283
@@ -85,23 +86,23 @@ ARDUINO(R) placed on a breadboard with soldered-on pins.
8586The wiring is straightforward. The ws2812 port control uses port pin `portd.3`.
8687
8788The hardware setup with the RGB LED in action is pictured
88- in the images below. The pictures show colorful RGB hues eminating
89+ in the images below. The pictures show colorful RGB hues emanating
8990from the bright RGB LED of type ws2812.
9091
91- 
92- 
93- 
92+ 
93+ 
94+ 
9495
9596### Bit Timing: ws2812
9697
9798The approximate bit timing needed by the ws2812 is shown in the following table.
9899
99100| Bit Value | $T_{hi}~\left[{ns}\right]$ | $T_{lo}~\left[{ns}\right]$ |
100- | --------- | --------------- | --------------- |
101- | $0$ | $350$ | $800$ |
102- | $1$ | $700$ | $600$ |
101+ | --------- | -------------------------- | ----------- --------------- |
102+ | $0$ | $350$ | $800$ |
103+ | $1$ | $700$ | $600$ |
103104
104105A sample partial-trace of the control signal on `portd.3` is shown
105- below in a representation of an image from a digital oscilloscpoe .
106+ below in a representation of an image from a digital oscilloscope .
106107
107- 
108+ 
0 commit comments