Wednesday, 16 October 2013


Here we had made use of 7 segment common cathode display for the Interfacing. Along with the Atmega16.
Simulation work is done in Proteus Software.
Header file: avr is providing its own header filr "avr/io.h"
                  for using delay in the avr , we had used util/delay.h
This header file can provide the delay in milli and micro seconds.




/*
 * DAY1QUE1.c
 *
 * Created: 10/15/13 17:00:24

 *  Author: Raj
 */


#include <avr/io.h>
#include <util/delay.h>

char ssd[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; // Hexadecimal values for the 7 Segment display generated by the look up table

int main(void)
{
char i=0;
DDRA=0XFF;
    while(1)
    {

for (i=0;i<=9;i++)
{
PORTA=ssd[i];
_delay_ms(500); // delay of 500ms.
PORTA=0;
_delay_ms(500);
}
     
  }
}


AVR studio 6 


Simulation in Proteus:



























for video CLICK HERE......








0 comments:

Post a Comment

Blogroll

Copyright © 2013 RAJ PRAJAPATI (raj@electronicsrj.com)

Comments

About Projects

We also Provide support in making Electronics Projects at different level at Cheapest price. Contact Us for the further help.