Unable to receive data from uart on pc using a dma

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

cross mob
Anonymous
Not applicable

Hello everyone,

   

I am comparitively new to PSoC and am doing a small project, "portable oscilloscope" . For this project i am using the CY8C3866axi40 chip es2, development board.

   

I am using a ADC_DEL_SIgma along with a dma to send data over to the uart. The adc has been set at continuos mode 8 bit resolution mode. The dma source address is "ADC_1_DEC_SAMP_PTR" and the destination adress is "UART_1_TXDATA_PTR".

   

Whenever i am trying to check the output waveform on MAKERPLOT software, i am getting rubbish data formats or no data at all.

Please help.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I think it is more convenient to use an external signal to the ADC start (no more than 8-10kHz for baudrate 11520).
Seems UART performs sending bytes of Tx buffer automatically, so the main loop of the program do not do anything.
Modified project is attached at the bottom.
Perhaps you are interested in my version of the oscilloscope PSoC_OSC_12bit.zip  is    here
or cardiograph ECG.ZIP   ECG_PGA.zip         can find  it     here.

View solution in original post

0 Likes
14 Replies
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Post your project for forum to look at.

   

 

   

    

   

          

   

“File”

   

“Create Workspace Bundle”

   

Use Firefox or IE, not chrome, to post.

   

 

   

 Regards, Dana.

0 Likes
Anonymous
Not applicable
0 Likes
Anonymous
Not applicable
0 Likes
Anonymous
Not applicable

this is the project

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable
        i do not know y it wasn't taking the project archive from firefox   
0 Likes
lock attach
Attachments are accessible only for community members.
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I think it is more convenient to use an external signal to the ADC start (no more than 8-10kHz for baudrate 11520).
Seems UART performs sending bytes of Tx buffer automatically, so the main loop of the program do not do anything.
Modified project is attached at the bottom.
Perhaps you are interested in my version of the oscilloscope PSoC_OSC_12bit.zip  is    here
or cardiograph ECG.ZIP   ECG_PGA.zip         can find  it     here.

0 Likes
Anonymous
Not applicable

 Thank you for looking into my code and uploading it again. I tried to run the code you had written and tried to see the waveform on the oscilloscope library you had provided on your link. But I am not getting any output on my screen. Also I am using a "Silicon Lab CP210x usb to uart bridge" i hope that doesnt make much significant changes?

and for the project that you had done yourself, can you give me a small walkthrough to the pin configuration and how the calibrating signal and triggering is worked on?

thanks

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

I could not understand what the project does not work for.
I hope that dactrial.cywrk.Archive011.zip you have your own program (MAKERPLOT software)
I hope you have agreed TTL signal levels and your PC.
I do so like on this picture.    RS_XX_modules.png
calibrating signal-creates meander 1Volt 100Hz to calibrate my devices.
triggering - is any signal. I usually use it as a timing signal:
Comp_1 comparator converts it into a digital (D0 channel oscilloscope)

0 Likes
Anonymous
Not applicable

 Yes, i have seen to it that the TTL signal levels meet the requirement. And as per you schematic, what are the input signals on
pin 6_7(Trigger Level)
pin 4_4(CAL)

   

pin 5_0(HI)

   

pin 5_1(LO)

   

pin 2_7(Vref)

It would be really helpful if you could help me out by telling what are the signals given and why? Thanks!

P.S. i am using a CY8CKIT-003 First Touch Starter Kit

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

This oscilloscope I created for testing device which has one analog and 2 digital outputs.
I needed 12 btiny ADC, so I used 2 bytes for data transfer.
These 2 bytes are sent to the UART continuously at a frequency of 10 kHz (2 bytes).
Program on the PC can start reception at any time, so it should distinguish between high and low bytes.
I use this for MSB (Bit 7 = 0 - a sign that the low byte is 0-6 bits ADC)
(Bit 7 = 1 - a sign that the high byte is 7-11 bits ADC and 2 free bits)
2 free bits I use as digital channels (P15.0 and P0.0).
Besides channel P0.0 I use to switch on the signal level using a comparator Comp_1.
Pin Description:
P6.7 (Trg_Lev) and P5.0 (Lo) - this is the entrance to an external amplifier (typically P5.0 = GND)
P5.1 (Hi) - input synchronization threshold: I accidentally moved the names with P6.7 (Trg_Lev) ((((((
P2.7 (V_REF) - this is the reference signal amplitude 1Volt to test my devices.
P4.4 (CAL) - closes the 2K resistor to ground with a frequency of 100Hz (meander to test my devices)
I created this project for CY8CKIT-003 and try to use the same connection as here.
Please note that the data in the 10 kHz I use baudrate = 230400!

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Project modification, if you moved to PSOC 4/5 you could use SAR at 8 bits

   

and exceed 100 Khz for sample rate. Just a thought.

   

 

   

Regards, Dana.

0 Likes
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

   

8 bits are usually small.

   

   

There is another variant: ADC_SAR1(25kHz_12bit)--->DMA__>SDcard:      SD_logger.zip

   

and    READ_SD.zip   to show result on the PC:

   

or such an   option.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The majority of DSO's today are 8 bits. They use averaging to extend

   

effective resolution to 10 bits or higher. That of course is only good for

   

repetitive signals.

   

 

   

Regards, Dana.

0 Likes