Interface with SX1509



  • 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



  • 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


  • administrators

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



  • Thanks it works !

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

    Alban


  • administrators

    Done.


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.