written 5.9 years ago by | • modified 2.9 years ago |
Mumbai University > Electronics Engineering > Sem 6 > Embedded System and RTOS
written 5.9 years ago by | • modified 2.9 years ago |
Mumbai University > Electronics Engineering > Sem 6 > Embedded System and RTOS
written 5.9 years ago by |
Interfacing a common cathode 7 segment display to 8051 microcontroller and displaying 0 to 9 continuously in a loop
Hardware description: -
The clock input is provided to the microcontroller through the 12MHz quartz crystal. The quartz crystal along with capacitors C1 and C2 and the internal oscillatory circuit generate necessary unipolar square wave signals required for clocking the microcontroller.
The SW1, C3 and R8 form the reset circuit. This circuit can be reset manually or it resets automatically when the power is applied.
Hardware and software integration: -
The display can be driven by making the pins corresponding to the segment HIGH. As the correct pins are pulled HIGH a meaningful display of any number from 0 to 9 can be obtained. Following signals need to be generated by the controller’s firmware.
|Decimal No. |gP0.6 |fP0.5 |eP0.4 |dP0.3 |cP0.2 |bP0.1 |aP0.0 |Hex Value|
|-|-|-|-|-|-|-|
|0 |0 |1 |1 |1 |1 |1 |1 |0x3F|
|1 |0 |0 |0 |0 |1 |1 |0 |0x06|
|2 |1 |0 |1 |1 |0 |1 |1 |0x5A|
|3 |1 |0 |0 |1 |1 |1 |1 |0x4F|
|4 |1 |1 |0 |0 |1 |1 |0 |0x66|
|5 |1 |1 |0 |1 |1 |0 |1 |0x6D|
|6 |1 |1 |1 |1 |1 |0 |0 |0x7C|
|7 |0 |0 |0 |0 |1 |1 |1 |0x07|
|8 |1 |1 |1 |1 |1 |1 |1 |0xFF|
|9 |1 |1 |0 |0 |1 |1 |1 |0x67|
Software Description: -