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 v8.00 bugs?

Status
Not open for further replies.

futz

Active Member
I've run into a few strange things in MPLAB v8.00.

1. The editor doesn't handle wrapped lines properly. After much confusion, involving, among other things, the cursor jumping semi-randomly to the top of code for no reason, I finally ended up just widening the editor window out till the lines I wanted to work on didn't wrap.

2. In this code snip (part of a much larger program) I have to leave a blank line after the "bnc a_30" command. If I leave the blank line out it doesn't assemble correctly (reads the following "movlw 0x31" as a comment).
Code:
showa		movlw	pa_val		;send "PORTA = "
		call	strsend
		movlw	0x08		;set bitnum counter variable
		movwf	bitnum
		movff	PORTA,temp1	;save PORTA value in temp1
a_loop		rlcf	temp1		;rotate bit into carry
		bnc	a_30		;is the bit set?

		movlw	0x31		;yes, rs_send $31
		call	rs_send
		goto	a_bump
a_30		movlw	0x30		;rs_send $30
		call	rs_send
a_bump		decfsz	bitnum		;decrement counter
		goto	a_loop		;counter not zero, go again
		movlw	0x0d		;rs_send CR
		call	rs_send
		movlw	0x0a		;rs_send NL
		call	rs_send
		return
It is possible this is being caused by a programmer error further up in the code, but I sure can't see it. The program assembles and runs correctly as long as that blank line is there.
 
Last edited:
It is possible this is being caused by a programmer error further up in the code, but I sure can't see it.
What do you see, after compiling, if you goto "view/Disassembly Listing" in MPLAB? Have you tried editing the source file in a regular text editor? It sounds like the editor isn't including one of the CR/LF characters after the ";is the bit set?" comment.
 
Last edited:
kchriste said:
What do you see, after compiling, if you goto "view/Disassembly Listing" in MPLAB?
Looks normal.

Have you tried editing the source file in a regular text editor? It sounds like the editor isn't including one of the CR/LF characters after the ";is the bit set?" comment.
Oh, now this is just weird! I went and took the blank line out, and now it assembles fine. :p

It was definitely behaving badly before. I tried it with and without blank line several times. There's definitely something a bit funky goin on here. :D
 
Oh, now this is just weird! I went and took the blank line out, and now it assembles fine.
Well it looks like I'll stick with the version of MPLAB I have for now. Bugs like that could drive you insane.
Thanks for the warning! :D
 
If you use code folding you really might go insane. Cold folding does some strange things some times. One of the funniest is that the first line of comment code at the top of the .asm file will be repeated throughout the the rest of the file when the code fold is collapsed under certain conditions. Amongst other things, sometimes any line that is slowly scrolled up from the bottom of the editor window is distorted. I would say the editor is doing things at the boundaries of its capabilities. It needs to be rewritten.

Since the years of rapidly closing and opening apps with as little motion as possible using all matter of shortcut keys and keyboard macros has unwillingly forged a nearly robotic accuracy and speed of Microsoft navigation, I don't mind just closing MPLAB the moment it starts to smell fishy.
 
Something I learned today over on the Microchip forums.
Do not use the "DEBUG=ON" or "DEBUG_ON" config option, MPLAB will automatically enable it in debug mode.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top