In this circuit we will display Hexadecimal numbers i.e 1,2,3,4,5,6,7,8,9,A,B,C,D,E,F in a 7 segment display.
I used a simple C program to give the desired output when an input is given.
Here is the code of that program
7segment.c.
We should generate a hex file from the above program and put it into any microcontroller of 8051 family.
The input must be given in the form of binary number of the respective hexadecimal numbes in the logic devices connected.
If use a common anode 7 segment display everything will remain same but we use a 'ULN2803' mc which acts as a NOT gate means if you ON one of the terminal of the mc the opposite terminal will be grounded. That circuit is also given below.The c code will be remain same in both.
|
Table for input and output generated and their hexadecimal code |
|
circuit using 8051 micro controller(common cathode) |
|
circuit using 8051 micro controller(common anode)
|
No comments:
Post a Comment