- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am practicing setting up DMAs by using the examples given here:
I would like to be able to change the phase of the sine wave by using a potentiometer. Does anyone have any tips on how to accomplish this?
Solved! Go to Solution.
- Labels:
-
PSoC 5 Device Programming
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
choblet,
I looked through few options, it seems the most stable for multiple sine outputs is the project created by Evgeniy Pavlov (AKA 'pavloven') on Jun 18, 2016:
Generating multiple waveforms with fixed phase relationships
To keep two sine outputs synchronized it uses intermediate location in memory, which data is fetched by 32-bit DMA source. To have sine phase shifted, the sourcing array in RAM is simply re-calculated, which takes some time and may (potentially) lead to discontinuities when old data in RAM is being overridden.
I cosmetically freshened the original project, translating comments to English and adding phase update on timer event. Project is attached
/odissey1