PWM on duet 0.6



  • 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 .


  • administrators

    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



  • 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?


  • administrators

    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.


Log in to reply