Anonymous
Not applicable
Sep 23, 2016
12:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 23, 2016
12:04 PM
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.
1 Reply
Anonymous
Not applicable
Sep 24, 2016
02:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 24, 2016
02:14 AM
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