PIC MPLAB Bugs

See:

Steve Smith says:

Just a note to the unsuspecting.

The INDF register in the watch window does not update on data read! Sent me round in circles for ages.

    decf    FSR,f       ; W:= Index-1
>>>>    movfw   INDF        ; Get OR mask   <<<<
    andwf   ALARM_F1,w      ; Compare with inputs

Watching W and it works.......

Robert Rolf says: The MPLAB help file [says] that it supports ALL interrupts, but in fact does NOT support USART interrupts. MPSIM does NOT DO USART simulation. PERIOD! I too wasted weeks of time developing serial code in MPSIM trying to figure out why it wasn't working as coded. When I fiaally got my hands on a live chip and burned my code, it worked PERFECTLY THE FIRST TIME! I no longer trust MPSIM because of the numerous errors I've found in simulating timers, CCP, etc.

Robert Rolf says: The 'movfw' instruction which is NOT mentioned in ANY doc I could find, but which exists as an alias to 'movwf reg,W' and which DOES NOT take a second operand so that if you make a typo and say 'movwf reg,W' instead of 'movfw reg,W' you DO NOT get your data into W!@! I'd rather the assembler errored out with a bad opcode so that I'd have saved myself 3 hours of debugging time finding a tiny typo. GRRRRRR. Since I don't use the movwf opcode (on principle now), I make a last pass looking for movwf in my code to catch any typos before letting MPLAB surprise me again.

Robert Rolf says: It would appear that MPSIM fails to reload CCPR2H when running CCP2 in PWM mode. When TMR2 matches PR2 the book says "the PWM duty cycle will be latched from CCPR2L into CCPR2H on the next increment cycle". My prescaler is 0, the TMR2 is running but IT DOESN'T RELOAD with the new CCPR2L value (half scale) so CCPR1H stays at zero and the simulation never puts up the CCP2 pin (nor loads CCP2H). However, I finally got desperate and burned a '73A anyway, and the code worked _prefectly_ even though the simulation shows that it wasn't working at all.

Use only uppercase letters for include files.

The cursor disappears when useing the wheel on the mouse. Click on the save button on the toolbar or minimize and restore to get it back.

Please note that Microchip has a special web conference to post problems and get support:
http://tech.microchip.com/~DevTools

NEWS: A 32 bit version of MPLab will be released "Real Soon Now"!

Questions:

Archive:

Comments: