Awesome Contents

Understanding Left & Right Aligned Waveforms

Understanding Left & Right Aligned Waveforms ⚠ Click here to regain focus ⚠
?
?

Keyboard Navigation

Global Keys

W, A, P / S, D, N Jump to previous / next marker
z Toggle filter mode V Revert filter to original state

Menu toggling

q Quotes r References f Filter c Credits

Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Credits Menu

Enter Open URL (in new tab)
0:07Recap and set the stage for the day
0:07Recap and set the stage for the day
0:07Recap and set the stage for the day
0:27luismarques83 Hello!
0:27luismarques83 Hello!
0:27luismarques83 Hello!
0:58Consult Megan's explanation of the PWM code1 in conjunction with the documentation2
0:58Consult Megan's explanation of the PWM code1 in conjunction with the documentation2
0:58Consult Megan's explanation of the PWM code1 in conjunction with the documentation2
4:09Determine to experiment with the code, with a view to understanding the PWM better
4:09Determine to experiment with the code, with a view to understanding the PWM better
4:09Determine to experiment with the code, with a view to understanding the PWM better
4:33luismarques83 I had never seen a right-aligned diagram, I think. Weird
4:33luismarques83 I had never seen a right-aligned diagram, I think. Weird
4:33luismarques83 I had never seen a right-aligned diagram, I think. Weird
5:50luismarques83 Ah, it's not the diagram, it's the PWM in the device
5:50luismarques83 Ah, it's not the diagram, it's the PWM in the device
5:50luismarques83 Ah, it's not the diagram, it's the PWM in the device
6:02Try to enable only the green LED to light up
6:02Try to enable only the green LED to light up
6:02Try to enable only the green LED to light up
7:55luismarques83 When you said there were some modes where it was "center aligned", I thought that in the diagram the time flowed from left to right as usual ("left aligned"), and therefore the unexpected transitions had to do with the behavior of the PWM in the device, and not an issue in the documentation diagrams
7:55luismarques83 When you said there were some modes where it was "center aligned", I thought that in the diagram the time flowed from left to right as usual ("left aligned"), and therefore the unexpected transitions had to do with the behavior of the PWM in the device, and not an issue in the documentation diagrams
7:55luismarques83 When you said there were some modes where it was "center aligned", I thought that in the diagram the time flowed from left to right as usual ("left aligned"), and therefore the unexpected transitions had to do with the behavior of the PWM in the device, and not an issue in the documentation diagrams
9:28luismarques83 I think you are assuming correctly
9:28luismarques83 I think you are assuming correctly
9:28luismarques83 I think you are assuming correctly
9:36Try setting G to 0x0 in order to keep the LED at a constant brightness
9:36Try setting G to 0x0 in order to keep the LED at a constant brightness
9:36Try setting G to 0x0 in order to keep the LED at a constant brightness
12:42Upload out program, run it, and do not see a light
12:42Upload out program, run it, and do not see a light
12:42Upload out program, run it, and do not see a light
13:45Change G to 0xFF and run
13:45Change G to 0xFF and run
13:45Change G to 0xFF and run
15:13Run and now see the green light
15:13Run and now see the green light
15:13Run and now see the green light
15:41Set G back to 0x0 and invert the output
15:41Set G back to 0x0 and invert the output
15:41Set G back to 0x0 and invert the output
16:19Run and see a fully bright green light, as a right-aligned waveform3
16:19Run and see a fully bright green light, as a right-aligned waveform3
16:19Run and see a fully bright green light, as a right-aligned waveform3
17:17Set G to 0xFFFF, run it and see that the LED is off, as expected
17:17Set G to 0xFFFF, run it and see that the LED is off, as expected
17:17Set G to 0xFFFF, run it and see that the LED is off, as expected
18:00Experiment with generating a centre-aligned waveform
18:00Experiment with generating a centre-aligned waveform
18:00Experiment with generating a centre-aligned waveform
19:46Run and see it lit up, with G = 0xFFFF
19:46Run and see it lit up, with G = 0xFFFF
19:46Run and see it lit up, with G = 0xFFFF
20:05Note that only the duty cycle matters to us, not the alignment, and describe what the code for Red is doing
20:05Note that only the duty cycle matters to us, not the alignment, and describe what the code for Red is doing
20:05Note that only the duty cycle matters to us, not the alignment, and describe what the code for Red is doing
21:27Try applying to G the code for red
21:27Try applying to G the code for red
21:27Try applying to G the code for red
23:56Read into generating centre-aligned waveforms4
23:56Read into generating centre-aligned waveforms4
23:56Read into generating centre-aligned waveforms4
26:54The mathematics of centre-aligned waveform generation5
26:54The mathematics of centre-aligned waveform generation5
26:54The mathematics of centre-aligned waveform generation5
30:25luismarques83 You mean 7FFF?
30:25luismarques83 You mean 7FFF?
30:25luismarques83 You mean 7FFF?
30:46Counting from 0 → 0x7FFF
30:46Counting from 0 → 0x7FFF
30:46Counting from 0 → 0x7FFF
31:56luismarques83 It depends on what you mean. If it counts until the MSB but not including it then it would be 0x7FFF
31:56luismarques83 It depends on what you mean. If it counts until the MSB but not including it then it would be 0x7FFF
31:56luismarques83 It depends on what you mean. If it counts until the MSB but not including it then it would be 0x7FFF
32:38The values count up until the MSB is set, and then back down6
32:38The values count up until the MSB is set, and then back down6
32:38The values count up until the MSB is set, and then back down6
34:53luismarques83 I'll check the source code for the hardware
34:53luismarques83 I'll check the source code for the hardware
34:53luismarques83 I'll check the source code for the hardware
35:24Read the documentation on PWM Compare Registers7
35:24Read the documentation on PWM Compare Registers7
35:24Read the documentation on PWM Compare Registers7
37:54How n centre-aligns the waveform
37:54How n centre-aligns the waveform
37:54How n centre-aligns the waveform
40:24An example centre-aligned waveform when n is within the range 0 to 0x7FFF
40:24An example centre-aligned waveform when n is within the range 0 to 0x7FFF
40:24An example centre-aligned waveform when n is within the range 0 to 0x7FFF
48:11Determine to understand why the extra << 1 is required
48:11Determine to understand why the extra << 1 is required
48:11Determine to understand why the extra << 1 is required
49:30An example centre-aligned waveform for n >= 0x8000
49:30An example centre-aligned waveform for n >= 0x8000
49:30An example centre-aligned waveform for n >= 0x8000
51:47An example left-aligned waveform for n == 0xFF0
51:47An example left-aligned waveform for n == 0xFF0
51:47An example left-aligned waveform for n == 0xFF0
56:20Set G = 0xFF0
56:20Set G = 0xFF0
56:20Set G = 0xFF0
56:50luismarques83 Our perception of brightness is not linear, so that might explain it
56:50luismarques83 Our perception of brightness is not linear, so that might explain it
56:50luismarques83 Our perception of brightness is not linear, so that might explain it
57:03Upload our program and run it to see that it's not as bright as the full brightness
57:03Upload our program and run it to see that it's not as bright as the full brightness
57:03Upload our program and run it to see that it's not as bright as the full brightness
57:36luismarques83 I can check the actual PWM with my oscilloscope
57:36luismarques83 I can check the actual PWM with my oscilloscope
57:36luismarques83 I can check the actual PWM with my oscilloscope
58:10luismarques83 Okay. Is your code online?
58:10luismarques83 Okay. Is your code online?
58:10luismarques83 Okay. Is your code online?
59:29An example centre-aligned waveform when n == 0xFF0, which << 1 would presumably make brighter
59:29An example centre-aligned waveform when n == 0xFF0, which << 1 would presumably make brighter
59:29An example centre-aligned waveform when n == 0xFF0, which << 1 would presumably make brighter
1:02:56The previous waveform, inverted
1:02:56The previous waveform, inverted
1:02:56The previous waveform, inverted
1:03:47Review our newfound understanding with a request to luismarques83 to tweet the findings
1:03:47Review our newfound understanding with a request to luismarques83 to tweet the findings
1:03:47Review our newfound understanding with a request to luismarques83 to tweet the findings