Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

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
Expert II

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
Honored Contributor II
        Post your project so we can determine what is wrong with the code.   
0 Likes
Bob_Marlowe
Expert II

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
Anonymous
Not applicable

here is the code..

   

 

   

and sometime output comes as

   

   

0 Likes
Bob_Marlowe
Expert II

Cannot open your project, please use

   

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

   

 

   

Bob

0 Likes
Bob_Marlowe
Expert II

The baud rates do not match!

   

 

   

Bob

0 Likes
Anonymous
Not applicable

code

0 Likes
Bob_Marlowe
Expert II

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
Anonymous
Not applicable

Thank you.
 

   

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

0 Likes
Bob_Marlowe
Expert II

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
Expert II

See page 21 of datasheet.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thank you.

0 Likes