Wonderful, This is now three times in four days I think. See the thread "bit adjustment" in the archives. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: "sam woolf" To: Sent: Friday, May 04, 2001 8:35 AM Subject: [PIC]:a newbie mpasm question Hi everyone. Sorry if this is a silly question. I have a subroutine called PULSE that oscilates one of the pins on the 16F84. It does this by using BCF and BSF to set and clear that pins bit on porta.. so basically there are some loops and instructions like BCF PORTA,1 My question is: how can I modify my subroutine so that I can set which pin to oscillate. I want to be able to do something like: movlw 1; load w with number of pin on porta to pulse call ping; oscillate pin 1 movlw 2;now load in new pin number call ping ; oscillate pin 2. How can I do this? Are instructions like BCF porta,w valid? I've tried this and it doesn't seem to work. Any suggestions much appreciated. sam. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.