Hot!New to MLA

Author
BumpSplat
Senior Member
  • Total Posts : 126
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
2017/11/13 15:00:24 (permalink)
0

New to MLA

I'm new and trying a few things that I would like a little insight from you experienced folks.  My design is using a PIC24FJ64GB004.  I need to read from a USB memory stick and write the data through an SPI port to external memory. 
 
1) Why is this referred to as a library when it looks like an example project?  Do I start a fresh project and add a path to a library that was installed with the example "MLA" project?
 
2) I see a USB configuration GUI in AN1142 Figure 3.  
- Does this software still exist?  I can't find it so I figure it's a thing from the past that has been replaced (with MLA...?)
 
3) I've downloaded the USB Host MSD project and built it for my part.  
- I copied and pasted the project to a new name and directory (within the project Pane). There was a warning about hidden files not being copied.  Is this an issue?
 
3) I see an MLA for SPI but, the MLA presents itself as a project, not as an API library.  
- I'm confused as it looks like the MLA is a project, not a library.... ?
- I saw from another post that the MLA isn't compatible with the PIC24FJ family.  What's the quickest way to get off the ground with the SPI port?  Is there any example code snippet type stuff?
 
Thank you guru's of the land for all you do to keep newbies like me out of the mud. :)
 
-Tim
#1

11 Replies Related Threads

    DarioG
    Allmächtig.
    • Total Posts : 53416
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: New to MLA 2017/11/13 15:05:06 (permalink)
    0
    Usually I start with the most complex "section" : I take this one from MLA, copy to my own folder, resolve all missing files etc and make it compile.
     
    Then I change relevant pins and Config and all to my hardware.
     
    And, now, I start adding the "less complex" parts. So, in your case, I'd grab the MLA code that acts as a Mass-memory device host, get it working on your PCB, and add the SPI part for the external memory.
     
    thanks for the guru grin

    Andiamo a Berlino!

    #2
    BumpSplat
    Senior Member
    • Total Posts : 126
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: New to MLA 2017/11/13 18:06:02 (permalink)
    0
    That makes sense.  Is it best to open, copy the entire project, then save it to my own location?  The example is great, and I'm finding more answers as I dive into the help file... -T
    #3
    DarioG
    Allmächtig.
    • Total Posts : 53416
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: New to MLA 2017/11/14 02:26:39 (permalink)
    0
    Yes, I copy the code into my "source" folder (and usually also grab the sparse includes and place them into the same new folder...)

    Andiamo a Berlino!

    #4
    GoEk
    Senior Member
    • Total Posts : 98
    • Reward points : 0
    • Joined: 2012/09/27 00:32:28
    • Location: Sweden
    • Status: offline
    Re: New to MLA 2017/11/14 11:29:01 (permalink)
    0
    BumpSplat
    That makes sense.  Is it best to open, copy the entire project, then save it to my own location?  The example is great, and I'm finding more answers as I dive into the help file... -T


    The way I did it was to check which files in the MLA sample Project that where located in the actual MLA installation path and added those files to a fresh Project, i.e. no file copying, leave in MLA installation folder. These are the "don't touch library" files.
     
    Next I copied all files related to the MLA but that where loctated in the MLA sample Project folder to my own Project folder and added them to the MPLAB Project. These are the "modify the MLA parts to suit your own Project" files.
    post edited by GoEk - 2017/11/17 09:36:45
    #5
    BumpSplat
    Senior Member
    • Total Posts : 126
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: New to MLA 2017/11/15 16:44:10 (permalink)
    0
    Thanks GoEk.  I'm working that now.  The API descriptions are good but I'm struggling with small things like, within USBHostMSDRead() (AN1142) the first input value is the address.  I can't find a reference to where this value is collected/created.  A  simple example prj showing this operation would give me a real view of it being used.  Do you know where I can find  an example?   -T
    #6
    BumpSplat
    Senior Member
    • Total Posts : 126
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: New to MLA 2017/11/15 18:23:05 (permalink)
    0
    BTW - I found a really easy way to copy the project using the package option then moving it to my own directory.  It built with no errors. :)!
     
    #7
    GoEk
    Senior Member
    • Total Posts : 98
    • Reward points : 0
    • Joined: 2012/09/27 00:32:28
    • Location: Sweden
    • Status: offline
    Re: New to MLA 2017/11/16 00:35:45 (permalink)
    +1 (1)
    BumpSplat
    ... The API descriptions are good but I'm struggling with small things like, within USBHostMSDRead() (AN1142) the first input value is the address.  I can't find a reference to where this value is collected/created...

    I've only done a USB Device Project so far, no Host so I don't know about that specific issue. My experience is that Microchip has made a very good job of setting up the demo Projects for customization but with some details you need some studying; Google, the Jan Axelsson  site about USB, the Windows WINAPI documentation and a book about USB helped a lot.
    #8
    BumpSplat
    Senior Member
    • Total Posts : 126
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: New to MLA 2017/11/18 14:46:13 (permalink)
    0
     
     
    post edited by BumpSplat - 2017/11/18 16:23:17
    #9
    GoEk
    Senior Member
    • Total Posts : 98
    • Reward points : 0
    • Joined: 2012/09/27 00:32:28
    • Location: Sweden
    • Status: offline
    Re: New to MLA 2017/11/19 04:12:30 (permalink)
    +1 (1)
    I beleive this demo Project contains thumb drive access:
     
    http://ww1.microchip.com/downloads/en/DeviceDoc/dsPIC33E%20Audio%20Development%20Board%20Demo.zip
     
    It is for a dsPIC33EP512MU810 processor but that's just a PIC24 with DSP capabilities.
    #10
    BumpSplat
    Senior Member
    • Total Posts : 126
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: New to MLA 2017/11/21 13:01:00 (permalink)
    0
    Thanks GoEK,
     
    I'm so close.  I've read a zillion pages and have only one very basic question.
     
    Were is the configuration data given to me when I attach a device to my host after I initialize and enumerate the device?  I understand the functions but all require deviceAddress, deviceLUT,... as inputs.  Where do I find that data?
     
    Thx!  -T
    #11
    GoEk
    Senior Member
    • Total Posts : 98
    • Reward points : 0
    • Joined: 2012/09/27 00:32:28
    • Location: Sweden
    • Status: offline
    Re: New to MLA 2017/11/23 02:01:50 (permalink)
    0
    BumpSplat...
    I understand the functions but all require deviceAddress, deviceLUT,... as inputs.  Where do I find that data?...

    Now it is getting way to detailed, I have never done USB Host so sorry I do not know.
    #12
    Jump to:
    © 2018 APG vNext Commercial Version 4.5