Difference between revisions of "PIC32MX: USB Communication with a PC"
NickMarchuk (talk | contribs) |
NickMarchuk (talk | contribs) |
||
Line 9: | Line 9: | ||
Use the example projects in the Microchip Solutions/USB Device - CDC - Basic Demo and Microchip Solutions/USB Device - CDC - Serial Emulator folders as guides. |
Use the example projects in the Microchip Solutions/USB Device - CDC - Basic Demo and Microchip Solutions/USB Device - CDC - Serial Emulator folders as guides. |
||
Send 1000 bytes of data to your PC from your |
Send 1000 bytes of data to your PC from your PIC32 and have your PC echo them back to the PIC32. How long does it take? Does it always take the same amount of time? What if you change to a different (faster or slower) PC? |
||
== Overview == |
== Overview == |
Revision as of 19:33, 27 January 2010
Original Assignment
Do not erase this section!
Your assignment is to set up the PIC32 to send and receive data with a PC using the USB communications device class (USB CDC).
This type of communication will allow you to talk to a virtual serial port on a PC, just like using the RS232 cable, except you will communicate with the USB cable that powers your PIC32 and achieve faster communication than you could with the RS232 cable.
Use the example projects in the Microchip Solutions/USB Device - CDC - Basic Demo and Microchip Solutions/USB Device - CDC - Serial Emulator folders as guides.
Send 1000 bytes of data to your PC from your PIC32 and have your PC echo them back to the PIC32. How long does it take? Does it always take the same amount of time? What if you change to a different (faster or slower) PC?
Overview
Summarize briefly what the page is about.
Circuit
Include a schematic and give any part numbers. A photo of your circuit is OK, but not as a replacement for a schematic.
Code
Where possible, make it a single piece of well-commented cut-and-pastable code, or at least make each function that way, so others can easily copy it. Most comments should be in the code itself; outside the code (on the wiki) should only be explanatory comments that are too cumbersome to include in the code.