- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Cypress community,
I hve been working on a impedance meter project. I have a problem with the data transfer using the USBUART operation. Below is my program for the data transfer. I used teraterm as my COMport terminal. When i start the data transfer operation, my measurement result differ from the correct result. For instance, when testing a resistor, i observed 1k ohm at my LCD display which is a correct value, however, after i make connection to the COMport for the data transfer and start the operation, the value of the tested resistor become 500 ohm and even lower than that. This situation lead me to having a false measurement for the resistor value.
I hope this problem can be identify and solve.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I cannot see any USBUART component. The Keese_ADC component is not contained in the archive. So build fails and I cannot check the interrupts.
Declare EOC_Flag as volatile!!!! It gets changed in an interrupt handler, so it might get optimized-out.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cannot see more than CDCIsReady() is a function. You need to wait for it returning a nonzero value (TRUE). This indicates you may send more data.
Can you please post your complete project, so that we all can have a look at all of your settings. To do so, use
Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file. There are more pitfalls to check as interrupt priorities, buffer overflow etc.
Bob
- 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
I cannot see any USBUART component. The Keese_ADC component is not contained in the archive. So build fails and I cannot check the interrupts.
Declare EOC_Flag as volatile!!!! It gets changed in an interrupt handler, so it might get optimized-out.
Bob
- 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
There were two dependencies that could not be resolved and generated warnings. After removal project compiled fine. Only dep. left were cyAnnotation and cyReference libraries.
Try setting the ADC_IRQ priority (in .cydwr view) to something better than the default 7 (take 5, good music)
The line in main.c must read
volatile uint8 EOC_Flag = 0;
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tq bob for you reply. However, after i changed the ADC interrupt and the volatile uint8 EOC_Flag =0, no changes happen. the problem still there. i checked the USBUART_PutString function description and i found that the function will send the zero length packet data automatically after the transfer operation takes place.I think this maybe the reason to my problem. So, do you have any alternative method so that i can transfer my measurement data to my computer without any data loss or program corruption.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When you are using one of the Cypress kits you may use the built-in UART-USB bridge and use an emulated com-port as before. You will have to connect the UART component to the correct pins, check the schematics of the kit.
Bob