Ok, i'm at the end of my rope on this one. I'm like 1 step past beginner here.
Im trying to interface a p18f4550 to an eeprom vie I2C. The routines hang on the wait for ACK from the slave.
I've tried teh built in I2c functions, software functions from C18. I have written my own, and tried various routines i've found on the internet.
the problem. PortB.RB1 is NOT acting like a schmitt trigger input.
I slowed down the transmit function my adding some delays, and hooked up a Powered LED to each PortB 0, and 1. PortB.0 acts accordingly basically lights on a 0, and is off on a 1. Porb.1... nothign. If i switch the def for the clock and data, meaning portB.0 is now the clock. it pulses as expected, and the data line shows nothing.
a crude way to debug i know.
I've configured portb to be all digital thru the config bits and thru the Adcon2.
Am i missing somehting? I can post code if necessary. is the clock supposed to act like an ST or just as an output? All the docs that i found state that both SDA and SCL should be ST's with a pull up resistor (which i have ~10k).
I hope someone can point out the thing that i'm missing.
thanks
Im trying to interface a p18f4550 to an eeprom vie I2C. The routines hang on the wait for ACK from the slave.
I've tried teh built in I2c functions, software functions from C18. I have written my own, and tried various routines i've found on the internet.
the problem. PortB.RB1 is NOT acting like a schmitt trigger input.
I slowed down the transmit function my adding some delays, and hooked up a Powered LED to each PortB 0, and 1. PortB.0 acts accordingly basically lights on a 0, and is off on a 1. Porb.1... nothign. If i switch the def for the clock and data, meaning portB.0 is now the clock. it pulses as expected, and the data line shows nothing.
a crude way to debug i know.
I've configured portb to be all digital thru the config bits and thru the Adcon2.
Am i missing somehting? I can post code if necessary. is the clock supposed to act like an ST or just as an output? All the docs that i found state that both SDA and SCL should be ST's with a pull up resistor (which i have ~10k).
I hope someone can point out the thing that i'm missing.
thanks
Last edited: