Question

Embedded Systems Programming Lab 1. How many wave generation modes are available for ATmega328? Name them....

Embedded Systems Programming Lab
1. How many wave generation modes are available for ATmega328? Name them.
2. What is the relation between two adjacent notes in terms of frequency ratio?
3. What is the standard pitch for the equal temperament?
4. What is the difference between CTC mode and Fast PWM in AVR.
5. Write a function to calculate period for notes. (Take index as an argument for the
function and calculate)
// Start here
Void calculate_period
{
}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) Fast PWM, Phase Corrected PWM and Phase and Frequency Phase Corrected PWM are the different wave generation modes available in ATmega328.

2) for any two adjacent notes the frequency ratio is the same

3)An equal temperament is a a system of tuning, in which the frequency interval between every pair of adjacent notes has the same ratio. The standard pitch is usually 440 Hertz, called A 440.The piano keyboard is the standard example of the equal tempered scale

4)There are three timers in ATmega.

timer0:8 bit

timer1:16 bit

timer3:32 bit

these timers can be operated in normal(timer is cleared after it overflows) mode,CTC(timer is cleared after matching a specified value) and PWM mode

In AVR, PWM( Pulse Width Modulation is a technique by which width of a pulse is varied while keeping the frequency constant ) Mode is available in all timers TIMER0 and TIMER2 provide 8bit accuracy whereas TIMER1 provides 16bit accuracy. In 8bit accuracy, you have 256 individual steps, whereas in 16bit accuracy, you have 65536 steps.

A timer in CTC mode allows us to compare a value which lies in the middle of timer initialization value and timer overflow. When the value of timer and our desired value becomes equal, we can do an action for example turning off an LED

CTC timer interrupts are triggered when the counter reaches a specified value, stored in the compare match register. Once a timer counter reaches this value it will clear (reset to zero) on the next tick of the timer's clock, then it will continue to count up to the compare match value again. By choosing the compare match value and setting the speed at which the timer increments the counter, you can control the frequency of timer interrupts.

Add a comment
Know the answer?
Add Answer to:
Embedded Systems Programming Lab 1. How many wave generation modes are available for ATmega328? Name them....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT