??? 02/26/06 17:07 Read: times |
#110826 - Advise needed! Responding to: ???'s previous message |
Hello, from previous help I have been able to understand the analog comparator on the 89C2051 better. Now, I had been asked to give analog voltage on the analog pins P1.1(non-inverting) and P1.0(inverting) inputs. I have connected potentiometer on the inverting input and am charging the capacitor on the non-inverting input and am testing the output on P3.6. I start a timer when I begin the charging and stop the charging when P3.6 is set. For this I am checking the status of P3.6 through a while loop. I stop the timer when the P3.6 is set.
sbit test_voltage = P3^6; unsigned int time; TR1=1; while(!test_voltage); TR1=0; time=TH1*256+TL1; TH1=0; TL1=0; I check the timer's count and decide what is the voltage on the capacitor and hence on the potentometer by the equation: Vc=Vcc(1-e(-t/RC)). Am I on the right track? Jack Key. |
Topic | Author | Date |
Analog Comparator on 89C2051 | 01/01/70 00:00 | |
Analog comparator on AT89C2051 | 01/01/70 00:00 | |
Thanks Bert! | 01/01/70 00:00 | |
ADC | 01/01/70 00:00 | |
Analog comparator | 01/01/70 00:00 | |
appnote | 01/01/70 00:00 | |
one misapplication, one addition | 01/01/70 00:00 | |
Thanks to all | 01/01/70 00:00 | |
Printable ? | 01/01/70 00:00 | |
hobby project? | 01/01/70 00:00 | |
Ok | 01/01/70 00:00 | |
Active - hummmm.. | 01/01/70 00:00 | |
Advise needed! | 01/01/70 00:00 | |
Have you seen the appnotes? | 01/01/70 00:00 | |
Yes I have | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
P3.6??? | 01/01/70 00:00 | |
Finally working, maybe? | 01/01/70 00:00 | |
Surely working! | 01/01/70 00:00 | |
consistency, HUH | 01/01/70 00:00 | |
Not technically correct! | 01/01/70 00:00 | |
so, it is "testing" which is worthless | 01/01/70 00:00 | |
True but... | 01/01/70 00:00 | |
No, I do not do as above. | 01/01/70 00:00 | |
Sure | 01/01/70 00:00 | |
"solid theories" vs "testing"![]() | 01/01/70 00:00 |