At 09:12 PM 12/31/00 -0700, Dwayne Reid wrote: >I know its something that you have already looked at, but just what is in >the TRISB register. Just for the heck of it, why not add a couple of lines >just before Read_Function: > > movlw b'xxxxxxxx' ;set bits accordingly . . . > tris PORTB Here's the setup. The intent is as commented. I will probably compact things once everything is working, but at this point, I like to keep things separate, and as clear as possible. Read_Cap_Done: ;In bank zero at this point bcf PORTA,Function ;Set function output as low, bsf STATUS,rp0 ;select bank one bsf TRISB^080h,Capsense ;Set cap sense pin as input bcf TRISA^080h,Function ;Set the function pin as output bsf TRISB^080h,Unitid ;Set Unit ID pin as input bcf STATUS,rp0 ;select bank zero bcf PORTA,Function ;Set function output as low clrwdt ;Limits how long we can wait Read_Function: ;btfsc PORTB,Capsense ;loop here till low on cap sense pin ;goto Read_Function ; -- Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body