I use spi_setup in main.c and #use i2c in at24.c. They share the same pin RC3,RC4. The chip i use is pic18f452.
In main.c i use read/write spi normaly without using i2c,but when i call i2c function it doesn't work and spi doesn't work too.
Can anyone help me to solve this problem?
Thanks very much!
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
Posted: Fri Dec 14, 2007 9:52 am
You cannot use them at the same time. They use the same hardware. I've read, on this forum, that you can switch between them but I've never done it and I can't remember how. Search this forum and you should find your answer.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum