cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable
Can i make actve_high setting in LED while placement instead of following code in main.c.  //Set port drive modes for LEDs
   
  PRT0DM0 |= 0b00100010;  //strong on P0[5],P0[1]
   
  PRT0DM1 &=~0b00100010;
   
  PRT1DM0 |= 0b10100100;  //strong on P1[2]
   
  PRT1DM1 &=~0b10100100;
   
    
   
PRT2DM0 |= 0b10100000;  //strong on P2[5],P2[7]
   
  PRT2DM1 &=~0b10100000;
0 Likes
4 Replies
Anonymous
Not applicable

 Yes, You can always set the drive modes and initial value in the pin settings. The firware register settings allow you to set and change at run time.

0 Likes
Anonymous
Not applicable

Thank You. It works.

0 Likes
ETRO_SSN583
Esteemed Contributor

You can alwyas use the LED module as a simple way of controlling LED.

   

Has advantage that if mixed I/O in port it instantiates shadow registers

   

to avoid R modify W problems.

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thanks Dana.

0 Likes