0

This is the issue. For the schematic, please refer to the schematic attached. I have a pins component with a set of pins. I need to access each pin at a time. Currently I am trying to do that with the code,

DisplayEnable_0_Write(1);
DisplayEnable[0]_Write(1);
DisplayEnable_Write(1);

All of them refuse to work. How can I do this? the schematic diagram

1 Answers1

0

First thing to note is it doesn't look like you have any of the PSoC pins assigned other than 1[7] (Note how all the others are marked with an [X]). You should assign the other pins in the design wide resources file (.cydwr) otherwise the fitter will automatically assign them wherever it pleases (I think it just chooses the first available?). [EDIT] My mistake, the pins will be marked with [X] if they are not continuous.

Individual pins in a component can be written by using the macros generated in the Pin_aliases.h file (see page 36 of the pins component datasheet). In your case this would be DisplayEnable_aliases.h. So in your example, you would set the pin in position 0 by:

CyPins_Set(DisplayEnable_0);

Clear the pin via:

CyPins_Clear(DisplayEnable_0);
K_Trenholm
  • 482
  • 5
  • 20