Bank switching! See below: At 01:12 AM 2/28/02 -0600, Pic Dude wrote: >What am I doing wrong here? I tried to configure port A as all digital >inputs, but can't read from it. If I replace port A with port C, it works. >Here's the init/main part of my code... > > [ includes, config, etc up here ] bank1 ;macro to set RAM bank 1 > movlw B'00111111' > movwf TRISA ; Port A is all inputs > movlw B'00000110' > movwf ADCON1 ; Port A is all digital > tris PORTB ; Port B is all outputs > tris PORTC ; Port C is all outputs bank0 ;macro to set RAM bank 0 > movlw B'00000000' > movwf ADCON0 ; Turn off A/D >loop: > movf PORTA,0 ; Grab data at port A > movwf PORTB ; Dump to port B > goto loop > > end Hope this helps! dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 18 years of Engineering Innovation (1984 - 2002) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' Do NOT send unsolicited commercial email to this email address. This message neither grants consent to receive unsolicited commercial email nor is intended to solicit commercial email. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.