Announcement

Collapse
No announcement yet.

8-bit D/A with PIC12F1822

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 8-bit D/A with PIC12F1822

    Looking to enact a low precision, 8-bit, D to A convertor on a PIC12F1822

  • #2
    The 12F1822 has an on board DAC but it's only 5bits so you can't mean that, right?
    You can achieve 8bits resolution with the old low-pass filtered and buffered PWM approach and the 12F1822 has a CCP module you can use for that. Otherwise it's an external DAC chip interfaced via I2C or SPI or something else.

    EDIT: Or an R2R ladder driven by a shift register...

    /Henrik.

    Comment


    • #3
      Thanks Henrik. Maybe I could use the PWM approach. Was looking at a simple I2C Maxim 8 bit, sor-23-5 chip that could do the job but using the PWM is attractive for this application.

      Comment


      • #4
        Henrik, can you go over why use the CCP module is important since the PWM command is available in PBP. Is it that I would use the CCP pin ('PWM Requirements' means it handles PBP PWM more efficiently)? Or are you saying to use the CCP with assembly?

        Comment


        • #5
          The important point I believe Henrik wanted to make is that PWM (however you create it) can accomplish your goals. You have the option of the CCP modules, some PICs have separate PWM modules, then of course there's software controlled PWM (PBP). Any choice you make should get you there.
          We can crack this cotton PIC'n thang!

          Comment


          • #6
            Originally posted by Henrik Olsson View Post
            The 12F1822 has an on board DAC but it's only 5bits so you can't mean that, right?
            You can achieve 8bits resolution with the old low-pass filtered and buffered PWM approach and the 12F1822 has a CCP module you can use for that. Otherwise it's an external DAC chip interfaced via I2C or SPI or something else.

            EDIT: Or an R2R ladder driven by a shift register...

            /Henrik.
            Walgreenslistens
            Thanks for the information, I will try to figure it out for more. Looking for the same issue.
            Last edited by Darius15; 11-16-2021, 07:50 PM.

            Comment


            • #7
              The DS1804 digital pots are a 100 tap output adjusted 1 increment at a time by tapping a pin. It either goes up or down depending on the state of the U/D pin. There are other tap versions with more resolution as well.

              There are also addressable digital pots (SPI/I2C) with 1-4 individual pots in a single housing. Search through Digi-Key (or your favorite supplier) for options.
              We can crack this cotton PIC'n thang!

              Comment


              • #8
                Originally posted by mpgmike View Post
                The important point I believe Henrik wanted to make is that PWM (however you create it) can accomplish your goals. You have the option of the CCP modules, some PICs have separate PWM modules, then of course there's software controlled PWM (PBP). Any choice you make should get you there.
                mybalancenow.com
                Thanks for the information, I will try to figure it out for more.
                Last edited by Cooley87; 11-18-2021, 07:49 PM.

                Comment

                Working...
                X