How are you setting the ports. Through the LAT registers? Regards, Bob On Mon, 14 Mar 2005 07:14:45 -0800 (PST), alan smith wrote: > Over the weekend, I was coding up part of a project > using a SHT71 and ran into something strange. I can > post the sections of code if thats helpfull but not > sure if its needed. > > Basically, I set up the ports: > #define SHT_Data PORTC,0 > #define SHT_Clk PORTC,1 > #define SHT_DD TRISC,0 > > So, down in the main routine I had a simple routine > (yes the clock is set to an output) > > bsf SHT_DD,ACCESS ; make the port an input > ... > btfss SHT_Data,ACCESS > bra BitLow > bra BitHigh > > Simple right? Done it for years, just branch on the > bit settings. I have my analyzer hooked up, watching > the data where I send the command code and look for > the AWK to return. But, it *appears* to ignore the > value on the port. I looked at the watch window and it > reports back like it hasnt seen the value showing. Is > there something different that has to be done on an > 18F part? I'd think not, but who knows... > > I switched to a different port to see if it made any > difference, but it didnt so I can pretty much rule out > the part being bad. > > In general, as far as internal registers, the > btfss/btfsc opcode works fine. Just when interfacing > to external ports it appears to not work as I thought. > > Any thoughts? > > __________________________________ > Do you Yahoo!? > Yahoo! Small Business - Try our new resources site! > http://smallbusiness.yahoo.com/resources/ > -- > 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