• Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    I2C seems to be broken - no communication - no relay

    Mervis
    2
    10
    2624
    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.
    • G
      Giamba last edited by Giamba

      Hi,
      I have my i2c not working on the unipi v1.1. Relays does'nt work anymore.
      I have no communication in system status -> I2C.
      0_1499694937144_i2c.png
      i2c-detect -y 1 give me:

      root@unipi:~# i2cdetect -y 1
           0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
      00:          -- -- -- -- -- -- -- -- -- -- -- -- --
      10: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
      20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
      50: UU -- -- -- -- -- -- 57 -- -- -- -- -- -- -- --
      60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- UU
      70: -- -- -- -- -- -- -- --
      

      Version of Mervis IDE is 57589 and the runtime is up to date.
      Please, can someone tell me what's happening ?

      T 1 Reply Last reply Reply Quote 0
      • T
        tomas_hora administrators @Giamba last edited by

        @Giamba Can you share the project? The address 0x20 (which are the relays on UniPi 1 and Lite) is visible with i2cdetect so it should be OK. Do you have anything other connected to the I2C port? Has it been working before? If so, what has changed?

        1 Reply Last reply Reply Quote 0
        • G
          Giamba last edited by

          Hi tomas,
          Now I see it's happening only when I add a task with a new fdb program.
          I create a program named "ligths" with just DI1 -> Relay1. I add the task as 50% ratio priority 0, the same as the main.fdb.
          I build, deploy, and there is no more i2c.
          When I remove the task, that's work again!

          Maybe a bug ? What do you think ?

          T 1 Reply Last reply Reply Quote 0
          • T
            tomas_hora administrators @Giamba last edited by

            @Giamba Can you plese try to map the program to the task 0 and do not add it to a new task so that you have only one task?

            1 Reply Last reply Reply Quote 0
            • G
              Giamba last edited by Giamba

              @tomas_hora, I don't know how to do that, the task with id 0 seems to can't be edited.

              T 1 Reply Last reply Reply Quote 0
              • T
                tomas_hora administrators @Giamba last edited by

                @Giamba you have to switch to the main Profile (upper level from dev and site) and also switch the project to full mode, then go to task editing and you should be able to do that.

                1 Reply Last reply Reply Quote 0
                • G
                  Giamba last edited by

                  @tomas_hora.
                  Thanks, now I can!
                  If I understand, we can't set multiple "normalOperationTask" because it's impossible to load multiple intances of hardware resources. Tow tasks means two loads of ic2 (and others protocols) witch is impossible beacuse of opening the same port/protocol. So I can't have a multithreading project as one for ligths and one for heating for example. How to do that? If not, by your side, why to not make it possible, by use for example program shared memory for hardward resources instantiations int the RT. Maybe it will be a thing to do. What about it ?
                  Giamba

                  T 1 Reply Last reply Reply Quote 0
                  • T
                    tomas_hora administrators @Giamba last edited by

                    @Giamba That is the theory how it is meant to work. I have just tried the same setup but could not get the relays stop working... Could you please share your project?

                    1 Reply Last reply Reply Quote 0
                    • G
                      Giamba last edited by

                      Hi, tomas,
                      My project is at this address: https://we.tl/W7Yzk6xjzw.
                      You can test to remove i2c_test from the main task to put in a new one. When it's done, i2c and 1-wire doesn't work anymore.
                      Thank you.

                      G 1 Reply Last reply Reply Quote 0
                      • G
                        Giamba @Giamba last edited by

                        @tomas_hora.
                        Hi.
                        So tomas, have you been able to test my configuration? What about your side? Do relays are working with my project files?
                        Tanks again.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post