Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

USB device controller in LPC2148

Status
Not open for further replies.

embpic

Advanced Member level 3
Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Visit site
Activity points
5,213
Hello Master
i am using lpc2148 processor and i want use inbuilt USB controller. i tried and read data-sheet but not getting to configure the endpoints.
so help me to develop usb interface with pc.
thank you.
 

how to do communication with usb?
which datasheet to refer for that.
 

how to install usb driver and how to proceed further please share if any one know...............
 

HAve you downloaded USB standards documentation? What functionality do you plan to implement - do you plan to implement USB host functionality (and if so, what slave device classes do you intend to work with)? Or do you plan to implement a slave device, or a device which can have some of both functionality (USB OTG "On The Go")?? The USB standard is comprised of various classes of devices and functions.

Specifics on accessing the USB controller on the LPC2148 are easily obtained by Googling. Here is a link to the LPC2148 user manual. USB section begins in Chapter 9.


There are books by author Jan Axelson which you should look at if you are not familiar with the various USB standard device classes. You can also join her USB-related web forum to discuss USB-specific things - you can access this forum (Ports Forum) from her company website www.lvr.com
 
Last edited:

LPC2148 has a built in USB device controller, so it can only be configured as USB device.
Implementing any USB device requires writing a low level device driver for that which is in itself a big task. But good news is that Keil has done that too for us, If you use keils RL-ARM real time library, it provides the upper level functions for implementing USB device as HID(Human interface Device) as well as Mass storage Device.

Go through RL-ARM documents and reference material as well as example codes on keil's website. Also i have attached one RL-ARM reference guide for your ease.
For USB read chapter 5.


Hope this helps.
 

Attachments

  • rl-arm_gs.pdf
    2.6 MB · Views: 189

@ftsolutions thanx for giving little intro to usb classes and i will join this forum
@salmanliaquat i am using keil but don't know how to use RL-ARM real time library. i am simly create new project and proceed simply. and thanx for giving ref. pdf. and do u have any example regarding this one.
and provide me info. regarding how to use rl-arm lib.

thanxx....
 

RL-ARM comes as separate product(setup file), its not part of standard keil's arm compiler. you will have to install the real time library first.
Only then your codes utilizing RL-ARM will compile and run.
https://www.keil.com/rl-arm/rl-gettingstarted.asp
Follow the link above. there is also examples download link on that page.
 
  • Like
Reactions: embpic

    embpic

    Points: 2
    Helpful Answer Positive Rating
thanx sir for giving me ref. link.
and classes are isochronous, bulk, control,etc Is it classes?
and is there any windows .dll knowledge require for developing usb interfaceing?
 

Classes include HID (human interface device)- which can be mouse, keyboard, pointer, button keypad, or many other things and might be a little easier to implement, Mass storage - flash or disk drives, Display controller, Communication controller, Multimedia Device, Network controller, Docking stations, and more. Methods of connecting and transporting data are the isochronous, bulk, control, etc. If your device will comply with the defined class for a common device according to the spec, then it may work with the standard Windows/Linux device drivers. But if it does not, then you have to write your own device drivers for it on the windows or linux or Mac side as well.

USB interfacing is a very large and complex topic - you need to study up on it and review the documentation available on the internet for some time (days) to understand what it is you want to do. Also, consult the forum and look for books by Jan Axelson which I indicated earlier.
 

ok i have read datasheet i got some doubts as
1. as written in data-sheetwhat does it mean.
"When a device is first connected to the USB host, its signaling speed is
determined. It has Endpoint 0 configured to accept a Control pipe. In addition,
every new device that is plugged onto the network is assigned address 0."

means when i connect to pc then it will assign address me that mean i don't require
to give any kind of address. as my device will be slav.

2. if my data is in control form then only endpoints related to control transfer will genrate
interrupt for that.
 

I am not sure if I fully understand your question, but the host (PC in your example) will assign an address for your to use - but all transactions on USB are initiated by the host in one way or another - you do not speak unless told to do so. The USB forum I pointed you to has several experts in USB device development and can answer your questions better than I can, anyway.
 

ok i have studied the type of class and types for transfer method and according to me i have to go with HID class because i need to control the controller display and operation using PC and controller also will reply as per sensor will read the reading after some interval. or sensor will send when it compare with given reading.
Am i right?
 

is it better to use ready made routines of HID or may i build my own?
because i saw the function but not getting correctly and i started to write function from only datasheet not getting the things how to define or how to use?

- - - Updated - - -

i saw the datasheet but there is nothing descibe about HID class.
 

example provided on nxp's site giving error as

Rebuild target 'MCB2140 Board'
assembling Startup.s...
compiling usbhw.c...
compiling usbcore.c...
compiling usbdesc.c...
compiling usbuser.c...
compiling hiduser.c...
compiling demo.c...
*** Scatter Error: no default 'Read/Write' range selected
Target not created

is there any wrong with compiler i just select the device and F7 it give me this error.

- - - Updated - - -

both example of HID gives this error
 

then any other option.

- - - Updated - - -

i think it is lincesed because on the time of debugging it is not giving warning of any kind that is Evaluation version and limit : 32k .
 

i have studied the classes just need to configure the resistors so please help me.
 

Hello masters please provide me solution for that from long days i am suffering from problem in communication.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top