Save this video free

CE351 lec10 Timer and play music notes

Yiyan Li · 57:09 · Watch on YouTube

CE351 lec10 Timer and play music notes Watch on YouTube →

Overview

Yiyan Li reviews 16-bit Timer1 calculations at a 16 MHz clock, showing how prescalers, starting counts, and overflow determine elapsed time and counter values. He then explains a music-note program that uses active-low buttons, precomputed half-period counts, and Timer1 registers to toggle a speaker output, contrasting delay-based playback with a timer-based approach.

Key takeaways

Chapters

0:00 Course Plan and Timer Quiz Preparation
1:17 Timer1 Prescalers and 16-Bit Overflow Calculations
8:30 Elapsed Time, Rollover, and Counter Values
20:06 Timer Exercises, In-Class Work, and a Brief Break
27:32 Designing the Button-Controlled Music Demo
29:23 Speaker Frequencies, Note Cycling, and PWM Duty Cycle
34:16 Setting Timer1 Mode, Clock Source, and Initial Count
42:44 Precomputed Note Counts and Prescaler Tradeoffs
47:01 Active-Low Buttons and Pull-Up Resistor Choices
51:25 Delay-Based Playback and Note Indexing
55:05 Timer-Based Button Playback Setup

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

Transcript excerpt

0:00 Before we get started, any questions, any concerns or anything? All good. Okay. So, this week, this is the week four already, which is pretty crazy. Uh, so this tutorial number two, we start on Friday about timers, time delays, uh, count counters. Um, the first uh tutorial about that will be finished on Wednesday this week. and then uh followed by a quiz on timers. So look at your inlex number three right so there are a lot of exercise on counter calculation timer calculations expect a short one short quiz on on timers on Wednesday okay and on Friday we'll start a new tutorial um it's about interrupts

0:48 and next week uh Monday Monday Wednesday I have to go to Denver for for a trip grant meeting uh and so we won't have any classes over there so you guys will just work on homework five we'll start a neutral show on on Friday. Um, so there are there are a lot of tasks over there. So keep working on that one. Um, and Friday next week we'll wrap it up and give you guys in class number five. So that's the plan for this next week. Okay. So if you take a look at the in class number three where we were at last time, we were at one of the problems at the bottom of the first page, right? here. Okay. So the major idea here is that um

1:38 you have all the units and you convert you just to write down the units of the uh the count number counts clearly and then you see if you're is asking for counts number counts or asking for a time then you can decide which operation do you need is a division or a multiplication. Okay so these are all

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

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.