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.

[PIC] USB driver for storing the data into pc from the pic controller

Status
Not open for further replies.

saikiran@ees

Member level 3
Joined
Oct 2, 2015
Messages
58
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Location
Hyderabad
Activity points
455
Hi,

I am using dsPIC30F5011 controller and I am doing one project and wrote the code in 'c' ,in that project different tests have been performed using controller adc and store the data into eeprom into particular address.But I want to store the data of tests,including user information as a record into computer through USBLC6-2SC6.So, what is the protocol of usb and how to store the data into pc using usb by using progarm.


Thank You.
 

The USB controller on PIC devices is simply the hardware. You will almost certainly need to download a USB library and Microchip have suitable ones. Also download the application notes and other documentation about how to use the library functions. You will almost certainly want the PIC to act as a "device" to the PC "host".
The next step is to decide how you want to interact with the PC. Perhaps the simplest is to use a CDC interface which will let the PC see it as a serial link, although you can use other classes if you need to - it really depends on the software you want to communicate with o the PC side.
You will then need to write the required calls and callback functions in your code to initialise the USB peripheral, establish the connection and then pass the data.
By the way, the USBLC6-2SC6 is just an ESD protection device and is seen as a straight through connection. It really has no bearing on your question.
Susan
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
Thank You Aussie susan.
In Microchip,it showing application library of all pic controllers.But pic30f is not there and i am using c30 compiler.So how can i interface the usb to the pic and store the data.Is there any library for usb with dspic30f using c30 compiler.And other controllers like pic18f and 24f have usb feature is there and it also specified in particular data sheet.In dspic30f data sheet there is nothing about usb.


Thank You.
 

Yes, dsPIC30F5011 has no USB interface, it can't connect to USB without additional hardware. A FTDI (or other manufacturer's) USB to serial bridge would be a simple way to connect it.
 

Sorry if I misled you. I didn't follow my usual practice and look up the MCU data sheet. Therefore I missed the fact that there is no USB peripheral in that device.
As FvM says, use a UART interface to to a serial-USB chip, or select another dsPIC that has a USB peripheral - there are many, especially in the newer dsPIC33 families - and then follow my previous advice. However please be aware that using the internal USB peripheral can take a bit of setting up and understanding to get going; if you simply want to send and receive characters then the UART interface to an Serial/USB chip is far more straight forward.
Susan
 

Thank You Susan,
My requirement is to save the data into pc in a file with usb communication.That is data from uart is displayed on terminal.But my requirement is to save the uart data as a file in pc through usb and the data also stored in EEPROM.So how to program usb, I can't understand and is there any header file for usb to my dspic30f5011 controller.

Thanks and Regards,
M SAI KIRAN.
 
Last edited:

is there any header file for usb to my dspic30f5011 controller
No, because dspic30f5011 has no USB interface. as said.

My requirement is to save the data into pc in a file with usb communication.
The specification makes no sense. Even if you add an external USB interface to dspic30f5011 like one of the mentioned USB-to-UART bridges, you need an application program running on the PC that receives the data and saves it to a file.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top