- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello community,
I use the PSoC 5LP and I would like to send datas from the PSoC to my PC.
The example project "HID Mouse" works fine.
This is my code:
#include <project.h>
#include <USBUART_cdc.h>
static int8 Data[3] = {0x01, 0x02, 0x03};
uint8 length = 3, x;
void main()
{
CyGlobalIntEnable; /* Enable global interrupts. */
USBUART_Start(0, USBUART_5V_OPERATION);
while(USBUART_GetConfiguration()==0)
{}
USBUART_CDC_Init();
for (;;)
{
while(USBUART_CDCIsReady()==0)
{
}
USBUART_PutData((uint8*) Data, (uint8) length);
}
}
I also have already installed the windows driver.
On my device manager I can see the new COM-Port.
The problem:
I cannot see anythink on a terminal program.
Whats wrong?
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You won't see the data as it is not ASCII it is non printable characters the 01hex = start of heading ,02hex is start of text and 03hex is end of text. change the data to 31 hec ,32 hex and 33 hex and see it it displays on your terminal program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You won't see the data as it is not ASCII it is non printable characters the 01hex = start of heading ,02hex is start of text and 03hex is end of text. change the data to 31 hec ,32 hex and 33 hex and see it it displays on your terminal program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Perfect, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FYI: some terminal programs (RealTerm, for example) allow you to display hex values rather than ASCII. In case you wanted to verify that the correct non-ASCII data is being sent.