Adding new parts to MPLAB - Page 1
Forum section: electronics / general

author: itdontgo
author_rank: Regular Contributor
timestamp: February 05, 2016, 08:17:11 pm
content: Hi,Our new board uses a PIC16F18325 instead of the 1825 we've used up to now. I installed MPLAB X and it's like a kids toy and I really can't take to it. Sure it's better but I don't like it. I won't be writing software myself in a few years so I'm against giving it a go if I'm honest.Is there any way of adding new devices to MPLAB 8.92?

author: itdontgo
author_rank: Regular Contributor
timestamp: February 05, 2016, 08:28:32 pm
content: I really don't like this thing. Old MPLAB nice and simple, straight forward. Good for 8-bit chips. This is no good. I'm not a programmer I'm an electronics engineer. What is all this rubbish?

author: Howardlong
author_rank: Super Contributor
timestamp: February 05, 2016, 08:41:01 pm
content: I do agree, MPLAB X is a lethargic fat kid compared to MPLAB, the nimble old timer with a few odd nasty character traits you get used to. While it is possible to modify existing chips to pretend to be others in MPLAB, it's an uphill battle and you have to hope the programming and debugger interface for the new chip is the same.More and more I am suffering MPLAB X, you do get used to it, and it's a lot better than it was four years ago when they first released it. It's only really in the last year or so that I'd really consider it production strength.On the plus side, those PIC16F183xx chips are really pretty nice, I've been using them pretty extensively over the past month or so.

author: itdontgo
author_rank: Regular Contributor
timestamp: February 07, 2016, 01:37:31 pm
content: MPLAB X really is rubbish for simple 8-bit assembly projects. I'm sure it's great for C. It's a shame they could not do a v8 based update for new 16F and 18F parts as this is far more useful for these types of projects. 10 minute job taking all day here. I'm tempted to go back to the 1825 just because of MPLAB X

author: uncle_bob
author_rank: Unknown
timestamp: February 07, 2016, 02:50:33 pm
content: Quote from: itdontgo on February 05, 2016, 08:17:11 pmHiNo.They really really really want you to love X.Bob

author: KL27x
author_rank: Super Contributor
timestamp: February 15, 2016, 09:28:30 pm
content: QuoteI don't think it is practical/feasible to add integrated programmer/debugger support, but it should be possible (I've never done it!) to make a hex file, anyway, and use IPE/X to flash the device.Take the header *.inc for the closest device that has the same configuration word. Copy it. Change the name. And then go in and modify all the register names and addresses that need to be changed??If you are using a linker file, ditto?If you are doing a simple program, maybe you don't even need a header file to begin with. You could use a blank one and #define the special registers as you use them, looking up the absolute address in the datasheet as you go. If you're particularly masochistic, you could use absolute addresses.

author: mazurov
author_rank: Frequent Contributor
timestamp: February 19, 2016, 06:20:39 am
content: For PIC you don't need an IDE anymore, just write a Makefile and build/program from a command line. MPLAB used to be the only way to set conf.bits, now you have#pragma config, example ->https://github.com/felis/DMCI-XC8/blob/master/main.c#L9. Current XC8 knows about the part you're using.

author: Wilksey
author_rank: Super Contributor
timestamp: March 04, 2016, 09:33:43 pm
content: I used to be like that, but having used Netbeans, I can get on with it now, and I have created quite a few projects with MPLABX, I am using the 18345 in a new product, bloody internal osc is 2% off, frigging up the baud rate, used external crystal, bang on baud rate.

author: Howardlong
author_rank: Super Contributor
timestamp: March 05, 2016, 09:22:16 am
content: Quote from: Wilksey on March 04, 2016, 09:33:43 pmIf it's for standard serial UART coms, 2% should be OK. Granted it's not exactly precision, but 5% is usually accepted tolerance.What I have noticed is that the HFINTOSC is very jittery, it's not easy to get a reasonable tone out of the NCO for example without using a crystal or external oscillator.But they are nice chips, as are the low pin count 18313 and 18323. When you have feature packed devices like this it's hard to say 8 bit is dead, there's nothing else out there that has tese kinds of peripheral sets. And they still come in DIP for prototyping.I built an RF signal generator with FM modulation out of the 18313 a couple of months ago, the harmonics work reasonably up to VHF. I use it for sensitivity testing in the field in a tiny handheld battery powered device.

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 05, 2016, 03:48:41 pm
content: I'm intrigued; what is it about MPLAB X you don't like? To me it just felt slower, but on a good PC everything is pretty instant.Sent from my XT1039 using Tapatalk

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 05, 2016, 03:51:19 pm
content: Isn't the internal oscillator able to be calibrated? I know that wont help the jitter, but maybe you can compensate for the 2%?Sent from my XT1039 using Tapatalk

author: Howardlong
author_rank: Super Contributor
timestamp: March 05, 2016, 04:16:25 pm
content: Quote from: The Magic Rabbit on March 05, 2016, 03:48:41 pmMostly it's the speed (lack of it) of the debugger/programmer interface. Parsing of projects is also slow, and for me, being an old fart, I see it as a largely unnecessary feature but there doesn't appear to be a way to switch it off. Lastly, the UI is unnecessarily cluttered with stuff I never use, while frequently used things are hidden away. I never understood why there's a whole menu for refactoring for example, unnecessary noise in a PIC dev environment. A good example of what it should look like is in MPLAB Xpress.

author: dannyf
author_rank: Super Contributor
timestamp: March 05, 2016, 04:34:38 pm
content: I would 2nd the critism on mplab x: it is full of features that I don't use. All I need is a utilitarian interface (aka older Keil + IAR).Mplab xpress is a worthy compromise, I think.

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 05, 2016, 04:49:44 pm
content: On my old netbook it's a bit slow and clunky, but on the main PC it's very swift. Are you running it on an older computer?Sent from my XT1039 using Tapatalk

author: Howardlong
author_rank: Super Contributor
timestamp: March 05, 2016, 08:26:50 pm
content: Quote from: The Magic Rabbit on March 05, 2016, 04:49:44 pmI7 2.7GHz quad core 16GB ram, 1TB SSD any good?Edit: I am not saying it's unusable, just that the old MPLAB 8 is far more nimble than MPLAB X and isn't crippled under the weight of needless features I neither want nor can easily turn off.

author: dannyf
author_rank: Super Contributor
timestamp: March 05, 2016, 09:38:40 pm
content: QuoteOnly if you don't have a large, multi-project workspace. mplab x (stupidly in my view) scans your workspace on start-up and it can take a lot of time on start-up if you have a large workspace.My set-up is a dual Xeon 12GB ram, 128GB ssd dell workstation.

author: Wilksey
author_rank: Super Contributor
timestamp: March 05, 2016, 10:19:33 pm
content: Pentium 4, 2gb ram, XP Pro, MPLABX 3.20Core2 Duo 3gb ram, Win 7 pro (x32) MPLABX 3.20i7 16gb ram, Win 7 pro x64, MPLABX 3.20Yes, the i7 loads it quicker, but working within no noticeable difference that I can tell / see, other 2 are old work machines I use.AND! My latest ICD3 hasn't shit a brick yet, so happy days!

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 06, 2016, 02:05:21 am
content: The P4 is a bit long in the tooth - it'll work but I wouldn't really expect fast response. Core2 isn't too bad - that's what my laptop uses and it's OK as long as there aren't many projects in the workspace.As for the i7, particularly with SSD, you shouldn't be seeing much delay on things at all. I'm amazed you even notice any sluggishness on the interface. The only thing I can think of there would be if you have a graphics card that doesn't have its own RAM - even Microsoft Word can seem sluggish then.Obviously anything involving the programmer/debugger is going to be limited by the USB communication and PIC programming speed etc. That side of things always seems slow to me.I'm not sure what features bug you with MPLAB X - I just ignore the ones I don't want, but then I'm a hobbyist, and happy I get a pretty good development system for free. :-)Sent from my XT1039 using Tapatalk

author: Howardlong
author_rank: Super Contributor
timestamp: March 06, 2016, 08:01:33 am
content: Quote from: The Magic Rabbit on March 06, 2016, 02:05:21 amI think you're picking at straws if you're guessing the graphics card memory has anything to do with it!I am sure if you had been used to using the old MPLAB 8 you would see the difference.During my workflow, it's the programming delay that is the most frustrating as it plods along when you're debugging. To do the identical thing on the old MPLAB is three or four time quicker. You can improve things somewhat by tweaking a setting to maintain connection to the programmer but it's still far from perfect.My point is it has nothing to do with the specs of the machine and everything to do with bloated software written on a series of abstraction layers, some of which are square peg to round hole abstractions. An example is the programmer/debugger interface which needs lower level hardware access through the JNI, something that Java implementations often don't seem do well. The same applies to other similar environments like LPCxpresso or Code Composer Studio, both Eclipse based, although CCS seems to be the better one in terms of performance.

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 06, 2016, 11:47:27 am
content: OK, so it's not the GUI itself or syntax highlighting etc. causing an issue, it's communication with the debugger.I used MPLAB 8, it's what originally came with my PK2. I tend to debug with the simulator, mainly because MPLAB doesn't support any of the chips I have, so the programming is done via the stand alone app with auto-program enabled.The version of Java might make a difference. When I've used 32 bit Java on 64 bit Windows it's much slower than 64 bit Java. I think MPLAB has its own copy so maybe see if replacing that makes a difference? As far as I'm aware, if you use 32 Java on a 64 platform, there's some emulation layers it has to use that simply aren't required with 64 Java on a 64 platform.Sent from my XT1039 using Tapatalk

author: KL27x
author_rank: Super Contributor
timestamp: March 06, 2016, 09:23:45 pm
content: +1 I suspect something to do with software and OS you use.QuoteI have noticed speed varies on a whim. Mostly sluggish and unresponsive. But when the stars align, it is perfectly ok. What I'd call a normal, useable program. I have an i5.Java version, 64 vs 32, or perhaps even OS are under my suspicion. There's something so wrong it feels practically broken with my setup.

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 07, 2016, 01:12:53 am
content: That behaviour matches what I used to see with Java32 on Win64. It seemed to depend on which memory area Java had ended up being allocated. If I removed memory so there was only 4Gb in the machine it ran smoothly every time. With the usual 16Gb it was hit and miss until I installed Java 64.This makes me wonder if Java 64 could be installed into MPLAB - from memory, isn't there an ini file you can amend to point to a different Java version?Sent from my XT1039 using Tapatalk

author: Wilksey
author_rank: Super Contributor
timestamp: March 07, 2016, 02:46:29 am
content: It's Netbeans platform, so I would have thought it relies on Java.

author: Howardlong
author_rank: Super Contributor
timestamp: March 07, 2016, 05:37:50 pm
content: Quote from: The Magic Rabbit on March 06, 2016, 11:47:27 amIt's all of it, but programming and parsing are the worst offenders. The same occurs on both machines that I use, both I7, both 16GB, one 1TB SSD and the other 768GB, both Windows 10, but this has been the same since I've been using MPLAB X from Windows 7 through 8, 8.1 and now 10, and it's similar behaviour on the half a dozen other machines I've used. The programming thing seems consistently slow across a variety of specs of PC, so I strongly suspect a lot of application turning through JNI with the USB port. The parsing, unsurprisingly, slows down in accordance with machine specs. I just wish you could simply turn it off.Quote<scratches head> Do you mean the PK2 doesn't support the chips you're using?The simulator is indeed much faster. The only thing is there's a limit to what you can do with a simulator if you're developing real time systems, or want to use any non-trivial peripherals.QuoteMaybe, but MPLAB X (thankfully) comes with a pre-baked sandboxed Java, saving us from the nonsense of JRE hell.Now there's a beer if some Netbeans Guru can figure out how to give a nice clean UI to MPLAB X just like MPLAB Xpress, which is apparently "just" a cloud deployment of MPLAB X.

author: The Magic Rabbit
author_rank: Regular Contributor
timestamp: March 07, 2016, 07:04:55 pm
content: The PK2 happily supports the chips I'm using - I can programme them with the stand alone application. MPLAB X does not support the chips in conjunction with PK2. This has to be intentional to push people to upgrade, since there's no rational reason I can think of not to update the programming side even if debugging couldn't be made to work.Sent from my XT1039 using Tapatalk

author: ale500
author_rank: Frequent Contributor
timestamp: March 08, 2016, 06:20:34 am
content: QuoteInstant is the coffee, instantaneous is what it feels like. But it doesn't. It feels a bit sluggish... but debugging with the Pickit 3... that is slow. I recently got a J-Link, at least debugging is now instantaneous.I like Netbeans, I used to program Java in it so MPLAB X feels quite right. But i got, in the meantime, accustomed to eclipse (it became also better...) and finding equivalents seems sometimes difficult. It has to grow on you. It needs time and a project you have to do.