send a byte to the PC lpcxpresso11U14

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

send a byte to the PC lpcxpresso11U14

2,527 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Thu Nov 29 07:38:48 MST 2012
Hi! i'm working in a project using the lpcxpresso11u14, i've to send a byte ('A' for example)from the board to the PC.
I have an application programed in C# in the PC (using the library LibUsbDotNet) that is always reading the USB, and print in the command line that it reads.

a) I need you to help me to look for a simple library and a simple example of code just to send a BYTE please.
b) I don`t know if using the nxpUSBlib i can do that i want (sending a simple byte)
c) I don't know if i have to use HID libraries or another. (because i use the USBInfWizard to install the driver necesary to work with LibUsbDotNet library, and it recognizes the lpcxpresso like a "USB with DFU capabilities").

I've read the  GenericHID.c code and it looks very difficult to me (and i don't know if this library really could help me)

I JUST WANT TO SEND A BYTE

I really need your help!!

thank you very much!!
Labels (1)
0 Kudos
Reply
10 Replies

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Sat Dec 22 18:23:18 MST 2012
Please, anyone could help me ?
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Fri Dec 21 04:03:46 MST 2012
The name of the .in is "nxpUSBlib VirtualSerial", and it is in the VirtualSerial folder, but when i try to find it clicking right in the "Other devices" etc.. the PC can't find anything! (I have tried with other drivers, and the pc recognizes the .sys and .dll but not .ini). Now i have removed the old driver, and i can't debug anything (even installing the old driver) (now the lpc, always is in "other devices", never in USB drivers like before).

Should i do anything special?

Thank you so much!
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Thu Dec 20 16:17:19 MST 2012
The computer can't find the .ini  .  Should it be in the "Virtual Serial" folder?
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Thu Dec 20 13:19:28 MST 2012
THANK YOU SO MUCH!!

Do i need any FTDI or another external chip to communicate with the PC, or i can get it just through USB?
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Thu Dec 20 11:52:00 MST 2012
You are missing a step. In Windows you must associate your device with the standard windows USB serial driver, usbser.sys, using the .ini file included in the directory where your VirtualSerial example source code is located.

Open you device manager and look for a device called "LPCUSBlib CDC Demo". It should be located under "Other devices".
Right click on this device (it should have a yellow warning sign on it) and select "Update Driver Software..."
Browse over to your Example_VirtualSerial directory and click next
It should find the .ini file and say it is Installing driver software...
A security dialog window will probably pop up warning you that it can't verify the publisher. Tell it to install the driver anyway.
Once you do this, be patient. It will take about a minute to complete. Then you should see the COM device in the usual place.

Unfortunately these steps were not included in the readme.txt in the latest release. We will add them in for subsequent releases.
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Wed Dec 19 19:06:42 MST 2012
Hi all!

Sorry for the other questions.

Now i have run the Virtual Serial Port code into my lpcxpresso11U14. I could load it correctly, but when i try to look for the COM connected to the computer, i can't find anything.

I am using a simple COM test program and it also show an error. "No COM connected".

I have debugged the code, and it waits in cr_startup_lpc11u.c line 344, here;

void HardFault_Handler(void)
{
    while(1)
    {
    }
}

Do i have anything special to achieve the connection?

I REALLY NEED YOUR HELP

thank you so much ( and sorry for my English!)
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Sun Dec 16 11:33:48 MST 2012
i'm trying to use the USBVirtualSerialDevice. Are you sure that these libraries are not programing to the baseboard?

Because there are function like init_LEDs, init Buttons, ... etc ( and i don't think that these functions are thought for lpcxpresso )

thank you so much!

0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Tue Dec 04 15:14:31 MST 2012
No special hardware needed, just a USB cable.

First get the VirtualSerial example going with a simple terminal emulation program like Teraterm. The example will echo any character you type in.

Once you get to the C# part you are on your own. Or at least someone else can break in to help you out, I don't have experience for this part.

No need for the base board unless you want to work with other peripherals.
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nasib on Sat Dec 01 05:38:20 MST 2012
Thank you so much. But, do i need any special hardware , or i can use just the usb wire?

in brief, i have to program the virtual serial port in the MCU and open a COM in the PC with C#, doesn't it?

A little question, the examples in the .ZIP are programed in order to be run in the lpcxpresso or in the BaseBoard?, because i saw in the code something like LEDS_ON and there are just 2 leds in de lpcxpresso board.

thank you so much! (sorry for so many questions)
0 Kudos
Reply

2,510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drs on Fri Nov 30 16:21:29 MST 2012
Probably the easiest way to do this would be via a COM port. You should be able to open one in C# and there is a VirtualSerial example in nxpUSBlib that should do what you need on the device side.
0 Kudos
Reply