CODE_REPLACEMENT

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

cross mob
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
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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