For all of you who asked: Why is using BCF and BSF on a port a bad idea? To get the whole story, look at the data book. (For the PIC16C84, it is in section 5.3.1 in my data book.) The short of the story is: This reads the pins, and then writes back to the latch. This is okay as long as you aren't switching back and forth pins as input and output. BUT, if you are using the TRIS register to selectively access pins (For example, an I2C implementation with external pull-ups where to release the bus you simply tri-state the pin.) and you do a BCF or BSF instruction then the latch associated with an input pin gets written the value that was on that pin. For example: MOVLW 0x00 ; move 0 into W bcf STATUS, RP0 ; set to page 0 movwf PORTA ; move bits to portA bsf STATUS, RP0 ; set to page 1 movlw 0x01 ; set A0 as input, rest as outputs movwf TRISA bsf PORTA, 2 ; This sets pin 2 of portA as 0, and puts the value at A0 in the latch associated with A0. bcf TRISA, 0 ; This sets pin 0 of portA as an output and garbage is sent out rather than the 0 that we would ; think So it is okay to use BCF and BSF if you aren't pulling this kind of trick but be careful because it can bite you! I hope this helps! Alan G. Smith +--------------------------------------------------------- | Alan G. Smith | ags@poboxes.com | http://www.innovatus.com/ags