Hot!pic32 and harmony, what to do next ?

Author
nigelwright7557
Senior Member
  • Total Posts : 101
  • Reward points : 0
  • Joined: 2006/11/06 08:15:51
  • Location: 0
  • Status: offline
2018/07/08 13:07:39 (permalink)
0

pic32 and harmony, what to do next ?

I have created a new project using harmony.
Managed to set up I/o pins correctly.
Set system to have USB and A2D drivers.
I don't know what to do next.
How do I receive and transmit USB packets ?
 
#1

18 Replies Related Threads

    jcandle
    Super Member
    • Total Posts : 333
    • Reward points : 0
    • Joined: 2011/09/19 22:01:53
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/08 18:48:40 (permalink)
    3 (1)
    use the CDC demos as a starting point.  USB is a very steep learning curve.
    #2
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/09 04:54:01 (permalink)
    0
    jcandle
    use the CDC demos as a starting point.  USB is a very steep learning curve.




    I managed to get a dspic33 to code up ok.
    However the dspic33 is too expensive.
    I really need to use the PIC32MX210.
    #3
    jandle
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2017/05/27 06:57:30
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/09 05:21:43 (permalink)
    3 (1)
    apps\usb\device\cdc_com_port_single worked for me on a PIC32MZ, but it did take a bit of work for my custom board.
    #4
    BillP
    Super Member
    • Total Posts : 262
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/09 07:21:18 (permalink)
    0
    I show how to set up and use a USB dual-port CDC on an MX device in my b**k (can't advertise on this forum).  Send me a PM if you need a link.
    #5
    Jim Nickerson
    User 452 _
    • Total Posts : 4841
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/09 08:39:42 (permalink)
    0
    nigelwright7557
    jcandle
    use the CDC demos as a starting point.  USB is a very steep learning curve.




    I managed to get a dspic33 to code up ok.
    However the dspic33 is too expensive.
    I really need to use the PIC32MX210.


    Maybe you could consider the Pic32MM.
    I have the PIC32MM Curiosity Board, up and running with USB using MpLab X and MCC http://www.microchip.com/...etails/PartNo/DM320101
    #6
    qɥb
    Monolothic Member
    • Total Posts : 2955
    • Reward points : 0
    • Joined: 2017/09/09 05:07:30
    • Location: Jupiter
    • Status: online
    Re: pic32 and harmony, what to do next ? 2018/07/09 16:39:54 (permalink)
    0
    BillP
    I show how to set up and use a USB dual-port CDC on an MX device in my b**k (can't advertise on this forum).  Send me a PM if you need a link.

    The link still exists here: https://www.microchip.com/forums/m1040678.aspx
     
    :)



    This forum is mis-configured so it only works correctly if you access it via https protocol.
    The Microchip website links to it using http protocol. Will they ever catch on?
    PicForum "it just works"
    #7
    NKurzman
    A Guy on the Net
    • Total Posts : 16029
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: pic32 and harmony, what to do next ? 2018/07/10 12:14:43 (permalink)
    0
    You have a Thread keep you Post here.
    Starting new post, posting to other thread will not help.
    Answer Questions and be clear about what you want.
    You Have an Microchip Eval Board.  There are several USB Projects for it.
    There are also Microchip Tutorials.
     
    How do I receive and transmit USB packets ?
    The Real Answer? You write a Custom Driver.
    But that is NOT what you want.
    Which type of USB? (HID?, CDC? MSD?, ect) and will the PIC be the Master or Slave?
     
    And No Microchip will not assign an Engineer to teach you, Unless you are a Big Company.  And even then they would suggest a consultant.
    #8
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/10 12:21:23 (permalink)
    0
    NKurzman
    You have a Thread keep you Post here.
    Starting new post, posting to other thread will not help.
    Answer Questions and be clear about what you want.
    You Have an Microchip Eval Board.  There are several USB Projects for it.
    There are also Microchip Tutorials.
     
    How do I receive and transmit USB packets ?
    The Real Answer? You write a Custom Driver.
    But that is NOT what you want.
    Which type of USB? (HID?, CDC? MSD?, ect) and will the PIC be the Master or Slave?
     
    And No Microchip will not assign an Engineer to teach you, Unless you are a Big Company.  And even then they would suggest a consultant.




    I have designed my own pcb as it is for a USB oscilloscope. A microchip eval board is useless for my project.
    I need to use PIC32MX210 as it has fast a2d and comes in 28 pin PDIP. I don't want to start having to buy equipment for SMD. My previous scope project used a PIC18F4550 and I think that was HID but I didn't write the usb side I just modified someone elses project for my needs.
    The PIC is the slave. The PC controls the comms. The PC sends out data and gets back a result.
    I cant afford a consultant as the profits from the project would never allow it.
    So its likely I will abandon the project or try another vendors parts.
     
    Microchip seem to be pretty useless as far as help with PIC32mx.
     
    I did try to compile a dspic33 mla project and that worked fine when I integrated my own code.
    However the price of the device is too much for my project and it was also a very small SMD device which I cant handle.
    post edited by nigelwright7557 - 2018/07/10 12:40:29
    #9
    LostInSpace
    Super Member
    • Total Posts : 127
    • Reward points : 0
    • Joined: 2016/03/11 22:47:59
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/10 18:26:00 (permalink)
    5 (1)
    Nigel - I hear you on the Dev Board not being useful in your 'final project'. But they are useful because they have (close to) working, out of the box USB sample projects. This is extremely useful to learn how to setup complex projects such as the USB on hardware that you know works. Thus saving loads of time and hair pulling. I have several Eval Boards and use these for learning like this all the time.
     
    Or you can search around for some examples that may be close as you have done before.
     
    I have done projects like yours and I almost always start out using a UART to communicate to the PIC first. That way the code development is superfast (UARTS are simple to use, compared to USB). later on when nearing project completion you can rough out the USB and learn how it works using an Eval Board (or some other means) and then merge the two projects ditching the UART for a USB connection or 'pipe'. After all, Serial on a PC (usually) involves USB and (usually) virtual UART's all the time, you are really just going to move the USB to Serial connection into the PIC at some point in your project.
     
    Typically on a 'Instrument' like this, the PC is the controller and the PIC is the slave and it responds to commands from the master - so the exact same send / receive / acknowledge command set / design pattern can be used. The pipe between the PC and the PIC can be easily changed at any time  with little rewiring, simply buy pointing to a different 'pipe' (Ethernet anyone?).
     
    HTH
     
    #10
    NKurzman
    A Guy on the Net
    • Total Posts : 16029
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: pic32 and harmony, what to do next ? 2018/07/10 18:47:11 (permalink)
    0
    I Mostly Agree with Lost in Space.
    Microchip can not afford to give personal support to millions of Hobbyists.
    That is why the have a Forum.
     
    "I think that was HID but I didn't write the usb side I just modified someone elses project for my needs"
    USB is not a serial Port. You need to KNOW which USB it is. You then Need to tell that to Harmony.Then it will set it up.  You can look at the Harmony Sample to see how to use it.  An Eval Board will allow to test your USB communication with a know working Project.  But you Need to Find out what the PC needs first. If you are using the same program as before. Look in System Manager and see.
     
    #11
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/11 12:46:51 (permalink)
    0
    NKurzman
    I Mostly Agree with Lost in Space.
    Microchip can not afford to give personal support to millions of Hobbyists.
    That is why the have a Forum.
     
    "I think that was HID but I didn't write the usb side I just modified someone elses project for my needs"
    USB is not a serial Port. You need to KNOW which USB it is. You then Need to tell that to Harmony.Then it will set it up.  You can look at the Harmony Sample to see how to use it.  An Eval Board will allow to test your USB communication with a know working Project.  But you Need to Find out what the PC needs first. If you are using the same program as before. Look in System Manager and see.
     


    I am not a hobbyist, I have been a PIC designer for 30 years !
    If I am struggling then many other people will.
    It seems the Microchip system is only based around big quantity customers.
    This is why so many people descend on Arduino type systems where there is the proper support.
     
    I checked with the program writer and it is definitely HID.
    It doesn't need to be complicated or fast.
    I have been around and around with Harmony, MLA and MCC and cant find a system that works with a SPDIP PIC  with fast a2d and USB.
    So I looked elsewhere and while there are numerous example projects like mine none are fast enough for my needs.
    Its not the end of the world as I still have my 640,000 samples per second project that works well.
     
    #12
    NKurzman
    A Guy on the Net
    • Total Posts : 16029
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: pic32 and harmony, what to do next ? 2018/07/11 14:36:47 (permalink)
    5 (1)
    Because the Arduino Corporation has their Engineers answer calls from Hobbyist?
    Nope the Arduino is only supported in forums.
    You are slowing you down by not Answering questions or caring about what you are asking for.
     
    So, On Your computer:
    in C:\microchip\harmony\v2_05_01\apps\usb\device
    you will see "hid_basic"  Start there.  ( You will also see 14 other types of USB, each on different)
    The Instructions on how to use it would be in the Harmony Help.
    IF You had an Eval board you could run it.  But you can look at it as a starting point.
     
     
    #13
    Jim Nickerson
    User 452 _
    • Total Posts : 4841
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 07:12:17 (permalink)
    0
    Harmony has a "steep" learning curve.
    I think it is a radical departure from what Microchip has done in the past.
    Harmony comes with an overwhelming quantity of documentation and sample code.
    It took me some time to get my first Harmony Blinky Led project up and running.
    With each iteration of Harmony and each Harmony Project my skills have been improving.
    I will continue with Harmony as this seems to be the only future available when making bigger/faster Microchip PIC based things.
    I make use of Arduino for my ESP8266 based devices, it is very quick to get up and running, much like MCC.
    #14
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 07:17:35 (permalink)
    0
    JANickerson
    Harmony has a "steep" learning curve.
    I think it is a radical departure from what Microchip has done in the past.
    Harmony comes with an overwhelming quantity of documentation and sample code.
    It took me some time to get my first Harmony Blinky Led project up and running.
    With each iteration of Harmony and each Harmony Project my skills have been improving.
    I will continue with Harmony as this seems to be the only future available when making bigger/faster Microchip PIC based things.
    I make use of Arduino for my ESP8266 based devices, it is very quick to get up and running, much like MCC.


    I dug into some Harmony examples and documents online.
    It seems I have to open a USB handle to get into usb.
    So I have done that.
    I found some code for writing to usb and reading from it.
    At the moment I don't have any hardware to check it on but I am working on it.
     
    What seems to have happened is since my day the PIC's have become much more complicated and so you really need something like Harmony to do the ground work for you. For example a PIC18f4550 just has a couple of a2d registers whereas PIC32 has five 32 bit registers to setup.
    #15
    Jim Nickerson
    User 452 _
    • Total Posts : 4841
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 07:22:08 (permalink)
    0
    I always begin a new project with getting a Microchip development board set that comes close to what I will make.
    I make use of the samples provided with the board.
    Harmony supports a very large number of Microchip Development boards.
    I find it much quicker/easier/possible to debug my boards when I can compare my projects to running code on a Microchip Development board and Harmony sample application that already runs.
    #16
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 07:40:35 (permalink)
    0
    JANickerson
    I always begin a new project with getting a Microchip development board set that comes close to what I will make.
    I make use of the samples provided with the board.
    Harmony supports a very large number of Microchip Development boards.
    I find it much quicker/easier/possible to debug my boards when I can compare my projects to running code on a Microchip Development board and Harmony sample application that already runs.


    I have found it quite hard to find a harmony project that uses a SPDIP PIC but with fast a2d and USB.
    I managed to build a working dspic33 system but then was shocked at the prices of dspic33's so had to scrap it.
    I alos didn't want to us SMD.
    In the end I found the PIC32MX220F032B which has fast a2d and USB and is SPDIP.
    So I had to start from scratch with Harmony to build up my system.
    The Harmony part was easy I just needed to work out the top application layer code of the usb.
    I have just finished my own pcb and it will be getting made shortly.
    #17
    Jim Nickerson
    User 452 _
    • Total Posts : 4841
    • Reward points : 0
    • Joined: 2003/11/07 12:35:10
    • Location: San Diego, CA
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 07:54:59 (permalink)
    0
    It looks to me you could develop on the PIC32MX250F128D for which there are development boards.
    Once the sample apps are running then porting to your PIC32MX220F032B looks to be straightforward.
    You will not be able to stick with through hole, learning to deal with SMD is inevitable.
     
    #18
    nigelwright7557
    Senior Member
    • Total Posts : 101
    • Reward points : 0
    • Joined: 2006/11/06 08:15:51
    • Location: 0
    • Status: offline
    Re: pic32 and harmony, what to do next ? 2018/07/12 08:13:56 (permalink)
    0
    JANickerson
    It looks to me you could develop on the PIC32MX250F128D for which there are development boards.
    Once the sample apps are running then porting to your PIC32MX220F032B looks to be straightforward.
    You will not be able to stick with through hole, learning to deal with SMD is inevitable.

    I have done some SMD work but it is a pain.
    The dspic33 was minute and really need an SMD oven to solder.
    My experience with dev boards hasn't been good. I bought one for ethernet and IOT and really struggled with it getting it working. The SPI bus wouldn't talk to ethernet chip. I got in touch with Microchip and things went back and forth until eventually they agreed there was an issue with that dev board and indeed it didn't work with ethernet.
    I wasted a lot of time and money on that project.
    #19
    Jump to:
    © 2018 APG vNext Trial Version 4.5