At 02:22 PM 3/22/2006, Harry Mueller wrote: >I'm working on a robot that uses an SRF08 for object detection. It uses a >16F628A on a board with little debugging capability. > >I got the SRF08 working well on a 16F877A that can print output to a >terminal program. However, when I transfer the program, with an *exact* copy >of the i2c routine, to the 628A it appears to output values of zero. The >SRF08 signals the correct device address has been reached with an LED flash. >It flashes about once each second which seems correct. Also, 1.8k pull-up >resistors have been installed on RA2 and RA3. I don't see where you have initialized register CMCON. Until you do, certain port RA bits are configured as analog inputs for the comparitors. dwayne -- Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (780) 489-3199 voice (780) 487-6397 fax Celebrating 22 years of Engineering Innovation (1984 - 2006) .-. .-. .-. .-. .-. .-. .-. .-. .-. .- `-' `-' `-' `-' `-' `-' `-' `-' `-' 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 PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist