This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help me in DAC using 89c4051

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.

Parents
  • The reference voltage you talk about has to be provided by the microcontroller
    using some pins connected to an R/2R ladder or by an RC single slope or dual slop.

    ladder like this
    upload.wikimedia.org/.../420px-R2r-ladder.png

    each pin of the microcontroller sets a bit of the generated voltage
    ikalogic.cluster006.ovh.net/.../r2r-.jpg

    The output of this the ladder must be connected to P1.0
    (since the unknown input voltage is connected to to P1.1)

    The ladder method requires some more pins of the microcontroller but can
    give good precision and resolution if this occupies 7-10pins.

    The RC ADC method mentionted previously is charging(or discharging) a capacitor up
    to a level where the Analog Comparator gives a signal of the two compared voltages.
    www.atmel.com/.../doc0524.pdf

    The RC method uses only 5 pins and have a medium accuracy, but is easy to build.

    Both methods are about comparing an unknown voltage with a reference voltage
    and when the comparator gives the signal changes state the the unkown voltage
    is equal with the known voltage.

    So the algorithm is a continous loop where the ladder or the RC system is updated
    with new values and wait until the comparator signals the state change.

    The analog comparator has it own interrupt system for Enable, Priority, Flag, Vector.

    "The analog comparator is always disabled during Idle or Power-down modes"
    "The comparator operation is such that the output is a logical “1” when the positive
    input AIN0 (P1.0]) is greater than the negative input AIN1 (P1.1). Otherwise the output
    is a zero. Setting the CEN bit in ACSR enables the comparator."
    www.atmel.com/.../doc3390.pdf

Reply
  • The reference voltage you talk about has to be provided by the microcontroller
    using some pins connected to an R/2R ladder or by an RC single slope or dual slop.

    ladder like this
    upload.wikimedia.org/.../420px-R2r-ladder.png

    each pin of the microcontroller sets a bit of the generated voltage
    ikalogic.cluster006.ovh.net/.../r2r-.jpg

    The output of this the ladder must be connected to P1.0
    (since the unknown input voltage is connected to to P1.1)

    The ladder method requires some more pins of the microcontroller but can
    give good precision and resolution if this occupies 7-10pins.

    The RC ADC method mentionted previously is charging(or discharging) a capacitor up
    to a level where the Analog Comparator gives a signal of the two compared voltages.
    www.atmel.com/.../doc0524.pdf

    The RC method uses only 5 pins and have a medium accuracy, but is easy to build.

    Both methods are about comparing an unknown voltage with a reference voltage
    and when the comparator gives the signal changes state the the unkown voltage
    is equal with the known voltage.

    So the algorithm is a continous loop where the ladder or the RC system is updated
    with new values and wait until the comparator signals the state change.

    The analog comparator has it own interrupt system for Enable, Priority, Flag, Vector.

    "The analog comparator is always disabled during Idle or Power-down modes"
    "The comparator operation is such that the output is a logical “1” when the positive
    input AIN0 (P1.0]) is greater than the negative input AIN1 (P1.1). Otherwise the output
    is a zero. Setting the CEN bit in ACSR enables the comparator."
    www.atmel.com/.../doc3390.pdf

Children