Jump to content
  • 0

Difficulty getting Analog SHIELD to work with chipKIT Max32


M. Mihalek

Question

Hello,

I am working with the chipKIT Max32, chipKIT Network Shield, and ti / Stanford Analog SHIELD from Digilent.  I need to be able to generate various analog signal remotely (Ethernet).  I have not been successful using the Analog SHEILD with the Max32 (much less the addition of the Network Shield).  However, using my Arduino Uno, I am able to generate a signal using the "passthrough" and "ramp" example with the Analog Shield.  I would continue to use the Uno, however, I need the extra digital I/O the Max32 (Mega format) has to offer.  Also, I have verified basic communication with Max32 using the "blink" example. 

1) What is the probable cause of my failure with the Max32 versus the Uno? 

2) What corrective action should I take?

Boards in use: Max32 Rev E, Analog SHIELD Rev D, Network SHIELD Rev C

Software: passthrough and ramp examples included with the Analog Shield library, Arduino IDE 1.6.13

Note: I had looked at using MPIDE with the chipKIT Max32, but the website for MPIDE recommended the most up version of the Arduino IDE.  So, MPIDE is one option (of which I am aware)  I have not tried, yet.

 

Thank you for any assistance you can offer.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

Hi M. Mihalek,

I was able to track down a Max32 and an Analog Shield and was able to get some measurements out of it that followed a trend I expected. Since you got it working on the Uno successfully, it sounds like you have the shield plugged in to the right ports on the Max32 and are measuring from the right ports on the shield (D0 on the DAC and A0 on the ADC, presumably). Potentially it could be an issue with the I/O voltage select since the Max32 will use 3.3V on it's I/O rather than 5V (like the Arduino Uno), but when I changed the jumper to 5V on my setup it didn't seem to affect anything adversely... I was using the Arduino IDE 1.6.13, but recall having used MPIDE in the past without any problems.

I guess to make sure, are jumpers JP3 and JP4 on the Max32 set to the Master configuration rather than the Slave configuration for SPI?

Also, it looks like the slave select pin for the Max32 (pin 53) is used on the Ethernet interface on the Network Shield, but is used for SPI on the Analog Shield and I'm fairly certain neither can be reconfigured if they are routed to that pin; I haven't looked into the Network Shield, but that is the case for the Analog Shield. The Network Shield also uses pin 2 for USB, which is also used by the Analog Shield, but I don't know if that will be a problem for you.

Also, as a point of curiosity (as opposed to a likely problem) is the power select jumper next to the barrel jack connector on the Max32 set to "reg" if you are using an external power supply that isn't rated at 5V? If you are powering it through the USB mini connector, I believe it shouldn't make a difference in terms of operation (at least from looking at the schematics).

Let me know if this helps.

Thanks,
JColvin

Link to comment
Share on other sites

Hi JColvin,

Thanks for the quick response.  I took note of each of the points you made, and double checked the board configuration.

1) The voltage setting of the Analog SHIELD is set to 3.3V (the same as the Arduino and chipKIT).

2) JP3 and JP4 are set to Master.

3) I have not connected the Network SHIELD, yet.  But, I will look at Pin 53 more closely when I do (thanks).  I also have no need of the USB port on the Network SHIELD, but I will investigate pin 2 further as well.

4) The power select jumper is set to "reg".  I have both the USB (for serial monitoring) and a regulated 12VDC supply connected to the Max32.

 

Also, the output of the Analog SHIELD from D0 is -4.95 VDC (no matter how I change the code) while connected to the Max32.  With the Uno (R3) I get a nice saw-tooth on my o-scope from the "ramp" example.

 

Respectfully,

M. Mihalek

 

Link to comment
Share on other sites

Hello Jon,

I am using the following software:

chipKIT core : Version 1.3.1 - 02SEP2016

Arduino IDE : Version 1.6.13 - 15DEC2016

I also tried MPIDE as suggested.  So far the same results.  The Analog SHIELD works with the Uno but not the Max32.  I'm starting to wonder if my Max32 board has a problem with it's SPI bus.  Is there a way to check communication... say with and o-scope.  If so what would be a simple test?

 

Thanks,

Mike

Link to comment
Share on other sites

Hi Jon,

Well, I hooked up the O-scope to the SPI bus on both the Uno and the Max32.  The Max23 does not seem to be communicating.... only noise.  I tried looking through the post you suggested, but the library file for a shield is a little over my pay grade.

 

Thanks,

Mike

Link to comment
Share on other sites

Hi Mike,

Sorry for the confusion. In the thread I posted has a link to the github code for the newest code for the Analogshield library which is here. Do you have any other IC's that work on spi? You could also use one of the SPI sketchs like the DigitalPotControl. I believe you would need to change the slaveSelectPin pin to work with the max32 but then you could also see if it produces communication on the SPI pins.

cheers,

Jon

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...