- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Section 4.10 of AN72382, Using PSoC® 3 and PSoC 5LP GPIO Pins" discusses how to use an external signal to gate the analog output on a GPIO pin.
I am trying to implement this following the same exact instructions (except that the gating signal is generated internally), but I can't seem to get this to work.
I get a square wave of an appropriate frequency (dictated by my gating signal) but (a) when the gate is off the voltage is not 0V but something like 2V, and (b) changing the VDAC output does not change the signal at all.
The discussion in the application note reads:
The signal from the DSI (red) is routed to the analog switches because the port bidirectional bit and the analog global select bit are set
(yellow). The VDAC output (blue) is switched on or off depending on the logic state of the Ext_Gate signal.
I did include:
// Set P0[0] to bidirectional mode
CY_SET_REG8(CYDEV_IO_PRT_PRT0_BIE, 0x01);
But is there anything else required to set the analog global select bit?
Anything else I may be doing wrong?
Thank you!
--
Dario
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dario,
Attached is demo project showing VDAC output modulation by PWM. The Pin must be configured both for analog and digital output.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, changing the DAC level changes the mean DC of the signal.
For DAC=128
while for DAC = 255
..but in none of them the signal is 0V when the gate=0.
--
Dario
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content