You are here

transmitting sine wave to pc | Cypress Semiconductor

transmitting sine wave to pc

Summary: 12 Replies, Latest post by danaaknight on 19 Feb 2015 06:28 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
zé's picture
5 posts

 Dear all,


I have a wavedac8 block to generate a sine wave.  i use a ADC_delsig do converte the generated funcion to digital and i need to transfer that data to computer and see it (like an osciloscope) whith a program like simplot to see the sin funcion on the computer.. 


can you please help me?

user_14586677's picture
7648 posts

There are example projects, link to them on Creator start page,

The example projects are using ADC in various configurations,

and communications, such as UART, USBUART.


You can take the code from these and adapt to your application.


Regards, Dana.

zé's picture
5 posts

 thank you Dana for your feadback,


i already look for almost all examples in start page. my problem is i don't find an example were was a comunication in real time beetwen psoc and computer of a sine function for example. do you know any of these example?


Kind Regards!



user_1377889's picture
10803 posts

The motto should be "Divide et impera". When you resolve the communication between PSoC and PC you are half through.

When you measure a sine-wave that will be the other half.

Lastly you just have to combine both parts to form your sine-wave communication.project.

For the communication: Easiest will be to use on PSoC side an USBUART component. It uses the USB interface on your development kit and emulates on the PC side a serial COM-port to which you can attach with a terminal-program. You may even use the Cypress Bridge Control Program which can be a bit difficult to handle but which is able to produce a simple graphical output.



user_14586677's picture
7648 posts

Are you using A/D to recreate sine generated by Wavedac8 or is A/D sampling

a signal chain that takes the sine and transforms it, like amplify, filter. In other

words use A/D to gen a bode plot by sweeping wavedac8 ? If former just take the

wavedac8 sine table and transmit it instead of adding an A/D into design.


Stampplot PRO is a freeware non commercial plotting program that will take serial

or IP treams and plot. You set it up on PC side with scripts to interpret serial data

coming to it.






/* Style Definitions */
{mso-style-name:"Table Normal";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:"Times New Roman";


At the most basic level if you have a serial connection working, and A/D working,

then all you have to do is take A/D samples and convert them to a char string and

send that via serial connection. sprintf() (library function) makes that easy to do


Regards, Dana.

user_342122993's picture
804 posts


attached demo project transferring and plotting Sin data to PC, using Cypress long forgotten application Multichart (included in the bundle). Using Simplot is similar, but it seems to have less features than Multichart. Tested on PSOC4200 (PioneerBoard), but should work on PSoC5LP.


zé's picture
5 posts

thanks for your precious information , but I must be making a mistake somewhere in programming. Attached is the test that I am conducting for more easily understand my problem .


user_14586677's picture
7648 posts

Some issues -


1) You should use UART_PutString(const char8 string[]) to transmit a string.


2) You have an isr component, but do not enable it or do anything inside the interrupt ?

Right now you start it, but inside ISR do not read uart status reg to clear it, so re-enter

it upon exit. You should either not use ISR or inside ISR read status reg.


3) isr component should be changed to edge triggered


4)            sprintf(OutputString, "%i",ADCResult);    should change formatting string to %l

or change the variable to an int16.


5) You run ADC at 16 bits but wavedac8 only produces 8 bit samples ? Why not

run ADC at 10 bits, make result variable an int, use Getresult16() rather than GetResult32().


Regards, Dana.

zé's picture
5 posts

 I think i solve the issues . ( except the ISR)


now i get some information on stampplot, not in graphic view but in a window whith some random character informations.

its a problem in  a program or is a problem in viwer dimension plot?

user_14586677's picture
7648 posts

Did you format the data being sent per stampplot pro. Their user

manual has the instuctions for how it wants to see its data and what

format and deliniation between samples, etcc.


Regards, Dana.

user_49271930's picture
496 posts

Perhaps my old projects will help you:  ADC-> UART  and  ADC-> USBUART
But they are very ancient. PSoC is changing very quickly.
1.      on  this   page
   and oscilloscope program for this project.
2. ECG.ZIP   and    on   this  page
    For them, there is a primitive viewer: ECG_PSoC.exe 

Log in to post new comments.