Unable to use ADC DMA construction to read input voltage

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
user_58361
Level 2
Level 2

Dear community,

For my internship I am working with the CY8CKIT-059 PSOC 5LP. In order to implement an control algorithm, I am exploring the possiblities of the CY8CKIT. However, I am running into an issue of which I cannot detect the origin. I used the example project ADC_DMA_VDAC and removed the LCD screen part of the project. The project is attached.

The issue I am running into is that I cannot read a voltage from the VDAC on P0[2]. I am supplying a DC voltage within the Vdda range using a waveform generator on P0[1]. Maybe it is a very trivial error, but I would very much like to solve this issue, as most of my future work for my internship is depending on this.

With kind regards,

Jim

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I modified the schematic as below

000-schematic.JPG

ADC Config

001-ADC-Config.JPG

DAC8 Config

002-DAC8.JPG

The oscilloscope

IMG_3421.JPG

Since my hand made funcgen generates almost to 0V, the ADC detects as a negative so the bottom value come to negative value, I guess.

moto

P.S.

P0_1 = P0[0] 48

P0_2 = P0[1] 49

View solution in original post

0 Likes
7 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Does inserting

    CyGlobalIntEnable;                                  /* Enable global interrupts */

in front of

VDAC8_Start() ;

improve the situation?

moto

0 Likes

Hi,

I added it, but still no voltage present on the pin connected to the VDAC. Furthermore, I changed the pins to prevent that my signals are affected by the capacitors that are connected to some of the pins. Input is now on P0[0] and VDAC output is on P0[1].

Jim

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I modified the schematic as below

000-schematic.JPG

ADC Config

001-ADC-Config.JPG

DAC8 Config

002-DAC8.JPG

The oscilloscope

IMG_3421.JPG

Since my hand made funcgen generates almost to 0V, the ADC detects as a negative so the bottom value come to negative value, I guess.

moto

P.S.

P0_1 = P0[0] 48

P0_2 = P0[1] 49

0 Likes

Hi,

I tried your project, but it does not work for me. The result I get using an AC wave with 200 mVpp with 500 mV offset and 100 Hz is seen in the scope plot. This is not what I expect the VDAC to do.

NewFile0.png

I am kind of confused why this happens. Also, why does the VDAC need the strobe input in order to give an output?

If you have any suggestions that will help me understand and solve this issue, that would be greatly appreciated! What I would like to recreate is this How to Create an Analog Filter with PSoC 5LP - YouTube , as I am interested in knowing what happens when I want to filer high frequency signals.

UPDATE #1

I changed some settings and ran the test again. In blue is the output of the VDAC(0-1.020V), which is now the same as my input, which I already specified. The question for me still remains why the strobe input for the VDAC is needed to output a voltage.

NewFile1.png

UPDATE #2

There is also a difference when the VDAC is set to output between 0-4.080V, as seen in the scope plot. I expect that this happens due to the loss in accuracy.

VDAC_0-4080V.png

Jim

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I'm sorry for confusing you.

As the previous project is "a kind of result" after I tweaked with your project.

So from the DAC8 dialog, I also thought "Register Write" option should work,

but I just wanted to sync the end of DMA and strobe of DAC8.

So I hope that at least the initial "issue" of generating output from DAC8 is somehow solved.

(There could be better methods though.)

Meantime, to be honest I am not an analog expert, so if you need help with Analog Filter,

please create another discussion with such title.

moto

0 Likes

Hi,

No worries, I am already very glad that I can generate an output with the VDAC. To figure out why the VDAC needs the strobe input, I will open a new forum post.

An other curious issue I now ran into is the fact that I changed the my initial project based on the changes you also implemented. When I build and flashed this onto the PSOC, it gave me the same result as my initial scope plot (seen in my previous post). Did you make any other changes, besides the schematic changes you already indicated?

Thank you very much for the help.

Jim

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Dear Jim-san,

Last night (it was after midnight), my brain was pretty exhausted,

so I tried to reproduce what I did to your project.

But to my surprise, your original project is working with only the modification to the pins.

P0_1: P0[0] 48

P0_2: P0[1] 49

Sine wave 0.9V p-p with 0.05V DC

IMG_3422.JPG

Sine wave 100 Hz 0.9V p-p with 0.05V DC offset

IMG_3423.JPG

So after all, the strobe was not required to make this project work.

BTW, I wonder why last night initially your program was not working...

May be it was because of the pin choice...

Best Regards,

16-Feb-2019

Motoo Tanaka