my group have used an example that is in the forum to connect between dsPIC and DAC with some modification as shown:

using mplab we downloaded the program and run it but no signal is reaching the DAC, when halting the program we found out that it is stucked at loop containing SPI1IF bit:

the connections between PIC32 and MCP4922:
pin 23 (SS bar) with pin 3 (CS bar)
pin 55 (SCK1) with pin 5 (SCK)
pin 53 (SDO1) with pin 4 (SDI)
we checked the MCP4922 with pic18 and it is fine, so we think the problem is the pic32.
we changed the constant with a counter, changed the blocks configurations, grouneded the chip select on both sides, send a 3.3V to SS bar but nothing worked.
what should we do now?? we hope you answer soon since the end of the semester is near.