This content has been marked as final. Show 2 replies
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 to bidirectional mode
But is there anything else required to set the analog global select bit?
Anything else I may be doing wrong?