>> PORTC =3D 2; // Set RC1 to RC5 high >=20 > Comment does not match the constant. Only RC1 is high. I prefer using binary when doing things like this, then comment underneath. Also, '1' looks like 'I' (input) and '0' looks like 'O' (output) PORTC =3D b'00111110' ; ;comments eg (view in fixed font) movlw b'00111111' ; - output, not used ; - output, not used ; 1 input, feed reset, pull-up ; 1 input, limit microswitch 1, pull-down ; 1 input, limit microswitch 2, pull-down ; 1 input, AN2, keypad ; 1 input, AN1, feed pot ; 1 input, AN0, rotate pot movwf trisa Joe --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .