Thanxs everyone !=20 The code was all fine as u all pointed out. Have the pic running on the table here as i type this. And i have just wasted like 5 hours = looking=20 for a non-excisting solution. hehe God I just loove inet, and u guys for the fantastic support in a moment = of=20 despare :-) This is a 'simple' project to have the pic monitor and control the level = of products in a maschine so it doesnt get too full/empty. 5 LEDs will show the level 1-5, and 1 LED shows when actually filling up = by=20 running a 380v AC motor. Also 3 inputs for operator switch manual = control: off, on, auto And 1 input for detecting status of another 380vAC motor connected to = this. Now.. this is done for dual systems in one pic so double all above.. = hope i dont run outa pins :-) May do the overkill bit too: RS232 adjustment of parameters live when = running the=20 mashine.. Or perhaps a bootloader for easy prg update ! nah, lets finish = this=20 b4 xmas ;-) > The LVP fuse bit will default to LVP mode so RB3 will be used for low > voltage program enable. You must set it to '0' so that RB3 becomes a > digital IO. At the moment, I gather the pin is unconnected so it will = be > floating on powerup and may cause problems. That is the pin (36) I now find is VERY sensitive to my scope probe.. = when thouched the pic crashes (same when touching the pin 1, MCLR)=20 No other pins seems sensitive. All pins on portb are connected to LEDs.=20 May be a problem in this noisy enviroment. > You have not set ADCON1, so all analog pins will be in analog mode. In > this simple case it doesn't matter though. ok, I better look into that > You should really set all unused pins as outputs. Even this test = program > may be affected by pins that float around as unconnected inputs. yes, good point. thats step #2 when this test show I can get the pic = alive :-) > BSF BCF type instructions are not recommended on ports one after the > other. Place a NOP between them or write directly to the port. > > BSF PORTB, 7 ; port B, bit7:=3DHigh > > BCF PORTB, 7 ; port B, bit7:=3DLow Seem to rem something simular from 16c55 a few years back, now=20 that u remind me. > #include "p16f877.inc" yes, i know. removed that just to make sure it wasnt part of the problem good tip tho. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu