Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Dynamically Changing the Drive Mode of Port Pins in PSoC3/5

Dynamically Changing the Drive Mode of Port Pins in PSoC3/5

Anonymous
Not applicable
Question: How can I change the drive mode of port pins of PSoC3/5 in Firmware dynamically?

 

Answer:

When a Port pin is placed in the schematic (Top Design) and compiled, PSoC Creator generates API for controlling the behavior of the pins.  The drive modes of Port Pins can be changed by using API function "<Pin Name>_SetDriveMode(uint mode)". For example, if the name of the port pin is "Pin_1", the function will be named as "Pin_1_SetDriveMode()".

Please refer <Pin Name>.h file to get the names of various Macros to select the particular Drive Mode.

In the pin configuration window, remember to select the "Contiguous" option under Mapping.

   

 

0 Likes
510 Views
Contributors