Del_Sigma ADC conversion of 1Khz signal in PSOC5lp

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

cross mob
Anonymous
Not applicable

How can i use Del_sigma ADC (differential mode)to sample and convert sine wave signal of 1Khz ? And then i have to send the conversion result through UART to PC.  I tried doing so but i get some random symbols. How to overcome this? Resolotion of ADC is  8 bit and conversion rate is 8000sps. UART at 115200bps.

   

Thank you

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The asterisk in "%d*" format requires an additional parameter, I would suggest to delete the "*".

   

Increase the heap size to 0x200 (in .cydwr view -> System -> Heap size

   

Your temp-variable is quite too short and sprinf() will overwrite some sram. I suggest to increase it generously to temp[20].

   

 

   

Happy coding

   

 

   

Bob

View solution in original post

0 Likes
12 Replies
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received
        Post your project so we can determine what is wrong with the code.   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You probably do not send ASCII characters through UART which will display in a terminal emulation program (as PuTTY) as rubbish. You may need to convert the int8 values to a character string. This will increase the UART traffic by a factor of 4.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

here is the code..

   

 

   

and sometime output comes as

   

   

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Cannot open your project, please use

   

Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The baud rates do not match!

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

code

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The asterisk in "%d*" format requires an additional parameter, I would suggest to delete the "*".

   

Increase the heap size to 0x200 (in .cydwr view -> System -> Heap size

   

Your temp-variable is quite too short and sprinf() will overwrite some sram. I suggest to increase it generously to temp[20].

   

 

   

Happy coding

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you.
 

   

But how delta_sigma modulator senses negative voltage? How the Quantizer level will be distributed?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The input to any pin is restricted to GND .. VDDA which is 0 to 5V or 0 to 3.3V max.

   

Negative values you will get when AN_IN1 <  AN_IN2.

   

Quantizer level will be distributed  Sorry, I do not know what you try to ask with this.

   

 

   

Bob

Anonymous
Not applicable

In the case of  AN_IN1 <  AN_IN2 what will be the output? will ADC automatically set the signed bit?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

See page 21 of datasheet.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you.

0 Likes