I want to use the hardware SPI and I have two IC's that use SPI. I'm sure there's a way to do it but I can't get it. When I use the MCP2515, I use the SSPBUF to transfer data. When I use the MCP4911, I can't figure out how to use the SSPBUF so I have to use the Shiftout. The problem with that is, I can only get it to work if I disable the SSPEN bit and then reenable after sending information to the 4911.
My code looks like this:
Is there a way to use the SSPBUF to communicate with the MCP4911 opposed to disabling the MSSP and using Shiftout?Code:SSP1CON1.5=0 LOW PORTE.6 SHIFTOUT SDO, CLK, 1, [9\4,300\12] HIGH PORTE.6 SSP1CON1.5=1




Bookmarks