Program to turn ON Buzzer for ATMEGA 8535 AVR MICRO-CONTROLLER

Image

#include<avr/io.h>        //This is the header for AVR Microcontroller.

int main(void)
 {    
    PORTC=0X00;            //PortC initiallization as all bits low.
    DDRC=0X08;            //PortC data direction declaration as out put.
    
    while(1)            //This is for the the infinity loop.
    {    
        PORTC=0x08;     //Turn ON BZ connected on PC3
    }
}

Advertisements

2 thoughts on “Program to turn ON Buzzer for ATMEGA 8535 AVR MICRO-CONTROLLER

    1. prasanna ,

      data deceleration for led we have to use DDRC=0x0F

      bcoz it working in port c 0F=0000 1111

      data deceleration buzzer is DDRC =0x08

      08= 0000 1000

      see Atmega 8535 port configuration in prev post u will get idea..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s