4
\$\begingroup\$

I'm writing some firmware for a PIC18F6622 microcontroller. I use MPLAB IDE 8.73 + HI-TECH C Compiler for PIC18 MCUs (PRO) 9.66. When I set the XINST (Extended Instruction Set enable bit), the IDE gives me this warning: enter image description here

What settings should I do to be able to use the PIC's Extended Instruction Set?

EDIT: Just found on the net: 'If set (the EXTENDED INSTRUCTION flag), your program (or your compiler) must take it into account to use the correct addressing methods'. But what does that really mean?

\$\endgroup\$
1
\$\begingroup\$

IIRC, there is a setting the compiler options to tell it to use the extended set. Try setting this and it should stop complaining.

Edit - the above will work for C18, but apparently Hi-Tech does not support the extended set, according to this

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Yeah, I've read that link too, but I was hoping it is out of date :) \$\endgroup\$ – m.Alin Sep 20 '11 at 14:54
  • 1
    \$\begingroup\$ @m.Alin - I think it's still current. You could check the manual though (I just had a quick leaf through but couldn't see any option for extended mode, and there is no check box in MPLAB options like there is with C18) If you must use it, them maybe you could use C18 instead (I think you need the full version though) \$\endgroup\$ – Oli Glaser Sep 20 '11 at 16:41
  • \$\begingroup\$ I'm starting to believe too that the HI-TECH compiler doesn't support the extended instruction mode. Anyways, no worries, I'm not constrained to program in extended instruction mode. It would have been good, though, to make use of the advanced features of the PIC18. \$\endgroup\$ – m.Alin Sep 20 '11 at 17:01
  • 1
    \$\begingroup\$ I really really wish that Microchip had designed the extended instruction set to use a small amount of the "common" bank for FSR2 indexing (e.g. 15-24 bytes), and perhaps an additional, smaller amount for FSR0/FSR1 (maybe 7-8 bytes each), while leaving most of the common bank available as a common bank. A lot of code pretty much needs to have some unbanked registers available, and many PIC18's have ZERO uncommitted, unbanked registers registers when the extended instruction set is enabled. \$\endgroup\$ – supercat Sep 20 '11 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.