Save this video free

CE351 lec9 Timer and counter basics

Yiyan Li · 36:12 · Watch on YouTube

CE351 lec9 Timer and counter basics Watch on YouTube →

Overview

Yiyan Li introduces timer and counter fundamentals for an 8-bit microcontroller, connecting accurate speaker tones to timer-controlled digital pin toggling. The lecture explains note frequencies and periods, timer widths and prescalers, and how to use registers such as TCCR1B, TIFR1, and TCNT1H/TCNT1L to configure timing and calculate overflow delays at a 16 MHz clock.

Key takeaways

Chapters

0:00 Course Logistics and the 12-Step Piano Frequency Scale
6:20 Convert Note Frequencies into Periods and Half-Periods
10:10 Generate Speaker Tones by Toggling a Digital Pin
13:05 Compare 8-Bit and 16-Bit Timers at 16 MHz
23:19 Configure Prescalers and Recognize Timer Overflow Flags
30:00 Read the 16-Bit Counter as High and Low Bytes
33:00 Calculate Timer1 Overflow Time from a Preload Value

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

Transcript excerpt

0:11 All right, so this week we'll do tutorial two. This and next week. So, hopefully you can get everything done before Wednesday next week. So, you will start uh handling interrupts, which is the most important topic for using micro horse. That'll be next Friday, okay? And So, the bad news is that today there's a quiz, okay? Good news is this Friday. Weekends. You actually can can can have some break. Um There's a quiz on C programming. I hope you guys already studied the in-class number one. Hopefully, yeah. And I'll make sure that you guys have enough time to work on it. So, make sure that when you write on the paper, you have a a complete code that can run on IDE instead of just

1:00 the pseudo code. Okay. So, you should have an in-class, right? As I put on the desk. And so, today's topic, if you click uh you don't have a laptop you don't have have a laptop. So, I'm just going to show you here. Uh so, in this tutorial you can see it pretty much explains itself. Uh you don't really need to be a a musician you don't have to understand what's going on since I'm not a musician as well. Um so, so basically there's one idea that I think it's good for everyone to know. Do you know if you play music? No? Yeah? A little bit? So, do you understand the semi-tone tone?

1:47 All these kind of things. Um So, the whoever designed the piano, they used the natural uh frequencies of the sound and they divided them into these different uh steps. So, for piano is basically all the 80-something keys are divided into several octaves, and every octave has um 12 different steps or different tones,

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.