- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am using the CY8C58LP dev module on CY8CKIT-001 board.
I am using 2 WaveDAC8's to source/sink a specific current waveform across a variable Rload.
(For ease of testing, Rload is a static 10k ish ohms).
One WaveDAC8 (hereafter revered to as I_1) is initially setup as a 60uA square wave @ 100ms period as a source.
Second WaveDAC8 (hereafter revered to as I_2) is initially setup as a 60uA square wave @ 100ms period as a sink.
They are both source from the same 1kHz clock.
I am using the WaveDAC8's wc1 flags as an end-of-wave isr, which sets a flag. When both flags are set (which happend near simultaneously) I run some code to switch polarities using the WaveDAC8_x_IDAC8_SetPolarity() functions, where x is 1 and 2.
With my oscilloscope leads directly across Rload, I should be seeing alternating +600mV/ -600mV square waves.
However, at the moment, the 2nd wave (the attemped negative wave) is not behaving properly, instead creating a +20mV square bump.
It then switches back properly to the +600mV wave, and again back to the +20mV bump.
To me, this indicates that the WaveDAC8_x_IDAC8_SetPolarity() alone are not enough to change the source/sink properly.
I've tried surrounding them with Stop/Start (which made things worse by screwwing up the good wave) and with rerunning Init each time (also made things worse).
I've also tried to forget switching the polarity, and used analog demuxes to flip the orientation around the load. For some reason I haven't figured out yet, this also does not create a proper negative wave, even though the poles should be completely flipped!
So, I'm out of ideas about how to properly switch the polarities to create co-joined positive negative signals.
Any advice would be truly appreciated.
Thank you
ngohara
PS: Current project should be attached. Please excuse commented code mess, though this does demonstrate both my SwitchPolarity, and my SwitchMux ideas.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind.
Had some help, but figured out I was using the oscilloscope incorrectly, (ie channel on +Vload, gnd on -Vload), when I really needed to use two channels and take the difference. The negative waves now show correctly.
Doh!