Best way to learn MPLAB harmony - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: July 26, 2020, 07:57:39 pm
content: Hi,I have been writing C code for years and also have some C++ experience but when I looked into Harmony and the whole framework it is very confusing coming from a simple/straight C background. Looking at some of the videos was not much more clarifying either.Can anybody:- make share some basic concepts about it so I can have some overall understanding of where to put my code and interface with the harmony-generated code.- suggest very good and simple resources to understand how the whole harmony framework works and again how to write my application around it.Many thanks

author: DrG
author_rank: Super Contributor
timestamp: July 26, 2020, 08:51:49 pm
content: Quote from: ricko_uk on July 26, 2020, 07:57:39 pmYour post reminded me that I have to get back to that topic - Harmony 3. I was having a hard time understanding how to go about it and for a long time at that. Finally, some of it started to make sense, but I have not returned to the topic.First off, I was (still am) interested in the pic32 series and especially those that are available as dips. I have been bread boarding an MX270F260B. I decided up front that I would abandon plib. They are not going to support it and I just figured that if I wanted to learn, I would do it their way and if I got really good at it, I could do it my way.So, this tutorialhttps://github.com/Microchip-MPLAB-Harmony/Microchip-MPLAB-Harmony.github.io/wiki/Create-your-first-peripheral-library-(PLIB)-projectproved to be the best that I could find, for me.It is NOT for a MX270 and that was an issue, but I worked through that with a little data sheet for the SAM21 that it was written for. After a while, I was able to get a Harmony 3 LED flasher and I then spent a lot of time looking at the generated code.I should add that I am not interested in writing full blown Harmony projects, just using Harmony within "normal" C projects so as not to rely on plib.Not sure this will help at all, but again, your post reminded me

author: ricko_uk
author_rank: Super Contributor
timestamp: July 26, 2020, 08:59:56 pm
content: Thank you DrG...!useful link! And also relevant the other things you mentionCouple of questions:Quote from: DrG on July 26, 2020, 08:51:49 pm1) how do you use Harmony within normal C? That's very interesting! Any pointers?2) I just posted another post in this room because after installing MPLAB to a new machine it does not find the PLIB. Perhaps you have a suggestion?Thank you!

author: DrG
author_rank: Super Contributor
timestamp: July 26, 2020, 09:06:03 pm
content: Quote from: ricko_uk on July 26, 2020, 08:59:56 pm1. Yes, follow that tutorial, that's what it is about.2. Yeah, I remember that I had to futz with plib and downloaded it again or something, I don't really remember, but what I do remember is that I came away even more certain than plib is not a good mix with pic32...maybe others have a different opinion though.But, if you need the paina simple search on "pic32 getting plib to work" will get you a whole bunch of folks with varieties of that problem.

author: ricko_uk
author_rank: Super Contributor
timestamp: July 26, 2020, 10:14:57 pm
content: Thank you DrG

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: July 27, 2020, 09:21:41 pm
content: i have done a few h3 projects now.it is a steep learning curve.if not doing io by hand you have to add the hardware drivers visually using drag and drop.i actually like h3 as it gets around coding all the config files using pramas.i prefer visually programming clocks/io etcfor me it was just a matter of getting stuck in and having a go.if you get stuck microchip forums are there to help.

author: ricko_uk
author_rank: Super Contributor
timestamp: July 28, 2020, 12:50:27 am
content: Thank you,I have been writing in C quite a bit, a little less in C++. Was that your starting point too or are you an experienced coder?Out of curiosity and just for time-budgeting purposes, how long did it take you to learn it so you get to a point where you could comfortably understand it and write simple programs using serial comms, interrupts and controlling IOs? I know that's a "how long a piece of string is" kind of question, but at the moment I am looking just a rough idea.Thank you