Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Interface with SX1509

    Duet Hardware and wiring
    2
    5
    840
    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.
    • Algadz
      Algadz last edited by

      Hi everyone,

      I need some additionnal output so I'm trying to use the Sparkfun SX1509 i2c extension board.

      My setup (M115 call) : 1.21RC1 ELECTRONICS: Duet Ethernet 1.02 or later + SX1509B expander FIRMWARE_DATE: 2018-01-25

      I have soldered the sx1509 to be at i2c address 0x71 (I've checked with my Raspberry Pi that the address is correct).

      My problem is the following:

      I tryed to use the M42 S255 P1 command to set sx1509 pin 15 to HIGH,
      and the board answer is : "Logical pin 255 is not available for writing" (same problem for pin 220 to 235)

      Is there any thing to do to set this pin to output mode ?

      I've tryed using :
      M260 A0X0E B0X00
      M260 A0X0F B0X00
      to set RegDir register of the sx1509 to set pin 0 to 15 to output mode but the problem remain

      I've also tried to send :
      M260 A0X10 B0XFF
      M260 A0X11 B0XFF
      to set RegData register and set pin 0 to 15 to HIGH but no result either.

      Thank you 🙂
      Alban

      1 Reply Last reply Reply Quote 0
      • Algadz
        Algadz last edited by

        Also for the wiring of the sx1509, I plugged it to the following pin of the expansion header of the Duet Ethernet

        SX1509 DUET
        SCL –--> TWCK0
        SDA ----> TWD0

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

          The logical pin numbers you need to use in the M42 command are 120 to 135.

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

            Thanks it works !

            You might have to correct the port value in the wiki here (?) :
            https://duet3d.com/wiki/Adding_additional_output_ports

            Alban

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

              Done.

              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