Thursday, 10 November 2016

interfacing of 7segment basic

#include <avr/io.h>
 void main()
{
  while (1)
{
    DDRA=0XFF;
{
    PORTA=0X3F;
}
}
}


 


there are two types of 7 segment :

1. Common anode

2. Common cathode

IN 7 segments we are using 7-segment common cathode and colour are own choice.

In this there are some pins:

A, B, C, D, E, F, G and last is dp.

This segment is display 0-9 no. of digits.

In hex form that can be written as:

0= 0x3F

1= 0X06

2 = 0X5B

3= 0X4F

4= 0X66

5= 0X6D

6= 0X7D

7= 0X07

8= 0X7F

9=0X6F

use this hex form and display any no.

No comments:

Post a Comment