• AVR Freaks

Interface an USB to dsPIC33EP512MU814 microcontroller

Author
jeshra_279
New Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2012/08/08 04:36:24
  • Location: 0
  • Status: offline
2012/08/08 04:44:22 (permalink)
0

Interface an USB to dsPIC33EP512MU814 microcontroller

Dear All,
I want to interface an USB to dsPIC33EP512MU814 microcontroller. The microcontroller is suppose to work as host.  Any suggestion/references regarding interfacing would be helpful for me.
 
Thanks
R.S.
#1

3 Replies Related Threads

    DanielLongo
    New Member
    • Total Posts : 19
    • Reward points : 0
    • Joined: 2012/07/24 19:35:35
    • Location: Kansas City
    • Status: offline
    Re:Interface an USB to dsPIC33EP512MU814 microcontroller 2012/08/08 05:15:21 (permalink)
    0
    I'm sorry if my answer is obtuse, but I wanted to make sure that you meant the PIC will act as the "device" and not as the host. It may have been a typo on your part. Remember that the PC will always act as host as that is the USB protocol. The PIC must wait for the PC to communicate on the bus. If you are just getting started I would recommend downloading the Microchip Libraries and studying the code examples for your specific device family and how it relates to the information found in the datasheet for your specific device. Keep posting questions. Be as specific as you can be and people will be happy to help where they can. Again, I understand it is difficult at times via a blog post to discern exactly what people are looking for so I apologize if this was too basic an answer for just getting started. Keep asking specific questions. Also, if you really want to understand the process, use the example code only for reference. Write your own code and take each step (enumeration, communication, etc.) one at a time. This will make troubleshooting much easier and greatly increase your level of understanding. The prebuilt code examples are great for testing your hardware configuration, but that's where I would leave them.

    If at first you don't succeed, you obviously didn't use enough brute force.
    #2
    jeshra_279
    New Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2012/08/08 04:36:24
    • Location: 0
    • Status: offline
    Re:Interface an USB to dsPIC33EP512MU814 microcontroller 2013/01/03 00:22:27 (permalink)
    0
    Hi All,
    My requirement is -
    1) Read Data from flash memory and populate in excel sheet. (I don't want to use RS232 to transfer the data to PC from Microcontroller and create XL file; I want the microcontroller to create the XL file and populate them with the data from Flash memory).
     
    2) Transfer that XL file to USB pen-drive connected to the microcontroller.
     
    How can I perform Step 1 & 2 above? I am trying for Step 1 now.
    Any references/help would be useful.
     
    Thanks
    R.S.
    #3
    RISC
    Super Member
    • Total Posts : 5376
    • Reward points : 0
    • Status: offline
    Re:Interface an USB to dsPIC33EP512MU814 microcontroller 2013/01/03 06:20:26 (permalink)
    0
    Hi,
     
    I think you can implement this function using Microchip free libraries.
    I recommend you use a projet where CPU is HOST with MSD class.
    So, you can write a USB stick with a textfile with has an EXCEL compatible filename. You can even create a MSD driver in the PIC own FLASH memory
    e.g. "," delimited or so. it can be opened directly by EXCEL
    you can download libraries here : http://www.microchip.com/MLA
    After installation check the following projects :
    * c:\Microchip Solutions v2012-10-15\USB\Host - Mass Storage - Thumb Drive Data Logger\
    * c:\Microchip Solutions v2012-10-15\USB\Device - Mass Storage - Internal Flash\
     
     
    Regards
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5