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.
Create new topics, add your comment, remark, bugs...
2 posts • Page 1 of 1
I think the problem is with the configuration of the SPI of the PIC32 in the blockset itself. though You can configure SPI1 and compile it without error, when fired in the microcontroller it does not produce any result in fact it stops in the place mentioned in the comment. Worse still if you try to configure SPI2 the compilation produces an error. But if you use exactly the same configuration with DSPIC it not only compile but works perfectly as well. So probably I ask kindly Lubbin if he could look at this problem probably he might find a solution.
Users browsing this forum: Google [Bot] and 1 guest