1 of 1 people found this helpful
Which existing component are you trying to modify?
Pin components in an existing component can be replaced with a terminal symbol on the schematic. In this case, it is not available to get the status of these input pins and specify the logic level of these output pins. You can add a Status Register component to the input terminal to get the status and a Control Register component to the output terminal to specify the logic level.
Ok. Is there a programmatic way to communicate with a component that I'm not thinking of? So a component can call a function internally that gets some state from the outside circuit that contains it?
You can use a buried Pin inside the component. You can find an example of the buried pin example here:
Basically, drop a Pin into component schematic (name Pin1), and set Hardware connection to False.
Reading value of the pin:
where `$INSTANCE_NAME` is the name of your component.
It can be read directly from the main.c or wrapped into component's *.h and *.c files.
Basically, drop a Pin into component schematic, and set Hardware connection to False.
How do you do that?
You mentioned that there is existing component with schematic, which you would like to modify. So open that achematic, and drop a standard digital input Pin (a little square with green wire). Dbl-click it to open Settings an uncheck property hardware connection. The pin will look as a small square.
That's all. Now in the Design Wide Resources->Pins you can see this pin. And you can read this pin as shown in the previous message.
I think that's the opposite of what I want? The component already has a pin inside it that maps to an external GPIO in the DWR. I want it to NOT connect to an external GPIO, so I'm not wasting pins.
I managed to turn it into a terminal with a Status Register so it can be routed internally instead, and that seems to be working well.