What PIC are you using?

If PortA is analog you'll need to disable A/D on RA1 to use it for digital input.