Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    PWM on duet 0.6

    Scheduled Pinned Locked Moved
    Firmware developers
    2
    4
    213
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tstoneundefined
      tstone
      last edited by

      I am a little confused about the pin output of the duet 0.6 expansion. I thought that pin A10 is pin 64 is PA14 is expansion pin 10. But doing a:
      AnalogOut(A10,0.5,(uint16_t)120000);
      in Platform::Init does not create any output on expansion pin 10?
      I am using the information from
      https://duet3d.dozuki.com/Wiki/Using_servos_and_controlling_unused_IO_pins .

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        Pin 64 of the chip is PC6 and is connected to pin 18 of the expansion connector. I attach the Duet 0.6 schematic. You will need to check the Arduino Due pin mapping to see which pin corresponds to Arduino Due pin A10.

        120000 will not fit in a uint16_t.

        Duet_06_Schematic.pdf

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • tstoneundefined
          tstone
          last edited by

          Thanks for the link to schematics. I wasn't aware of these.

          Nevertheless i am somehow more confused about the virtual pin numbering.
          As far as i have figured out is that:
          AnalogOut(99 ,0.5,(uint16_t)60000); //pc6 - expansion pin 18
          should configure pin pc6 which is on pin 18 of the expansion port with a 60kHz pwm.
          Which doesn't seem to happen when called at the end of Platform::Init?

          1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators
            last edited by

            The pin numbering used in the firmware for the Duet 0.6 is confusing because it's based on the pin numbering used in the Arduino core for the Arduino Due. So search for "Arduino Due pin mapping" to find how pin numbers map to processor pins.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA