Mik Kim wrote: Hi Mik. > Hi Jay, > > You can't set bit position using register (or even W). It must be a > literal. bcf PORTB, 0 is ok, but bcf PORTB, test is not since test is a > register. If it did anything, it would operate on address of test and > not test content. I'm guessing the address of test is greater than 7, so > the compiler is giving you a warning. > > Also, don't use bit operations on PORT. Instead of bcf, you might do > movf PORTB, W > movwf tempB > bcf tempB, 0 ;must use literal as bit position > movf tempB, W > movwf PORTB It will be exactly the same as just BCF PORTB,0 because you read from PORTB first and do the Read_Modify_Write operation. Probably you mentioned about shadow register operation but for this you need keep copy of port in memory and modify it and after that only copy it to port. WBR Dmitry.