Sir, I am using 89c4051 to convert digital to analog. pin 1.0 and 1.1 are used, but I am confused how to us? please help me I don't know anything.
Thank you sir. I have gone through all the details that you have posted. it helped me a lot. Now I came to know the working of 89c4051(comparator). The code which you have posted is in assembly. But I am working on C, could you help me please...
I am using 89c4051 to convert digital to analog. pin 1.0 and 1.1 are used, but I am confused how to us? please help me I don't know anything. since you "don't know anything" why not choose a derivative with a DAC, there are many, instead of "this aged one".
Erik
It is pretty sure that the OP is confused about the message posted.
The pins P1.0 and P1.1 of AT80C4051 are the Analog comparator inputs, this microcontroller does not have an internal ADC or DAC peripheral.
The R/C method described in the Atmel appnote gives an example of how to use about 5pins (including P1.0 and P1.1) to create a 5-8bits of ADC.
For the DAC implementation the SAR example from Intel describes how to build an R/2R ladder to create the DAC section (half of the SAR system).
Another option is to use an external DAC or ADC set up with bit-banged I2C on P1.0 and P1.1 (SDA/SCL)
Too many options with microcontrollers, even for this aged one.
Note the difference between ADC and DAC.
The OP doesn't seem to want to measure any analog signal, but wants to generate an analog signal. If the chip already has a DAC, or PWM, then it doesn't seem meaningful to look at ADC examples.
Did you surfed at Atmel site, looking for ADC examples using the 8051 Analog Comparator ?
" href= "http://www.atmel.com/Images/doc0524.pdf">www.atmel.com/.../doc0524.pdf www.atmel.com/.../CODE_0524.zip
Also an old document of Intel describes a Successive Approximation method wih an R/2R ladder and an external analog comparator. www.mcu4u.eu/.../MSC51-AR526(ADC_Successive_Approximation).pdf
These methods can give a 5-8bits of precision/resolution on the measurement signal. Also some signal conditioning may be neccessary at input.
View all questions in Keil forum