- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i am using CYBLE-022001-00 / BLE module and generating 1Hz to 40 Hz PWM signal . some time i need inverted signal of waveform signal (example 1Hz signal ). for that i need two different pin for taking inverting and non-inverting signal out .
Instead of two GPIO pin i want to use only single GPIO pin for generating both signal and that switching event must be control through my main() program .
KEYWORD-
void TCPWM_SetPWMInvert(uint32 mask)
Example -
T0 second - PWM output through PIN 1 is Non_Inverting
T0+1 second - PWM output through PIN 1 is Inverting
*Please check the attached jpg also.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a look into the TCPWM Datasheet for TCPWM_SetPWMInvert() which controls the polarity. Should be availlable for your PRoC module.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can route the PWM output through an XOR gate. Depending on the second input of this gate the PWM signal will be inverted or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@hli
Are there XORs in a PRoC module (UDBs)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, I forgot to check. Since the PRoC has no UDBs, there are no gates. In that case, I would re-configure the PWM (change the compare type from 'less than' to 'greater than', and the compare value to 'period-compare value').
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
... or use TCPWM_SetPWMInvert()
Bob