Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MPLAB X Help

Status
Not open for further replies.
granddad,

MPLABX did hang a few times on me too. And yes, I tried typing directly in the watch window and got the same result. The registers woud appear under "variables" but disappear as soon as I tried to debug. Only the SFR's remained. What bugs me is that I can't remember what I did yesterday evening to get those registers to function properly.

John
 
I have been accused of not letting go... I wish I didn't suffer from that affliction.

In short, I got it working, but that was 45' ago. I have no idea what will happen tomorrow morning. Moreover, I don't know what the problem/cure was.

Here's the sequence and a few comments. Maybe it will help someone:
1) Uninstalled MPLAB X2.35, including the 2.35 "related" folders
2) Downloaded and installed ver. 3.0.02 (beta) -- It is almost 8% bigger, but I don't think the new version made any difference. My processor was still misidentified.
3) Did the new project dialog again with same source file and added the necessary support files.
4) Took care of project properties: removed case sensitivity; added absolute build; tool set defined as mpasm (not sure that is necessary); left other things default -- So far, except for the version difference, this is the same as before.
5) Built the project. Then started adding watch registers. The SFR's went well. Surprisingly, it allowed me to add my variables as SFR, but that didn't last long. It erased them on the first compile. You do need to compile/build after adding watch registers, a difference from MPLab 8.xx, as I recall.
6) After building, right clicked on the registers I wanted, clicked on add new watch, and they appeared in the watch window.
7) Compiled again and they were still there! That is the biggest difference I noted in behavior to this point.
8) Then tried all sorts of things to simulate/debug. Nothing worked. Kept getting an error that I must choose a simulator in the properties dialog. I pounded that key into the desk, and it still didn't work.
9) Then I had a little epiphany. I installed PK3 as the simulator, knowing full well one was not attached, and I had no intention of programming a chip. That failed, of course. But then when I re-clicked on the intended simulator, it recognized it, and everything from then on seemed to work, including synchronous injection and so forth. Most gratify of all, my variable registers showed updates of the polled PIR1 flag and captured TMR1 values.

Seems to be one of many bugs. Maybe version MPLAB XL will work better.

John
 
Last edited:
Well, I spoke too soon. The variable "count" disappeared. I added it again with the usual dialog, built the file. It was still there. Then debug = gone. Same sequence, except build for debug = still there, but whenever I try to debug, it disappears.

So far as I am concerned, MPLAB X is a lost cause, and there is no help from Microchip for it either. Its response (George Pauley) is:

upload_2015-3-28_21-9-49.png


Sure!

John
 
Hi John. Like the not letting go skill ... Its funny how learning stuff ducks and dives, yesterday I repaired a dead PK2 I had for some time (never managed to sort it ) but just from being involved with Camerart's problems posted here ... the penny dropped...fixed !
I have never had your particular MPLABX problem , however can I suggest you find and install an old version first o_O like 1.95 think its still on MC site . I'm guessing something in old version sets out a file correctly, new version does not ... just a guess.
G.
 
Funny you mention Oshonsoft. I spent time over the past two days looking at both Oshonsoft and AVR. The situation is not quite to the point of switching processors, but Oshonsoft looked like an option. Problem was that not a single enhanced midrange chip (12F1xxx or 16F1xxx) is supported. At least they aren't shown on the main page of the website. I have seen your and other people's comments about it, and other than the spectrum of chips covered, it looks like a very good option.

John
 
UPDATE

Old can be beautiful. Simulated my 12F1840 on a 16F1519 platform (SIM = MPLab SIM):

upload_2015-3-29_10-43-11.png


Spent a lot less time doing that than I did fusing with the dead horse, and I got useful results.

John
 
When I am treading water and someone comes by in a lifeboat, I swallow my pride and climb aboard.

Start to finish with the 16F1519 was only about 2 hours, and most of that time was me reviewing the SFR's to be sure I had everything set right. There is not much different, just a couple of duplications.

John
 
UPDATE

I got the program for eight reads debugged this morning. There was an obvious logic flaw, and the simulator helped immensely to find it. The program takes eight reads, sums them, then does right shifts to get rid of useless precision. The result is a value equivalent to a double read, but quite steady. For example, the total counts for a single period are 0x1cbd ±1 lsb (approx. dec. 7357 ±1).* The numerator is also ±lsb. So, worse case, you are seeing a display that is about ±0.1° or less. I do not know how accurate the values are.

I find that precision amazing, but it is time to put it away and work on my taxes. Thanks for the help trying to get MPLAB X working. The old 8.92 version is just so much more intuitive for Assembly.

John

*The device's oscillator is about 4.5 MHz, my PIC is at 32 MHz . The data are reported as 12 bit (i.e, about ±0.08°), so my measurement of the PWM seems to be pretty close to the predicted limit.
 
Funny you mention Oshonsoft. I spent time over the past two days looking at both Oshonsoft and AVR. The situation is not quite to the point of switching processors, but Oshonsoft looked like an option. Problem was that not a single enhanced midrange chip (12F1xxx or 16F1xxx) is supported. At least they aren't shown on the main page of the website. I have seen your and other people's comments about it, and other than the spectrum of chips covered, it looks like a very good option.

John

The enhanced chips are supported in the PIC16Simulator version of Oshonsoft not the older PICsimulator
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top