Save this video free

CE351 lec17 PWM pins, TOP, BOTTOM, Mode 14

Yiyan Li · 22:14 · Watch on YouTube

Part of Fort Lewis College CE351. See all 21 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Yiyan Li explains active-low PWM control for LEDs, including how `analogWrite(pin, 255)` turns an LED off and how clearing a compare-output control bit disconnects PWM. The lecture reviews an 8-bit Timer2 preload calculation for a 10 ms interval, then applies 8-bit RGB PWM values and a 10 ms interrupt routine to fade through six colors in sequence.

Key takeaways

Chapters

0:00 Active-Low PWM Control and the Timer2 10 ms Preload
4:29 Timer2 Output-Compare Pins and Active-Low RGB Values
7:46 Six-Color RGB Tour and the Provided Code Template
12:00 Fading with 10 ms Interrupts and 8-Bit Wraparound

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:07 active lower, active high. You know this these are dials, right? LED light emitting dials. The dials got a high voltage on the left and um so for these are the signal pins from the mic controllers. If these pins are high, there's no voltage drop. So the LEDs are off. So when they're low, there's voltage drop and so turn on the LEDs. So they're actually low, right? So when low, you get them to be turned on. And um to simply to simply turn them turn them off, you should give uh uh 255 to the pen using alite. Definitely you can

0:56 you can write you can you can turn off like for example here there's another way to turn it off which is uh here see that's another trick to turn it off. Remember we just turn this bit on right turn this bit on it starts doing this job. If you flip it back to zero, what's going to happen? See, there's a mode 00 normal port operation PM disconnected. So, if you want to turn off PM, you can just directly flip this bit to zero, which is fine. But I think I either way. Okay, you can you can do that or you can you can just do an analog right analog right to the pin and give a 255 to it.

1:52 Questions on that? So you know this function right analog right of that whatever pin, right? And you give a 255 to it. You can turn it off or you could flip that um comp 3 B1 to zero. How to do that though? How to do that? How to flip that bit to zero.

2:57 Will that work? How does this work? Wait. Um, 3B1. Could this clear this fit there? It does. Right. So, what's happening is

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Yiyan Li.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.