The bits on PORTA, PORTB etc do _not_ have names in the .INC file. Just use the syntax PORTB,3 for pin RB3 Bob Ammerman RAm Systems ----- Original Message ----- From: "Rex Byrns" To: Sent: Friday, May 17, 2002 9:55 AM Subject: Re: [PIC] Shift Register Useage-TPIC6A595 > Just to let everyone know - using MPLAB 5.60.00 - Device file version > 5.00.41 > > bsf PORTB,RB4 > | > returns on build > | > Error[113] C:\PROGRA~1\MPLAB\FEEDER2.ASM 117 : Symbol not previously > defined (RB4) > > My P16f84a.inc file contains nothing about any of these bits on the ports. > The file mod date and time are the same as many other files of this type. > > I see how I could easily add them in. The revision info is: > > ;Rev: Date: Reason: > > ;1.00 2/15/99 Initial Release > > Is there something I am missing? > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Andrew Warren > Sent: Thursday, May 16, 2002 5:18 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] Shift Register Useage-TPIC6A595 > > > Rex Byrns wrote: > > > Does for example bsf PORTB,RB3 > > bsf PORTB,RB4 > > bsf PORTB,RB2 > > > > use more memory than > > movlw B'00011100' > > movwf PORTB > > Yes. On your PIC (you can verify this by reading the datasheet), > each instruction consumes one word of memory. Three BSFs takes > three words of memory and a MOVLW/MOVWF pair takes only two. > > The MOVLW/MOVWF will force bits 0, 1, 5, 6, and 7 of PORTB to 0 > (which you may or may not be a good thing in your application), > and it will also sidestep any read/modify/write issues that > might prevent bits 3 and/or 4 from being set to 1 (which is a > good thing in nearly all applications). > > It also runs faster (2 instruction cycles versus 3). > > -Andy > > === Andrew Warren -- aiw@cypress.com > === Principal Design Engineer > === Cypress Semiconductor Corporation > === > === Opinions expressed above do not > === necessarily represent those of > === Cypress Semiconductor Corporation > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads