SL electronic
Newbie level 2
lpc2148 virtual com
I was reading the AN10420, (usb virtual com port on lpc214x), when i have seen than this port dont exist. it say than is virtual and i think than it create this using the UART´S?.
i have my 2 uart´s in use, i use one of them to program the ucontroller and to control the program when it is running. The second uart is connected to a display than run with serial interface.
I want to save data by usb to my pc, and i need than the devise is recognice by pc.
I have read than there is a routines than its must be defined and ejecuted on reset.
I want more information, i dont know if i can copy this than is on packet in npx.com, with .h´s in my program, and use the funcion´s. How many functions i need?.
init_usb, usb_connect (whit the led in P0.30), and usb_transfer?
What is the name of usb_transfer => i need always a vector to interrupt like void USB_ISR (void) __irq {
I was reading the AN10420, (usb virtual com port on lpc214x), when i have seen than this port dont exist. it say than is virtual and i think than it create this using the UART´S?.
i have my 2 uart´s in use, i use one of them to program the ucontroller and to control the program when it is running. The second uart is connected to a display than run with serial interface.
I want to save data by usb to my pc, and i need than the devise is recognice by pc.
I have read than there is a routines than its must be defined and ejecuted on reset.
#include <LPC214X.H> /* LPC214x definitions */
#include "type.h"
#include "usb.h"
#include "usbcfg.h"
#include "usbhw.h"
#include "usbcore.h"
#include "mscuser.h"
#include "memory.h"
extern BYTE Memory[MSC_MemorySize]; /* MSC Memory in RAM */
/* Main Program */
int main (void) {
DWORD n;
for (n = 0; n < MSC_ImageSize; n++) { /* Copy Initial Disk Image */
Memory[n] = DiskImage[n]; /* from Flash to RAM */
}
IODIR1 = LED_MSK; /* LED's defined as Outputs */
USB_Init(); /* USB Initialization */
USB_Connect(TRUE); /* USB Connect */
while (1); /* Loop forever */
}
I want more information, i dont know if i can copy this than is on packet in npx.com, with .h´s in my program, and use the funcion´s. How many functions i need?.
init_usb, usb_connect (whit the led in P0.30), and usb_transfer?
What is the name of usb_transfer => i need always a vector to interrupt like void USB_ISR (void) __irq {