(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[User:Guru|Guru]] ([[User talk:Guru|talk]]) 20:00, 17 November 2015 (IST)
 
----
 
 
[[Category:AVR Tutorials]]
 
[[Category:AVR Tutorials]]
<html>
 
<title>The Rock (1996)</title>
 
<meta property="og:title" content="The Rock" />
 
<meta property="og:type" content="video.movie" />
 
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
 
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
 
</html>
 
 
 
=Objective=
 
 
After blinking the leds and Controlling them using switches, its time to make some noise using the buzzer. In the first part of the tutorial, we will beep the buzzer with a delay of 1sec. At the end we will control the buzzer using a switch.
 
After blinking the leds and Controlling them using switches, its time to make some noise using the buzzer. In the first part of the tutorial, we will beep the buzzer with a delay of 1sec. At the end we will control the buzzer using a switch.
 +
[[File:0 AVR Buzzer.JPG]]
  
 
=Register Configuration =
 
=Register Configuration =
Line 40: Line 29:
  
  
=Switch Buzzer Code=
+
=Switch And Buzzer Code=
 
Below points needs to be considered for this example.
 
Below points needs to be considered for this example.
 
* Include the io.h file as it has the definitions for all the PORT registers.
 
* Include the io.h file as it has the definitions for all the PORT registers.
Line 52: Line 41:
 
=Wiring diagram=
 
=Wiring diagram=
 
<html><img src ="https://www.exploreembedded.com/blog/wp-content/uploads/img-collections/fritzing-tutorials_de69ccc2/buzzer_bb.png" width="670 px"></html>
 
<html><img src ="https://www.exploreembedded.com/blog/wp-content/uploads/img-collections/fritzing-tutorials_de69ccc2/buzzer_bb.png" width="670 px"></html>
 +
 +
 +
 +
 +
 +
=Explore Ultra AVR Dev Kit=
 +
The Explore Ultra AVR Kit comes with all the things required, not just for this experiment but for the entire series. And even if you think of migrating to PIC or Arduino, you'll have breakout boards that fit on to this, hence we believe it is a great investment for learning hands on Embedded Systems. The kit is fully open source, you may use the schematics, the design files and all of the source code and build something cool on your own. And when you do that do not forget to share with us what you've done. We would be happy to see you building something cool.
 +
<html>
 +
<ul>
 +
<li>Explore Ultra AVR Dev Kit: <a https://www.exploreembedded.com/product/Explore%20Ultra%20AVR%20Dev%20Kit> Buy from EE Store </a></li>
 +
<a href="https://www.exploreembedded.com/product/Explore%20Ultra%20AVR%20Dev%20Kit">
 +
<img src ="https://www.exploreembedded.com/blog/wp-content/uploads/img-collections/explore-avr-pic-kit/1-dsc03897.jpg" width="480 px">
 +
</a>
 +
</ul>
 +
</html>
 +
  
  
 
=Video Tutorial=
 
=Video Tutorial=
 +
For those of you, who would like to watch instead of read we have made a video with all the gyan.
 +
<br>
 +
{{#ev:youtubehd|-lNAmSNV2-Q|640}}
 +
 +
 +
= Downloads=
 +
Download the complete project folder from the below link:
 +
https://github.com/ExploreEmbedded/ATmega32_ExploreUltraAvrDevKit/archive/master.zip<br>
 +
 +
 +
 +
Have a opinion, suggestion , question or feedback about the article let it out here!
 +
{{DISQUS}}

Latest revision as of 11:31, 19 April 2016

After blinking the leds and Controlling them using switches, its time to make some noise using the buzzer. In the first part of the tutorial, we will beep the buzzer with a delay of 1sec. At the end we will control the buzzer using a switch. 0 AVR Buzzer.JPG

Register Configuration

Please refer the below tutorial for basics of GPIO register configuration.



Buzzer Beep Code

Below points needs to be considered for this example.

  • Include the io.h file as it has the definitions for all the PORT registers.
  • Include delay.h file to use the delay functions.
  • Configure the PORT as Output before writing any data to PORT pins.
  • Turn ON and OFF the buzzer with a delay of 1sec.



Switch And Buzzer Code

Below points needs to be considered for this example.

  • Include the io.h file as it has the definitions for all the PORT registers.
  • Configure PORTA as inputs to read the switch status.
  • Configure the PORTC as Output to turn ON/OFF the Buzzer.
  • Continuously read the switch status and control the buzzer accordingly.

Wiring diagram



Explore Ultra AVR Dev Kit

The Explore Ultra AVR Kit comes with all the things required, not just for this experiment but for the entire series. And even if you think of migrating to PIC or Arduino, you'll have breakout boards that fit on to this, hence we believe it is a great investment for learning hands on Embedded Systems. The kit is fully open source, you may use the schematics, the design files and all of the source code and build something cool on your own. And when you do that do not forget to share with us what you've done. We would be happy to see you building something cool.


Video Tutorial

For those of you, who would like to watch instead of read we have made a video with all the gyan.


Downloads

Download the complete project folder from the below link: https://github.com/ExploreEmbedded/ATmega32_ExploreUltraAvrDevKit/archive/master.zip


Have a opinion, suggestion , question or feedback about the article let it out here!