Trying to watch all PORTB (actually only using pins 0 to 5, others are unused), but having difficulty with reading the port. It all works using MPLAB SIM. The configuration includes: #pragma config PBAD = DIG //PORTB configured as digital #pragma config CCP2MX = OFF // RB3 pin is PORT and TRISA = 0b00000000; // All PORTA Output TRISB = 0b00111111; //RB0 - RB5 INPUT, RB6 & RB7 are for programmer ADCON1 = 0b00111111; // RA0, RA1, RA2, RA3, RA5, RB0, RB1, RB2, RB3 and RB4 are digital TRISC = 0b00000000; // All PORTC Output INTCON2 = 0b00000000; //Set PORTB Pullups to high I have verified that all PORTB bits are high, unless, I pull a pin down by connecting to ground. This works if (PORTBbits.RB4 == 0) but I want to check all bits! and this doesn't work if (PORTB != 0b11111111) The rest of the "IF" is below: { LATC = 0b00111111; LATA = 0b00111111; } else { LATC = 0b00000000; LATA = 0b00000000; } It would seem that if any one, or all PORTB pins went to 0 volts (they are using the weak internal pullups), then PORTB would not equal all bits =1. The application is a TV remote control repeater, and I don't want to send a signal back to the originating room. PORTB will have a IR receiver in each room, an emitter at each piece of equipment. This is only to test the PCB board and the PIC, before getting into the issues of actually moving the signal around. Probably something dumb, I missed. Help appreciated. :) -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist