9 Replies Latest reply on Jul 5, 2018 7:37 AM by pd2

    Compatibility Piface Digital2 and other cards/hats

    pd2

      I have a Piface Digital 2 running as part of a home monitoring system and I want to use my second Digital 2 to control a slide projector and digital camera.

      Unfortunately the Digital 2 is currently incompatible with my Displayotron. Using the two together stops the Displayotron LCD updates.

      Is there a known workaround for this?

       

      If there is no workaround is the PiFace Control and Display board compatible with the PiFace Digital 2?

       

      Thanks!

        • Re: Compatibility Piface Digital2 and other cards/hats
          jomoenginer

          JP1 and JP2 on the PiFace Digital 2 control the address to the board so you may have to change the addresses of each PiFace Digial 2 so it does not interfere with your Displaytron. 

          However, how are you connecting all of these devices?  Are they all stacked on top of the Pi?   If so, you maybe running into a power issue.

           

          Link to the PiFace Digital 2 Tech Spec:

           

          http://www.piface.org.uk/products/piface_digital_2/

          2 of 2 people found this helpful
            • Re: Compatibility Piface Digital2 and other cards/hats
              pd2

              Thanks for replying.

              PSU is 2.5amp so I don't think that its the problem.

              Tried rebooting with JP1 and JP2 off and I still have the same result.

               

              The Displayotron board is working because I can get input from the keypad and the LCD backlighting responds ok but sending text to the LCD is ignored when the Piface digital is installed.

               

              So somewhere they are fighting each other. Any other suggestions welcome!

                • Re: Compatibility Piface Digital2 and other cards/hats
                  pd2

                  Just to clarify I should have said that my second Piface is on a different Raspi.

                  1 of 1 people found this helpful
                    • Re: Compatibility Piface Digital2 and other cards/hats
                      jomoenginer

                      Yeah that helps.   How do you have the Displayotron and the Digital 2 connected to the Pi?

                       

                      I am not sure what address will result with the jumpers off on the Digital 2 but the default is 0.  You can move the jumpers to change that address..

                      http://www.farnell.com/datasheets/1881551.pdf

                       

                      Is this the device you are connecting?

                      https://pinout.xyz/pinout/display_o_tron_hat

                       

                      RasPi Pinout:

                      https://pinout.xyz/

                       

                      You can compare this with the Pinout of Raspberry Pi and see if the Digital 2 has a conflict with the Displayotron.

                       

                      I've stacked the Digital 2 with other PiFace devices using the PiFace Rack but not sure how other devices play with it.

                      2 of 2 people found this helpful
                        • Re: Compatibility Piface Digital2 and other cards/hats
                          pd2

                          I'm using a Pimoroni PhatStack "backplane" to connect everything.

                          It has worked ok with other modules.

                          The PiFace2 and the Display--o-tron are the only modules on the backplane.

                          I;m going to have to have a look at the Configurator. I guess it will show that the boards are incompatible but I don't yet know how to use it.

                           

                          In the meantime some more details of what I tried.

                          1. System update just in case something important was missing. No change.

                          2. Piface is initialised here

                                    Import pifacedigitalio as pfio

                                    Pfio.init()

                           

                          3 Jumper Tests

                           

                          JP1 pins 1 and 2: JP2 pins 1 and 2

                          relay clicks, screen cursor on with relay on command (not desired)

                           

                          Reboot

                           

                          JP1 pins 2 and 3: JP2 pins 1 and 2

                          Python crash see below

                           

                          Reboot

                           

                          JP1 no jumper JP2 pins 1 and 2

                          JP1 no jumper: relay clicks, screen cursor on with relay on command (not desired)

                           

                          Reboot

                           

                          JP1 no jumper JP2 no jumper

                          JP1 no jumper: relay clicks, screen cursor on with relay on command (not desired)

                           

                          Reboot

                           

                          JP1 pins 1 and 2: JP 2 pins 2 and 3

                          Python crash see below

                           

                          Reboot

                           

                          JP1 pins 2 and 3: JP2 pins 2 and 3

                          Python crash

                          See below

                           

                          ===============================

                          Details of Python crash.

                           

                          Traceback (most recent call last):

                            File "/home/pi/Desktop/scanner01.py", line 247, in <module>

                              scan_slide ()

                            File "/home/pi/Desktop/scanner01.py", line 103, in scan_slide

                          pfio.digital_write(proj_relay,1) # on

                            File "/usr/lib/python3/dist-packages/pifacedigitalio/core.py", line 233, in digital_write

                          _get_pifacedigital(hardware_addr).output_pins[pin_num].value = value

                            File "/usr/lib/python3/dist-packages/pifacedigitalio/core.py", line 284, in _get_pifacedigital

                          "hardware_addr {}".format(hardware_addr))

                          1. pifacedigitalio.core.NoPiFaceDigitalError: There is no PiFace Digital with hardware_addr 0

                          =================================

                           

                          So it seems some kind of address conflict but why can PiFace not find its own module when the address is changed?

                           

                          I'm now more confused than I was before...

                            • Re: Compatibility Piface Digital2 and other cards/hats
                              jomoenginer

                              By default the PiFace Python code defaults to address 0 which is the default for the Digital 2. Thus, If you change the address, then you need to change the value in the code to match the address on the Digital 2.

                               

                              Hint:

                              pifacedigitalio.core.NoPiFaceDigitalError: There is no PiFace Digital with hardware_addr 0
                              1 of 1 people found this helpful
                                • Re: Compatibility Piface Digital2 and other cards/hats
                                  pd2

                                  OK that was extremely helpful in one way!

                                  I had never needed to install multiple PiFace boards so did not know that/search for hardware addressing must also be addressed in the software so thanks VERY much for that help.

                                  I learnt something important.

                                   

                                  So for anyone else who might need help my PiFace write statement for a different hardware address looks like this.

                                   

                                  pfio.digital_write(proj_relay, on, pif_addr)

                                  where pif_addr is the hardware address from the jumpers in the documentation table.

                                   

                                  However I have now tried all the possible hardware addresses - with the same results. The display o tron will not update correctly.

                                   

                                  So there must be a different address conflict somewhere!!!

                                  But thanks again for eliminating one possible problem.

                                    • Re: Compatibility Piface Digital2 and other cards/hats
                                      jomoenginer

                                      Yeah, looking at a schematic of a PiFace Digital I/O, which I am assuming is the same as a Digital 2, both the Digital 2 and the Display-O-Tron use the same pin (pin 25/ BCM 8)  for the CE/SS; LCD Chip Select for the Display.  With SPI,  you can Daisy Chain multiple SPI devices as long as each device can pass the command to the next device if it can detect which command is for itself.  With multiple PiFace devices connected I believe this is the case.  However, I am not sure it is the case with the Display-O-Tron.  If the devices do not play nice together, you want a separate pin for the CE/SS otherwise all devices connected to the same CE will get enabled when the pin is asserted.  Also, looking at the PiFace code, it uses an Interrupt signal set to 25 which may mean BCM25 or Pin 22 where the Display-o-tron is using pin 22 for its LCD Register Select.

                                       

                                      http://community.mydevices.com/t/piface-2/1625/8

                                       

                                       

                                      From what I can read, the Display-o-Tron has an optional I2C connection so you may try controlling the Display with I2C and the Digital 2 with SPI to avoid the conflict. But, this may not solve the issue considering the uses with pins 22 and 24.

                                       

                                      The other option is to take one of the devices and modify the physical connection to it so the CE/SS and other conflicting signals are routed to other pins from the Pi that are not being used.  You would then have to change the code to reflect this so it knows which pin is the new CE for that device.

                                       

                                      I do not having a Display-o-Tron myself, so that is all I can come up with.   You may want to contact Pimoroni and see what they say.