R rakeshbedi New Member Jun 11, 2012 #1 if i use the pin 12 for my analog input, where will i receive my digital output in AT89C2051.
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 11, 2012 #2 This chip ONLY has a comparator... no ADC.
R rakeshbedi New Member Jun 11, 2012 #3 then after comparing the analog input, what will be the output.
R rakeshbedi New Member Jun 11, 2012 #4 can you please explain to me briefly the working of this comparator...
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 12, 2012 #5 A comparator measures one voltage against another... The result is either true or false. CMCON register... ____________________________________________________ | C2OUT | C1OUT | C2INV | C1INV | CIS | CM2 | CM1 | CM0 | C2OUT and C1OUT are the conditions You can invert the out puts as well. Last edited: Jun 12, 2012
A comparator measures one voltage against another... The result is either true or false. CMCON register... ____________________________________________________ | C2OUT | C1OUT | C2INV | C1INV | CIS | CM2 | CM1 | CM0 | C2OUT and C1OUT are the conditions You can invert the out puts as well.
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 13, 2012 #7 Sorry............ I have given you the answer for a PIC..... I MUST be going mad The output of the comparator on the at89c2051 is hard wired to P3.6 (as there is no physical pin, the pin IS readable from within ) So P1.0 and P1.1 are the inputs and you read P3.6 for your answer....
Sorry............ I have given you the answer for a PIC..... I MUST be going mad The output of the comparator on the at89c2051 is hard wired to P3.6 (as there is no physical pin, the pin IS readable from within ) So P1.0 and P1.1 are the inputs and you read P3.6 for your answer....
Ian Rogers User Extraordinaire Forum Supporter Most Helpful Member Jun 14, 2012 #9 rakeshbedi said: then the output wiil be serial digital output, right??? Click to expand... Its a single bit... P3.6... its either high or low depending on the outcome of the comparator..... Are you looking to read a voltage on the AN1 pin? Because as I said in post #2, this device wont read analogue signals... It has no ADC.
rakeshbedi said: then the output wiil be serial digital output, right??? Click to expand... Its a single bit... P3.6... its either high or low depending on the outcome of the comparator..... Are you looking to read a voltage on the AN1 pin? Because as I said in post #2, this device wont read analogue signals... It has no ADC.
R rakeshbedi New Member Jun 14, 2012 #10 ok now i get it, it will just compare with the reference voltage and give the result in P3.6 either 0 or 1.thank u, now i have got a clear picture.
ok now i get it, it will just compare with the reference voltage and give the result in P3.6 either 0 or 1.thank u, now i have got a clear picture.