How to switch polarity of IDAC on PSOC 4

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

cross mob
Anonymous
Not applicable

Hello,

   

We are using a PSOC 4 CY8C42478ZI-MF485 and we need to switch the polarity of an IDAC using c-code but we can't find the command to do it. Is it possible to do this using software?

   

Thanks.

0 Likes
1 Reply
Anonymous
Not applicable

You can write your own functions for that.

   
//palarity 0(Source), 1(Sink) //IDAC -> component name in this example void idac_Set_Polarity(uint8 polarity){      uint8 enableInterrupts;      /* Set initial configuration */     enableInterrupts = CyEnterCriticalSection();      /* clear previous values */     IDAC_IDAC_POLARITY_CONTROL_REG &=             (~(uint32)((uint32)IDAC_IDAC_POLARITY_MASK <<             IDAC_IDAC_POLARITY_POSITION));      /* set new configuration */     IDAC_IDAC_POLARITY_CONTROL_REG |=        ((uint32)polarity << IDAC_IDAC_POLARITY_POSITION);      CyExitCriticalSection(enableInterrupts); } 
   

 

   

Reiner