New to this so be gentle on me. I wanted to solve this on my own, but after lots of reading and experimenting I'm now banging my head on the wall.

I have a prototype board (16F877A based) with 4 buttons that pull RB0-RB3 to ground respectively. I'm having problems reading the input and if it didn't come with a compiled program that worked I would say it needed a pull up resistor.

Can anyone help me with a simple code snippet to say light LED on RD0 when RB0 is grounded.

I starter with the following based on reading.

CMCON = 7
ADCON1 = 7
TRISD = %00000000
TRISB = %11111111

and then was trying to use if portb.0 in a look but no luck.

What an I doing wrong? I have the C source for the program that works but don't appear to be able to replicate the same in PBP.

Thanks,
Brian