Am I just dense? I've read the Microchip docs, a fat book by Myke Predko, and I've looked through the FAQ. But I have what appear to be bizarre problems trying to write to the various port latches on the '877. I've been working on interfacing a parallel LCD to a PIC 16F877. I succeeded, but only after noticing a (possible) problem with port A. If I execute the following instructions (all of port A is configured as output): bsf porta,0 bcf porta,1 hold goto hold then both RA0 and RA1 will be cleared (RA0 will be set momentarily). This was causing the assertion of RS on the LCD to fail (or at least not last long enough), because I was asserting RS via a port a pin, then pulsing E via a different port a pin. I solved the problem by using port B pins instead, and the same exact code (with the exception of the different port) started to work. At first I had RS connected to RA4, an open-drain output, so I moved both RS and E to RA0 and RA1, but I kept having the same bsf/bcf problem. Is there something simple I've overlooked? I also tried two different '877 chips, in case one was damaged, but they both fail the same way. I also tried the following. I've put all the code so you can see exactly what I've done. I have a bunch of LEDs wired to the pins of port C, through a 100-ohm resistor to Vcc (each), so that the LEDs would light if a pin goes low. list p=16f877 include "p16f877.inc" org 0x000 nop start bsf status,rp0 movlw b'00000000' movwf trisc bcf status,rp0 why movlw 0xFF ; Can change this to 0x00 movwf portc prob movlw 0x00 movwf portc circle goto circle end Up to the label "prob", the LEDs remain unlit. I would expect them to light after "prob" executes. They don't. However, if I change the 0xFF at "why" to 0x00, then the LEDs are lit (and I can then change the 0x00 at "prob" to 0xFF, and they'll remain lit). Thanks for any help, Rick -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics