Typo copied and bastardised should be movwf.. Are you in the correct bank?? Steve -----Original Message----- From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of Bob Axtell Sent: 18 April 2006 18:26 To: Microcontroller discussion list - Public. Subject: Re: [PIC] PIC16F877A PortD ? Do I need a movfw TRISD ? I have a MOVWF TRISD, course it isn't working.. - - - BTW, ICD2 is showing TRISD as having a value of 00, whereas I loaded it with 0F.. go figure. LOOKS like I am overwriting it someplace. --Bob Steve Smith wrote: > This setup uses portd as a bi-directional 8 bit bus check it against your > initialisation I know it works (in my app)the A-D is set for part and part > but port D is all digital > > Rgds > Steve > ;----------------------- INITALISATION > ROUTIENE------------------------------- > bcf STATUS,RP0 ; first do page 0 stuff. > yep, page 0 > Gie_off ; turn off > int and test its off > clrf STATUS ; force bank zero > clrf INTCON ; disable ints ect > clrf PIR1 ; clear all flag bits > PORT_SETUP > clrf PORTA > clrf PORTB > movlw b'00100000' ; OE off on outputs > > movwf PORTC > clrf PORTD > clrf PORTE > BANK1 > movlw b'00111111' ; IO for port > movwf TRISA > movlw b'11111111' > movwf TRISB > movlw b'11011000' > movwf TRISC > movlw b'11111111' > movfw TRISD > clrf TRISE > WDT_SETUP > movlw B'00001111' ; SET WDT TIMER TIMEOUT > PULLUP Off > movwf OPTION_REG > ADCON_SETUP > movlw B'11000011' ; LITERAL FOR ADCON1 > movwf ADCON1 ; LOAD ADCON1 > INT_SETUP > movlw B'01000001' ; SET UP TMR1 FOR OVERFLOW > and ADIE > movwf PIE1 > BANK0 ; RETURN TO BANK_0 > movlw B'11000000' ; INTERRUPT CONTROL ENABLE GIE AND > PIE1 > movwf INTCON ; ENABLE INT'S > > > -----Original Message----- > From: piclist-bounces@mit.edu [mailto:piclist-bounces@mit.edu] On Behalf Of > Mike Hord > Sent: 18 April 2006 17:30 > To: Microcontroller discussion list - Public. > Subject: Re: [PIC] PIC16F877A PortD ? > > Are there analog input options on those pins? I think I > remember some parts having analog on PORTD, but that > could just be my imagination... > > Mike H. > > On 4/18/06, Bob Axtell wrote: > >> This is embarassing. I have used this part in the past and >> never had a problem with portD, but I have 4 PCBs showing >> that PortD, with pins set as inputs, never seems to pass data >> into w. I know that portD uses the "Parallel Port" feature, but >> I think I have turned it off. >> >> I guess I am missing something. . Any ideas? >> >> --Bob >> -- >> http://www.piclist.com PIC/SX FAQ & list archive >> View/change your membership options at >> http://mailman.mit.edu/mailman/listinfo/piclist >> >> > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist