Quote Originally Posted by peterdeco1

chip1 = porta.1
chip2 = porta.2
chip3 = porta.3

if porta.4 = 0 then let chip = chip1
if porta.5 = 0 then let chip = chip2
if porta.6 = 0 then let chip = chip3

high chip
How about:

TRISA=%11110001
if porta.4 = 0 then porta.1=1
if porta.5 = 0 then porta.2=1
if porta.6 = 0 then porta.3=1

or even shorter:

TRISA=%11110001
porta.1= ~porta.4
porta.2= ~porta.5
porta.3= ~porta.6