This is my first posting (and my first microprocessor project in 18 years), so I apologize in advance if I've overlooked something obvious in trying to sort out the following vexing phantom port "noise" problem. I've been through the datasheet and the mid-range manual, but I'm stumped. I'm using RB1-RB6 on a 4MHz 16F877 to detect six pushbutton closures, and the other two inputs to detect active-low signals from a DAA and a DTMF transceiver. Port B is set as all inputs with the weak pull-ups enabled. Port B serves no other function in this project, and so TRISB is left alone after the following short initialization snippet: ; Port B initialization CLRF PORTB ; clear Port B output latches BSF STATUS,RP0 ; Bank 1 MOVLW b'11111111' MOVWF TRISB ; set RB0-RB7 as all inputs (and, later in the initialization...) BSF STATUS,RP0 ; Bank 1 MOVLW b'00000001' ; set Timer 0 prescale to 4 / enable Port B pullups MOVWF OPTION_REG I've set up Timer0 to interrupt on overflow every 1ms to create a system 'pulse' for resetting the external system supervisor, updating any non-zero counters, etc. No other interrupts are used. My button-checking routine is called every 73ms when its dedicated counter times out. The problem appeared as an endless series of random false button presses (or DAA/DTMF chip _IRQ's...all 8 Port B lines exhibit this problem). They were usually getting filtered by the subsequent debounce routine, but the odd one squeaks through and falsely triggers a subsequent legal-button-press routine (ouch). The 'scope shows no noise whatsover on RB0-RB7. I even put some 1k pullups right on the PIC's socket and tried this with both the _RBPU options to no effect. To have a look at what was going on, I grabbed Port B and sent it out to some LEDS on a TPIC6C595 via SPI and saw all kinds of random, rapid activity (the SPI works fine, BTW: the same LED update routine normally gives me solid, unflickering LEDs). This is a snippet of the button-check routine with my temporary LED test added: Button_Check ; called by Flag_Check (F5,1 set by Counter_PB_Chk) BCF STATUS,RP0 BCF STATUS,RP1 ; Bank 0 BCF FLAGS5,1 ; clear the button sample request timeout flag TSTF PBDBNCE ; debounce countdown in progress? SKPZ GOTO _CHK_LTR ; if so, go to check-back-later exit routine below MOVFW PORTB ; if not, get buttons and ring signal MOVWF PBTEST ; store button / ring data COMF PBTEST ; convert to active-high MOVFW PBTEST ; temp test: get the inverted Port B data... MOVWF LEDS ; ...and send it out to the LEDS for viewing BCF PBTEST,7 ; mask off DTMF _IRQ bit TSTF PBTEST SKPNZ ; any active? GOTO _CHK_LTR ; if not, go to check-back-later exit routine MOVFW PBTEST ; get inverted button / ring data MOVWF BUTTONS ; store byte in button data holding register The obvious question is, WHAT GIVES??? Why would I be seeing a bunch of activity on Port B that shouldn't be there? What kinds of things should I be looking for in my code that might be causing this? I think I've eliminated all possible hardware causes: I've tried three different 16F877's, including a 20MHz one to be sure I wasn't looking at a 'bad batch' issue. For the record, there is no ICD...just me (kind of a hardware guy) , MPLAB 5.50, a PICSTART Plus, and a receding hairline. Any and all ideas or suggestions would be welcome beyond measure. Even a round of embarrassing anti-newbie chastising would be a gift at this point, if it came bundled with some sort of revelation as to what I might be doing wrong. Thanks in advance, Rob Robson Kelowna, BC, Canada -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics