Plus the second parameter to BCF is a literal bit, not the address of a variable with a bit number in it. Won't work (you need a lookup table for that). I'd use a macro. Wouter van Ooijen wrote: >> I changed from a standard bcf on PORTC as I have read about the >> read-modify-write problems. When I call this sub, I put the >> number of the >> bit I want to clear in the W register. This then reads PORTC >> and places it >> in RAM_PORTC, clears the bit in the variable and writes the >> entire byte back >> to PORTC > > that won't do no good. think again about the 'reads PORTC' part in > relation to the read-modify-write issue. > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > -- Hector Martin (hector@marcansoft.com) Public Key: http://www.marcansoft.com/hector.asc -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist