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)?
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...
1 of 1 people found this helpful
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.
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.