thanks so much for your help.

I found a sample that had a pull up on A5. This i tested and it fixed the problem.

The TRISB=%01000000 was a mistake on my part. I thought it was %01234567 and i your saying that it should be 76543210
I need B1 as a input so i chnaged to TRISB=%00000010

Oviously i have much to learn.