Matt, > It might be better if you include all of the code you are running. You > do not show any of the setup here. Have you set RC1/2 as digital pins? Yes, in ANSEL. > At power up, these pins will be configured for digital inputs. > Either try clearing the relevant bits in ANSEL, or use RC4/5 > Also, make sure that you have cleared the relevant bits in TRISC to > set the pins as outputs. Yes. I have mentioned tha the o/p toggles between +5V and 0V at low frequency bu= t at higher frequencies, it does not reach 0V but reaches only 1V. Regards Ravi > = > Matt > = > On 9 July 2010 12:59, Ravi wrote: > > > > Hello Everyone, > > > > EXPERIMENT 1 > > > > I have a 16F676 @ 4MHz communicating with 24LC256 using RC1 = > (SDA, with > > 1K pull up) and RC2 (SCL). > > > > I am using bit bang technique. > > > > As observed on an oscilloscope, the SDA and SCL lines raise to = > 5V and > > fall to 1V but not to 0V. > > > > I removed the 24LC256 thinking it could be pulling the line high. > > > > Again, as observed on an oscilloscope, the SDA and SCL lines = > raise to 5V > > and fall to 1V (above TTL level) but not to 0V. > > > > I started single stepping the code. Now the SDA and SCL both = > raise to 5V > > and fall to 0V. > > > > I inserted some 10 uS delay between SDA and SCL lines changing the > > state. Still no success. > > > > EXPERIMENT 2 > > > > Removed the 24LC256. > > > > Ran the below code. > > > > =A0 =A0 =A0 =A0bsf portc,scl > > =A0 =A0 =A0 =A0bsf portc,sda > > =A0 =A0 =A0 =A0goto $+1 > > =A0 =A0 =A0 =A0bcf portc,scl > > =A0 =A0 =A0 =A0bcf portc,sda > > =A0 =A0 =A0 =A0goto $-5 > > > > Same results. > > > > If I run this with 5 mS delay then the I/O lines reach 0v. > > > > I am unable to understand this behavior. > > > > Has anyone come across this type of behavior? > > > > Cheers > > > > Ravi > > -- > > 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