4 Replies Latest reply on Nov 27, 2019 2:21 AM by DaGr_294516

    Is it possible for a component to have different symbols for different architectures?

    DaGr_294516

      I'm trying to make a custom component that has to work on PSoC 4 and 5. I need different terminals for the two versions.

       

      I can have a different schematic for 4 and 5, but as far as I can tell there is no way to have different symbols/control symbol configurations... Is there a way to work around this?

       

      Thanks in advance!

       

       

       

      Dan

       

        • 1. Re: Is it possible for a component to have different symbols for different architectures?
          EktaN_26

          Hello Daniel,

           

          You are correct that in PSoC creator we can have different schematics for a custom component corresponding to the device (say PSoC 4 or PSoC 5LP). This is because component schematic can be specific to a device.

          But, the component symbol is more generic. It is not specific to a particular device as shown in the image below:

          Is it possible for you create two components with different names that will be specific to PSoC 4 and PSoC 5LP. In that case you can have separate schematic and separate symbols for both the components (say component01 for PSoC 4 and component02 for PSoC 5LP)?

           

          Best Regards

          Ekta

          • 2. Re: Is it possible for a component to have different symbols for different architectures?
            DaGr_294516

            Is there really no way to configure the symbol?

             

            It would also be nice for the two versions of the component to share the same API files, otherwise there will be a lot of duplication. The two versions are very similar...

             

            Thanks,

            Dan

            • 3. Re: Is it possible for a component to have different symbols for different architectures?
              ScottA_91

              Dan,

                 So there are a couple of different ways you can get at this.  First, if you define a super set symbol, you can use visibility expressions on the terminals.  Something like:

              "PSoC5" eq GetDeviceFamilyName()

                 Remember you still need to set default expressions and the implementing schematic needs to have the terminal.

                 Option 2 is a little cleaner in my opinion.  You can create a software only component (the implementation of your APIs) and then use that component as a base for a separate PSoC 4 and PSoC 5 implementation component.  Use macros to redefine the APIs in the top level component as calls to the base component.  I know it sounds complex but it really is simple to do.

               

                 Scott

              1 of 1 people found this helpful
              • 4. Re: Is it possible for a component to have different symbols for different architectures?
                DaGr_294516

                Hi Scott,

                 

                Thanks very much for your response.

                 

                If you define visibility expressions for terminals, does that disable them or just hide them? I.E. would they still need to be connected to something internally, even when not shown?

                 

                Presumably the second solution would still require separate schematics for the two versions, but that would be ok... Is there an example somewhere of a simple implementation like this? No worries if not, I'm sure I can work it out.

                 

                I have had to move on from this issue temporarily but I'll have another go in a week or two.

                 

                 

                Thanks again

                Dan