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

    IO pins on custom expansion board

    Scheduled Pinned Locked Moved
    Firmware developers
    2
    4
    230
    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.
    • Dan_55undefined
      Dan_55
      last edited by

      Hello,
      I'm creating a custom expansion board with IO and PWM pins only. In order for it to work I need to add a new config file for the firmware. Do I have to change anything else except the pin table?
      So for example, if I'd like to add an IO number 9, I change this:

      	//	TC					TCC					ADC					SERCOM in			SERCOM out	  Exint PinName
      	// Port A
      	{ TcOutput::none,	TccOutput::none,	AdcInput::none,		SercomIo::none,		SercomIo::none,		Nx,	nullptr		},	// PA00 driver2 DIR
      

      to this:

      	//	TC					TCC					ADC					SERCOM in			SERCOM out	  Exint PinName
      	// Port A
      	{ TcOutput::none,	TccOutput::none,	AdcInput::none,		SercomIo::none,		SercomIo::none,		9,	io9.out		},	// PA00 
      

      And I'm done, right?

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

        That should be sufficient to create a new output pin without PWM capability.

        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
        • Dan_55undefined
          Dan_55
          last edited by

          @dc42 Thank you!
          Could you explain what should I do to add a PWM capable pin?
          I'm making a new board based on the 1LC setup.

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

            To add a PWM enabled output you need to pick a pin that the datasheet shows can be connected to a TC[n].WO[m] pin for some n and m, with the following constraints:

            • the TC or TCC must not already be used for another PWM output
            • if it is a TC then m cannot be zero
            • if it is a TC then it must not be one of the pair of TCs used for step pulse generation

            After picking the pin, put the appropriate entry in the TC or TCC column of that row of the pin table. See the existing entries for e.g. pin out0 as examples.

            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