PIC32MX360F512L and MCP4922

Create new topics, add your comment, remark, bugs...
Post Reply
3eenab
Posts: 1
Joined: Tue Dec 27, 2011 11:08 am

PIC32MX360F512L and MCP4922

Post by 3eenab » Tue Dec 27, 2011 12:18 pm

hi Lubin

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

Image

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:

Image

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.
Attachments
spitest2.mdl
(30.26 KiB) Downloaded 584 times

salemimoh
Posts: 23
Joined: Tue Apr 08, 2008 1:01 pm

Re: PIC32MX360F512L and MCP4922

Post by salemimoh » Wed Dec 28, 2011 7:21 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests