I want to interface camera to MCB2300 through USB interface. Please let me know how this should be done.
And what processor do you have on your board - does it happen to have a USB host controller? Most LPC23xx variants don't, which you probably already know from reading the user manual for the processor.
Thanks for your reply. This board has got LPC2378 and it does n't have a host controller. Is there any way that I can connect camera to this kit (MCB2300)
There are TCP/IP-based cameras, and UART-based. Definitely look at TCP/IP.
Then why not choose a board that does have a Host controller?
Or, use an external Host controller chip: NXP have some, and there are others such as www.ftdichip.com/.../VNC2.htm www.ftdichip.com/.../VNC1L.htm
Or, as already mentioned, use a camera that doesn't require a USB Host
As of now I have an USB camera and it seems that I cannot use it with my kit (MCB 2300). If not USB, what are the other ways that I can interface camera to MCB2300 kit and use it in my application?
"As of now I have an USB camera"
If you got the board first, with no USB host, then why did you choose a USB camera?
Or, if you got the camera first, which requires a USB Host, then why did you not choose a board with USB Host?
There is an important lesson to learn here about carefully considering your requirements before spending time or money on acquiring hardware!
"it seems that I cannot use it with my kit (MCB 2300)"
Incorrect! Of course you could use it - nobody said that you cannot use it. But to use it will require that you add a USB Host of some sort.
"what are the other ways that I can interface camera"
Have you actually read any of the replies you have received in this thread? At least two alternative interfacing methods have already been mentioned!
In addition, cameras with SPI are available.
Have you checked your local camera suppliers to see what's available to you?
There's lots to be found; eg,
mbed.org/.../Camera_LS_Y201
www.sparkfun.com/.../10061
Thanks for the lesson. Neither the board nor the camera was acquired by me. They are already available here which were used by somebody else for their different applications. Before acquiring hardware for my application I am verifying whether I can make use of existing stuff
Remember that nobody knows anything about you, your project, your facilities, etc, other than what you clearly state in your posts...
I have MCB2300 board with LPC2387, this processor has the USB host controller. I have downloaded from npx.com the example 'USBHostLite for LPC23xx/LPC24xx V1.00' but it seems not work. Now, I have problem with the 'Host_Init' function, could you help me with any example code?
What problem, exactly, do you have?
"could you help me with any example code?"
How do you expect anyone to know if their example code will help you when you don't say what help, exactly, you need?!
You said you already have example code - from NXP. If you can't use that, why do you think that you will be able to use any other random example code?
What study and debugging have you done to determine where the problem(s) lie in the code that you already have?
Why don't you use the samples provided with the latest MDK (for USB host) ? They work very well - I tested them myself! P.S Why do you hijack threads?
First, thanks for your answer and sorry for my imprecise question. I have download uVision4.14, i have tested on my board the USBMem sample and it works. I don't find for MCB2300 the sample for the usb host. What samples for usb host do you mean? I need a usb host sample for recognize a usb device and so I download the USBHostLite example. In this sample the Host init function don't work: I have used uart debug string and also the uVision4 debug mode. The code that don't work is: USB_INT32U pinsel; PRINT_Log("Wait Host Init...\n"); PCONP |= 0x80000000; //Power USB
VICIntEnClr = (1 << 22); // Enable the USB interrupt source
USBClkCtrl = 0x00000009; while ((USBClkSt & 0x00000009) == 0) { PRINT_Log("wait...\n");
}
// Set port func bits so that both U1 and U2 can be hosts. USBPortSel &= ~0x03; USBPortSel |= 0x01; I have changed part of code with this: USBClkCtrl = 0x12; while ((USBClkSt & 0x12) != 0x12); but then I have a problem with this instruction 'USBPortSel' (any setting crash): USBPortSel &= ~0x03; USBPortSel |= 0x01; I don't have any device attached and the hardware seems ok. D- in connected to USBD-B with 15k pull-down resistor (pin 37) and D+ in connected with P031 with 15k pull-down resistor (pin 36).
"In this sample the Host init function don't work"
That tells us virtually nothing!
It's like saying, "My car doesn't work - what's wrong with it?"
You need to describe precisely what you expected it to do, precisely what it actually did and - most importantly - what you have done in your attempts to account for the difference!
"I have used uart debug string"
What UART debug string?
How did you use it?
What did you find out from using it?
"also the uVision4 debug mode"
Again, how, exactly, did you use it?
Did you use JTAG to access the actual hardware?