• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC24F256GB110 USB interface

Status
Not open for further replies.

puneetnepsam

New Member
hi,

i am working on a project which uses PIC microcontroller.

i have completed all the modules in the pic and make them working(i2c uart rtc )..all these things..

i am using PIC24F in which we want to receive some data from the computer.
our controller is attached to the computer through the usb bus.
We are using PIC controller as a device and the computer attached to it as a host.
Actually through the computer some data comes and based on that data i have to process the modules.
currently i was doing through polling....but now i want to use interrupt..

i read one reference manual of USB on-the-go , where the process is explained...

its given that we have to create one data buffer of expected size,and when the host will send the OUT TOKEN, data will automatically get transmiited onto that buffer,
how can i intercept the data which is coming from

what registers i have to set...how to interface...
can anyone please guide me..

thanks in advance
Puneet Gupta
 

puneetnepsam

New Member
so if i have to use the PIC24F as a device....(in a deice mode)...
so in the codes provided my microchip.....which code i should look at....

usb_device.c ??
 

felis

New Member
Yes, usb_device.c and code for whatever device you are going to implement. There is a source tree configuration utility, I suggest using it instead of trying configuring it manually. They also have a manual, take a look at that too.
 

puneetnepsam

New Member
thanks a lot felis...
just one more thing.... i have downloaded usb stack from the microchip site...there are lot of codes....

when i read the documentation....
USB device-winUSB is the file which support my needs....it takes some commands from the computer host and executes the functions as per the commands...

can you please confirm it....i am using PIC24F as the device....and i want to use interrupt....rather than polling
 

puneetnepsam

New Member
its working...i am able to receive the commands from the host computer inside the OUTPacket buffer...i.e. data is flowing on the bus...

but when i send the response back to the host i.e from INPacket buffer
,...data is not flowing on the bus...

i read in USB 2.0 specification...that some token should be send from the host in both the cases...( sending and receiving)..

what could be the problem...
any idea.....
if u want...i can send u the code also....
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top