Andreas, Is it possible the circuitry you are driving with pin RB3 is holding it high? Try modifying your program to execute CLRF PORTB in a continuos loop. If it still stays high, the problem is the external circuit requires more PIC sink current than the PIC has capability for. Steve Buckser Andreas Magnusson on 06/07/99 12:23:02 PM Please respond to pic microcontroller discussion list To: PICLIST@MITVMA.MIT.EDU cc: (bcc: Steve Buckser/Marketing/San Leandro/Prescolite) Subject: Big bad portb problem... Hello! I have a problem.... I have programmed a "test program" for a robot I have built (PIC16F84 used). The program controlls a stepmotorcard. Everything seems to work exept one thing RB3 pin is allways high... The pin should pulse like the other ones. I have checed the circuitboard and also tested with two different MCU:s. I programmed a small program to only clear portb it worked. I cant really understund why the pin allways is high.... /Andreas Magnusson LIST P=16F84 INCLUDE "P16C84.INC" ;************************* RAM ORG 0x0C CNT RES 1 CN1 RES 1 CN2 RES 1 TEMP RES 1 M3 RES 1 ORG 0 GOTO START ORG 0X30 ;************************* START BSF STATUS,RP0 CLRF TRISA CLRF TRISB BCF STATUS,RP0 CLRF PORTA CLRF PORTB M3A CLRF PORTA BSF PORTB,6 BCF PORTB,7 CALL KORTM3 ;porta works as a adressbuss and select Motorcard 3 CLRF M3 M3TABLE MOVF M3,W CALL FTABLE MOVWF PORTB NOP BCF PORTB,6 ;clocking in the value from ftable into a data latch on the stepmotorcard NOP BSF PORTB,6 MOVLW .130 CALL DELAY INCF M3 MOVLW .7 XORWF M3 BTFSC STATUS,Z CLRF M3 GOTO M3TABLE ;***************************** FTABLE ADDWF PCL RETLW B'01001111' RETLW B'01001001' RETLW B'01110001' RETLW B'01000001' RETLW B'01000110' RETLW B'01000000' RETLW B'01111000' RETLW B'01001100' ;***************************** KORTM3 BSF STATUS,RP0 CLRF TRISA CLRF TRISB BCF STATUS,RP0 MOVLW 06h MOVWF PORTA RETURN ;***************************** DELAY MOVWF CN2 LOOP MOVWF CN1 AGAIN NOP NOP NOP NOP DECFSZ CN1,F GOTO AGAIN DECFSZ CN2,F GOTO LOOP RETURN ;******************************************************** end