semiconductor
Full Member level 4
I’m trying to display the voltage using 7-segment LED
My input voltage is: 0 25 Volts
This is my idea:
Components involved in this kit are: AD0804 (ADC); uC AT89C51; CD4511B (BCD-to-7seg decoder) and Common-Cathode 7-segment LED
First of all, I apply the input voltage to a divider to fit the input voltage range of the ADC AD0804 (5V). To do this, I extract 5V from 25V by using divider 1:5
Then, the output of this AD0804 (8 bits) is applied to port 0 of AT89C51. I use my software to transform from 8bits to 3 BCD-numbers. This 3 BCD-numbers are then fed to 3 CD4511Bs to decode and display on the LED. (each level of the ADC equals to 0.1 Volt)
Is the above idea is ok?
How can I transform from 8 bits to 3 BCD numbers?
How can I decode the BCD to 7 seg LED using CD4511B (how to connect the pins LE, LT, BI)?
By the way, I would like to ask you a simple question
This program must the to set the pin P0.0 to 0V and P0.1 to 5V but when I use the volt-meter, it is not as expected (pin P0.0 is 0V but P0.1 is 2.0 2.5V). I can not explain why, can you help me!
If you have done something similar, if you can, please share your experience and documents.
Thank you in advance!
My input voltage is: 0 25 Volts
This is my idea:
Components involved in this kit are: AD0804 (ADC); uC AT89C51; CD4511B (BCD-to-7seg decoder) and Common-Cathode 7-segment LED
First of all, I apply the input voltage to a divider to fit the input voltage range of the ADC AD0804 (5V). To do this, I extract 5V from 25V by using divider 1:5
Then, the output of this AD0804 (8 bits) is applied to port 0 of AT89C51. I use my software to transform from 8bits to 3 BCD-numbers. This 3 BCD-numbers are then fed to 3 CD4511Bs to decode and display on the LED. (each level of the ADC equals to 0.1 Volt)
Is the above idea is ok?
How can I transform from 8 bits to 3 BCD numbers?
How can I decode the BCD to 7 seg LED using CD4511B (how to connect the pins LE, LT, BI)?
By the way, I would like to ask you a simple question
This program must the to set the pin P0.0 to 0V and P0.1 to 5V but when I use the volt-meter, it is not as expected (pin P0.0 is 0V but P0.1 is 2.0 2.5V). I can not explain why, can you help me!
Code:
Org 0000
Loop:
Setb P0.1
Clr P0.0
Sjmp Loop
End
If you have done something similar, if you can, please share your experience and documents.
Thank you in advance!