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

Interface with SX1509

Scheduled Pinned Locked Moved
Duet Hardware and wiring
2
5
1.0k
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.
  • undefined
    Algadz
    last edited by 2 Jan 2018, 14:52 1 Feb 2018, 12:11

    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
    • undefined
      Algadz
      last edited by 1 Feb 2018, 12:59

      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
      • undefined
        dc42 administrators
        last edited by 1 Feb 2018, 21:10

        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
        • undefined
          Algadz
          last edited by 2 Feb 2018, 10:43

          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
          • undefined
            dc42 administrators
            last edited by 2 Feb 2018, 10:56

            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
            1 out of 5
            • First post
              1/5
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA