- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm trying to read the data sent from a HC-SR04 sensor in the computer terminal using TeraTerm. Before I started doing this, I made sure everything was working well in my program and the sensor and so it does: I used an LCD display and everything is fine. The problem is that I don't know how to send this data using the USBUART (CDC Interface).
The project can be found attached to this message. I am using the CY8CKIT-050 PSOC 5LP DEVELOPMENT KIT Could anyone please help me?
Thanks in Advance.
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As I could not open the attached project,
I reused my HC-SR04 project for CY8CKIT-059
and modified it for CY8CKIT-050 and USBUART.
During the task, what I noticed were
(1) I needed to add "USBUART_cdc.inf" file which was with the original application note.
(2) To use USBUART just like UART, I needed to do
===============
USBUART_Start(USBFS_DEVICE, USBUART_5V_OPERATION);
/* Wait for Device to enumerate */
while(!USBUART_GetConfiguration());
/* Enumeration is done, enable OUT endpoint for receive data from Host */
USBUART_CDC_Init();
===============
TeraTerm log
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Please refer to the link for USBFS-UART code example given below:
This code example demonstrates the USBUART implementation. It echoes received data to the Virtual COM port terminal.
Best Regards
Ekta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you're interested, I've attached a link to contributed source code that uses the USBUART with a simplified interface.
GetString() function that supports input character filtering. Includes menu-driven commands.
The simplified USBUART interface was intend to help users that constructed a UART API calls primarily for the 059-Kit board to switch to the 059-Kit on-board USB port with minimal changes. It simplifies the additional coding needed to address USB-specific controls.
The source code has the following features:
- UART to USBUART simplied API call interface.
- GetString() function call to process input string data that can filter the input to only allow characters for a input string type. Input string types supported:
- Unsigned and signed integers.
- Signed and unsigned numbers with values after the decimal point.
- Unsigned Hexadecimal numbers.
- Strings. (of course)
- File-system allowed string characters.
- A character-based menu driven system for terminal support. This can be user expanded as needed.
Len
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
As I could not open the attached project,
I reused my HC-SR04 project for CY8CKIT-059
and modified it for CY8CKIT-050 and USBUART.
During the task, what I noticed were
(1) I needed to add "USBUART_cdc.inf" file which was with the original application note.
(2) To use USBUART just like UART, I needed to do
===============
USBUART_Start(USBFS_DEVICE, USBUART_5V_OPERATION);
/* Wait for Device to enumerate */
while(!USBUART_GetConfiguration());
/* Enumeration is done, enable OUT endpoint for receive data from Host */
USBUART_CDC_Init();
===============
TeraTerm log
moto