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

    Sending data over I2C, transmission error

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    2
    8
    1.1k
    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.
    • Krzsztofundefined
      Krzsztof
      last edited by

      Hi,
      I would like to ask you for help with the problem that I have encountered today. I would like to send data to my board connected to Duet by I2C. For now I have installed pull-ups on Duet's TWCK0 and TWD0 and connected them to logic analyzer (grounds are connected). When I'm trying to send something using M260, the Duet says:

      M260: I2C transmission error

      And the logic analyzer shows nothing (high on both lines). I have tried to send different data using examples from Gcode documentation "M260: i2c Send Data".
      My setup is DuetEthernet V1.02, firmware 2.01beta2(RTOS).

      Thank you very much for your help!
      Chris

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

        Please install firmware 2.01 release and check whether the problem still happens.

        What value pullup resistors did you use? They should be 4.7K.

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

          Thank you for lightning fast answer 😄
          Firmware updated to 2.01(RTOS) (2018-07-26b2), resistors are 4.2K (I haven't got 4.7 at the moment), still the same reply from Duet.

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

            Thanks, I'll look into this tomorrow or Friday.

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

              Great, thank you very much!

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

                What is the exact M260 command you are using?

                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
                • dc42undefined
                  dc42 administrators
                  last edited by dc42

                  I have just tested M260 and M261 and they is working for me. The "I2C transmission error" message is produced if no slave responds at the I2C address you specified. So please check the following:

                  • You specified the correct I2C slave address in the A parameter of the M260 command. Note that I2C addresses are usually specified in hex, but you need to use the decimal equivalent in the M260 command.
                  • You have connected the I2C device correctly to the Duet. If you have connected it to the header pins on a DueX2 or DueX5, please note that the TWC and TWD legends are swapped on older boards. TWC is the pin next to GND.

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

                    Ok, strange thing 🙂
                    I have connected my setup today to check the commands for you and I2C seems to work fine. When I'm sending "M260 A3 B65" I can see the state changes according to address being sent:

                    0_1533907087710_Zrzut ekranu 2018-08-10 15.15.46.png

                    Of course Duet is still saying "Error: M260: I2C transmission error", but now I know that is because I'm not sending ACK from my side.
                    So the last time I have probably connected something wrong, sorry for bothering you 🙂

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA