Hi for mplab there is a useful command call banksel any location in the bank | \ / banksel porta ;move to bank0 banksel trisa ;move to bank1 regards ----- Original Message ----- From: Mike M To: Sent: Sunday, November 07, 1999 2:44 AM Subject: Re: NewBee: Initializing ports. > Id have to agree with paul on that one, i basically ignore almost all the "warnings" that MPLAB gives me. stick with the original code :) > > mIKe > > On Sat, 6 Nov 1999 19:57:30 +1100 "Paul B. Webster VK2BZC" wrote: > >Jeremy Cowgar wrote: > > > >> but in all of my code I always get a warning from the assembler > >> stating: > >> Warning[224] D:\PIC\ASM\FLDCEN2.ASM 53 : Use of this instruction is > >> not recommended. > > > > This is easily and (fairly) permanently fixed. Just edit the > >PIC16C84.INC file (you *are* using a 16C84 are you not?) to include the > >following as the fourth line: > > ERRORLEVEL -224 > > > > .. and you'll *never* see that spurious warning message again (unless > >perhaps you do a re-install of MPLAB and omit to preserve your updated > >files. Easy and efficient! > > > >> [51] CLRF PORTB > >> [52] MOVLW b'11111111' > >> [53] TRIS PORTB > > > > Works perfectly on all PICs, *including* the new ones such as the > >16F87x. > > > >> Obviously the TRIS command is what is being complained about, and I > >> realize that Microchip says that we should not utilize this command, > > > > That's in much the same vein as Micro$oft saying you shouldn't use > >Linux! > > > >> but when I program that section of code above how Microchip suggests, > >> my program acts brain dead, never responding to inputs, never changing > >> outputs... > > > > You forgot to CLEAR RP0 again, that's why! > > > >> CLRF PORTB > >> BSF STATUS, RP0 > >> MOVLW b'11111111' > >> MOVWF TRISB > > BCF STATUS, RP0 > > > > Fixed! But you can see your code is now significantly longer. I > >*really* suggest you use the original code by preference, set the > >correction into the include file and totally ignore MChip telling you to > >go chase your tail. > >-- > > Cheers, > > Paul B. > > > > Send someone a cool Dynamitemail flashcard greeting!! And get rewarded. > GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41