it depends on how you structure the transmission. not sure of your specific chip but some chips have shared pins (16f886 for example shares sdi and sda pins). In those cases, you cannot transmit data at the same time - aka interrupt driven approach doesn't work.
assuming that your pic acts as a master, and you transmit spi and i2c one at a time, you will then have to experiment a little: write up your spi routines and your i2c routines, make sure that they work independently and then join them together.
it depends on how you structure the transmission. not sure of your specific chip but some chips have shared pins (16f886 for example shares sdi and sda pins). In those cases, you cannot transmit data at the same time - aka interrupt driven approach doesn't work.
assuming that your pic acts as a master, and you transmit spi and i2c one at a time, you will then have to experiment a little: write up your spi routines and your i2c routines, make sure that they work independently and then join them together.
一周热门 更多>