chipKIT® Development Platform

Inspired by Arduino™

new to max32, some questions on porting from mega

Created Wed, 25 Dec 2013 14:30:47 +0000 by doors666


doors666

Wed, 25 Dec 2013 14:30:47 +0000

Hi guys,

This is my first post here. I am trying to port an app from mega 2560 to max32 as i ran into performance problems. I have a few questions which werent clear from reading little bit of the documentation i have managed to read so far.

Does the arduino ethernet shield work with max32. I wouldnt want to buy the max32 ethernet shield till i am sure that main board meets my requirements and would like to use the arduino shield till that time.

Does the max32 ethernet shield generate an interrupt on receiving a message like it does on mega on pin D2. If not, is there a very fast way (in a few clock cycles) to detect if I have an ethernet message or new connection.

Will my SPI devices work with the standard mega pins (50, 51, 52, 53).

Is there an emulator available where i can run some sample test programs.


majenko

Wed, 25 Dec 2013 15:43:32 +0000

I don't know about the Arduino's Ethernet shield, but the ChipKit one works completely differently. It functions as a PHY interface to the internal Ethernet peripheral in the pic32 chip, so it certainly can't provide an interrupt on a pin. You would have to do it fully programatically.


doors666

Thu, 26 Dec 2013 03:24:48 +0000

I don't know about the Arduino's Ethernet shield, but the ChipKit one works completely differently. It functions as a PHY interface to the internal Ethernet peripheral in the pic32 chip, so it certainly can't provide an interrupt on a pin. You would have to do it fully programatically.

Thanks, is there a cheap way (in terms of timing) to detect if there is a new connection or message on the ethernet. I need to check this in the loop function.


majenko

Thu, 26 Dec 2013 11:34:01 +0000

It depends on which library you use. I suggest you download the library kit from digilent (linked at the bottom of the Ethernet shield page) and take a look at the examples in the two ether net libraries therein - the chipKITEthernet library (old code) and the DNETcK library (newer code).

It works similar to proper BSD sockets where you listen for connections then accept one if it is available. I don't think the check for if a connection is available is particularly complex, so it shouldn't take too many cycles.