yhnm | Cypress

yhnm

Summary: 7 Replies, Latest post by pavloven on 30 May 2011 05:21 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
user_49271930's picture
User
300 posts

mixed analog-digital scope         http://www.cypress.com/?id=3312&conID=235
Wonderful project for the study of PSoC. I'm trying to figure out.
Found the problem:
1. Require () for   triggerActive?16:0
..................................
327 +(triggerActive?16:0) // if no other triggers are active, trigger with bus count 
....................................
2. Posted by hysteresis in triggers Comp_1 Comp_2 and for greater stability of the front.

There are questions:

3. 2-bit resolution ADC (figure1) - why?

4. There is a shift of channel 2 increases over time (figure2).
 If possible, tell me the reason or solution.

Sincerely  Eugene.
  Russia

Attachments: 
hli
user_78878863's picture
User
2052 posts

> Found the problem:

Which problem?

 

> 1. Require () for   triggerActive?16:0
> 327 +(triggerActive?16:0) // if no other triggers are active, trigger with bus count 

Which file, at which line? (and did you use the latest version?)

> 2. Posted by hysteresis in triggers Comp_1 Comp_2 and for greater stability of the front.

This should have been active already...

 

> 3. 2-bit resolution ADC (figure1) - why?

Could it be that your signal is too fast - in my experiments the waves are quite smooth... (look at the video). The ADCs are configured with 8 bits.

How did you produce these images - they aren't from the supplied client?

> 4. There is a shift of channel 2 increases over time (figure2).
> If possible, tell me the reason or solution.

Again - how did you produce these images? Did you try several trigger runs? What signals did you measure?

user_49271930's picture
User
300 posts

I downloaded May 25
http://www.cypress.com/contests/adm_scope_201103271.zip     --->  Design01.cydsn-->   main.c--->  line 327
if  triggerActive?16:0     then trig = 10H or 00H
if (triggerActive?16:0)    then OK

I measure the triangular signal U = 0-0.1V / 0-5V (not <0) and F = 100 - 5000 Hz
 He served on both channels in parallel. For any amplitude and frequency I see step 2 bytes and figure2

I use a very simple program for LabVIEW (5.0):
 1: send a set of bytes for example
 C001 0000 0001 or 8000 0200 00C0 0100 0000 2001

 2: get a 4096-byte response.
 

hli
user_78878863's picture
User
2052 posts

> http://www.cypress.com/contests/adm_scope_201103271.zip  

I see - this isn't the current project. Since I cannot update this page anymore, and Cypress didn't post the final projects anywhere, I have uploaded it to hendriklipka.de/misc/adm_scope_20110421.zip (it's 13Mb). It contains bug fixes, several enhancements and (hopefully :9 better documentation.

It also contains a client - can you please use it testing also? It makes setting up the scope much easier.

> if  triggerActive?16:0     then trig = 10H or 00H
> if (triggerActive?16:0)    then OK

What I wanted to know was what the error was you have seen. I think the first line isn't even valid C... Also, I have reworked the whole triggering, please look at scope.c.

> I measure the triangular signal U = 0-0.1V / 0-5V (not <0) and F = 100 - 5000 Hz
>  He served on both channels in parallel. For any amplitude and frequency I see step 2 bytes and figure2

Two questions:

- when looking at figure 2, the signals seem normal to me - there is a proper wave. What did you special to get figure 1?

- How did you get the 3 graphs shown in figure 2? Did you 3 consecutive measurements or are they from a single run (just scrolling the output)? When these are different measurements, did you restart the scope in between? (There was a bug with re-setting the DMA properly, which should have been fixed by the latest version)

> 1: send a set of bytes for example
> C001 0000 0001 or 8000 0200 00C0 0100 0000 2001

When I parse your second string properly, it sets the sample rate to about 1900Hz. This means that you get about 19 samples for a 100Hz wave - which corresponds to figure 1.

Can you verify these problems when using the supplied client? (When I did my tests, I used a sample rate of at least 100k for a 2kHz signal).

 

user_49271930's picture
User
300 posts

In Figure 1, a signal with small amplitude 22-36 bits (430 - 700 mV).
  In Figure 2, drawing on the left - the team C001 0000 0001, when I turned CY8CKIT-014.
 the average figure - the team C001 0000 0001 a few minutes. You will see that the second (blue) signal is lagging behind.
  figure on the right - the team C001 0000 0001 a few more minutes of the second signal is delayed even more.
  I can repeat the action, if necessary, but I do it slowly.

  Oooooh. To explore your new project I need a few days, even months. I have only CY8CKIT-014 and very little experience in working with the PSoC. But this project is very interesting for me. I will study it.
 

user_49271930's picture
User
300 posts

I gave the command 01 and the connected signal DC то to the analog inputs (adm_scope_201103271):
 Top figure - the signal a little more than 0
 the average figure - Udda / 2
 lower figure - a signal of slightly less than Udda.
 I always see the noise at least 2 bits.
 I can not understand why there is no noise in the 1-bit.
 

Attachments: 
hli
user_78878863's picture
User
2052 posts

I'm not sure how good the performance of the PSoC OpAmp are when the signal is near the rails. There is nothing in my design which would create such noise. So this might be a question for the general PsoC5 forums.

user_49271930's picture
User
300 posts

Yes it is a problem not yours and not OpAmp, perhaps SAR_ADC.
 I replaced SAR_ADC on ADC_Delsig (until roughly and with errors) and saw what appeared resolution of 1 bit.
 I will update the PSoC Creator (1.0.0.7727), look for a solution, or ask a question on the general PsoC5 forums.
 Thank you very much for your help.
 

Attachments: 
Log in to post new comments.