As usual the answere is : That depends...
If you are continously sending your data via an UART check first if all the bits can pass.
Let us estimate: 60 ksmp/s times 12 (for the overhead like stop-bits etc) that is 720kbaud. That's a lot and I question if that would be possible.
If you are not continously generate data, there is an upper limit for yout data, for instance 250 data-points. In this case I would suggest to use a software- technique (circular Buffer) to store the data and to send them out concurrently.
Hope that helps. Have fun
I will most likely only need to capture 500 ms of data every 1-2 seconds. That means I'll have 500-1500 ms extra to send the data.
How big of a circular buffer should I try?
- Using CPU to transfer data from ADC to UART will be time consuming process
- As told in the previous post, it might be difficult to achieve this. For 60ksps, 8 bit samples, Baud required would be 60k X 10 bits = 480 kbps. Theoritically PSoC Creator component supports this Baud. It might be possible to achieve this with the help of DMA. The DMA can be configured to have the ADC_OUTSAMP register as the source and UART TX PTR as the destination. Every EOC can trigger the DMA to intiate this transfer. Since the goal is to sample 2 channels, Amux component(Analog Hardware Mux) has to be used. Switching between the two analog channels can be automated with the help of EOC.
- Since you intend to measure 2 separate analod channels, in case of Delsig ADC you have to use multisample mode. In this mode the maximum sample rate is about 91 ksps(45 ksps per channel).
Hi, I have a similar problem that arises in the forum and let me know if you found a solution. I'm sampling a signal to 1 ksps and am sending the data via Bluetooth to a speed of 115200bps with TX8_SendData function. The problem is that I think the buffer is full too fast and the receiver does not work in real time. I hope you can help with this. thanks
TX8Buffer.txt.zip 987 bytes
Your project belong to PSoC1.
1Kbps is easy to do but depend on rather ADC sampling rate.
Its decided by ADC bit width and data clock.
I don get that you said "receiver does not work in real time"
problem of receiver is depend on it, what use? how?
you have to check Tx empty before TX8_SendData()
Some comments on your source:
It is always advisable to post the complete project (in the right forum) using Designer "File -> Archive Project..."
You do not check your Rx for a character beeing ready.
After switching the AMUX the next 3 ADC-values should be discarted.
There is no buffer I can see that may overrun.
There is an example project using USBFS, described as follows -
This project enumerates USBFS component as a 8-bits, 32kHz, mono USB Audio Device. The audio data is passed to 8-bit DAC using two DMAs. One DMA is integrated in USBFS component used for sending and receiving data to/ from the memory cyclic buffer; the other DMA (VDACoutDMA) moves data from memory buffer to VDAC8.
The synchronization of incoming transfers with internal 32kHz clock is done by the software. It works when cyclic buffer overflows.
When internal 32kHz clock is faster compared to PC transactions, VDACoutDMA stops for a while to fill the buffer.
When internal 32kHz clock is slower compared to PC transactions, then one USB transfer is skipped.
This project doesn't work with PSoC5 silicon due to the use of DMA Endpoint Memory Management in the USBFS component.
You might consider working with this and modifying the example.
@jataalfer: please don't hijack old threads with new questions - please open a new thread. This will increase you chance of getting a good answer.
Also, note that this is the PSoC3 forum. If you post to a PSoC1 forum, you are also more likely to get a good answer (not all PSoC1 gurus read here...).