- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
http://www.parallax.com/downloads/stampplot-pro-software
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@ze,
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.
odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perhaps my old projects will help you: ADC-> UART and ADC-> USBUART
But they are very ancient. PSoC is changing very quickly.
1. PSoC_OSC_12bit.zip on this page
and oscilloscope program for this project.
2. ECG.ZIP and ECG_PGA.zip on this page
For them, there is a primitive viewer: ECG_PSoC.exe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for all the examples and tips on this subject.
already can do the data transfer between the psoc and the computer.
my problem now is, with the format of the transmitted data or setting the plot program.
see the attached image, I'm getting data but not graphic. what can I be doing wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you go here -
http://www.selmaware.com/stampplot/samples/samples.htm
There is example code, mainly AVR code, that give you an idea of
what to send and its format.
In the help files for Stamplot, in windows start menu, stampplot menu,
there is a section on plotting and serial links you should read.
The data you show in the image seems wacky, that is from "normal" numbers to
impossibly large values, seems like first tackle sending one float value converted
into a string and get that right. Terminated by CR. Then send 2 floats, seperated by comma,
then CR.
Use a logic analyzer to confirm your send are correct, or set up a Rx channel on PSOC
and view its received data with debug/breakpoint.
El cheapo but very capable logic analyzer -
Regards, Dana.