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 communication between a pic and PC

Status
Not open for further replies.

amilaachala

Newbie level 6
Joined
Nov 15, 2012
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,356
hi guys,



can someone tell me how to configure usb communication on a pic18f using micro C .i want to send some data to the PC so how can i identify my PIC though usb port.how to create a discriptor.?????



thank you.
 

Zip and Post your code so that I can help. To create descriptor file, go to Tools>HID Terminal in mikroC and click Descriptor Tab. See image for the settings.
replace "Any name with the name you want. select mikroC option in the HID Terminal windows. click save descriptor and save the file in your project folder.
Then Go to menu Project>Add Files to Project... and in the dialog box select USB
dsc.c file from your project folder and click open in the dialog box.

Also see the link http://usbhidcommunication.blogspot.in/2011/10/simple-usb-hid-communication-project.html
 
thanks a lot for the reply...
I dont want any user interface in pc to send any data to PIC through usb. i just want to collect the data comming through usb.how can i achieve that????
 

thanks
hyperterminal is there to collect serial port data.rit??? usb??
 

Yes.


You can use this logger to collect all serial data, but portable on USB memory stick drive:



This device uses serial RX and TX and receives all data which some device send over RX and TX line.
 
thankss
it says about saving 'serial data (from serial port)' in a usb. but i want to save data which is coming through usb port ( data coming from HID) in the PC.
 

thankss
it says about saving 'serial data (from serial port)' in a usb. but i want to save data which is coming through usb port ( data coming from HID) in the PC.



To communicate with your USB device you need adequate PC software for that device.

That USB serial logger is for portable version (one of versions). You can easely send serial data from uC.

:wink:
 
After creating the discriptor file ...... what should i do next to communicate through USB. How do i create the "host software "...????????

please helpPP!!!
 

Do you want to create a vb.net or vc# app to log data coming from your PIC? If yes, you need Visual Studio 2008, 2010, 2012 and USB HID friver like mcHID.dll found at Helm PCB.

There is also USBHIDNetClass and some other drivers for USB communication. If you use mcHID.dll I can help in VB.Net code.

What data are you sending from PIC to PC? what will be the contents of Write_Buffer in mikroC Pro code?

Have you seen this link https://www.edaboard.com/threads/271146/
 
Do you want to create a vb.net or vc# app to log data coming from your PIC? If yes, you need Visual Studio 2008, 2010, 2012 and USB HID friver like mcHID.dll found at Helm PCB.

There is also USBHIDNetClass and some other drivers for USB communication. If you use mcHID.dll I can help in VB.Net code.

What data are you sending from PIC to PC? what will be the contents of Write_Buffer in mikroC Pro code?

Have you seen this link https://www.edaboard.com/threads/271146/

i want to send some data calculated inside my PIC, to PC periodically!!!!!!!!!!
 

You can use a timer interrupt for your period and USB communication to send data. 64 bits are sent at a time. you should use a vb.net application if you are using mcHID.dll to log data at the PC side. I can help coding using mikroC Pro and vb.net
 
You can use a timer interrupt for your period and USB communication to send data. 64 bits are sent at a time. you should use a vb.net application if you are using mcHID.dll to log data at the PC side. I can help coding using mikroC Pro and vb.net

thanks>>>>>
i'm using MikroC Pro ...... hw should i proceed???
 

See the USB example in mikroC Pro folder. Write a code and post it. You should know the address of USB RAM. To know the address of USB RAM for your PIC see the USB RAM section in the datasheet. See where the USB user data starts and ends. Which PIC are you using? Do you have Visual Basic 2010 or 2012?
 

i'm using pic18f2550 .......... i can download visual basic............. this is needed to design the host software rit???
 

What is the purpose of USB communication?

- - - Updated - - -

use this links(microchip libraries)**broken link removed**
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top