Go Down

Topic: Connecting an Ethernet PHY to Arduino Due (Read 100462 times) previous topic - next topic


Hello kcore,

Above all, I am very happy for your willingness to join this project. I am also very pleased with your words of recognition for my work with Arduino Due but sorry that you are facing 'Dum Roma deliberat Saguntum perit Lat' with the other Ethernet solution. I hope you can make more progress very soon.

Now I will get to the point. At this time, I cannot do too much in the shield side. I expect to get the Davicom PHY by the end of next week (the vendor can't ship it directly to America). My wedge will be ready a little before then. Thus, I hope to start tests by the first week of February.

I chose the Davicom PHY because Atmel already developed the API driver for DM9161A (ethernet_phy.c, ethernet_phy.h) and it is proven with SAM3X-EK. In reference to the other PHY options, I do not have enough knowledge or references with which to form a judgement about them but as Atmel states "Due to standardization, the connection between a MAC controller and a PHY is straightforward and simple. Even, any PHY can work with any MAC." It sounds like, "Just do few changes on the DM9161 driver". Regarding the wedge idea....Do you remember the TV series 'The Six Million Dollar man?...I always think of the Arduino Due as Col. Steve Austin. Due looks like another Arduino board but inside contains a lot of power. An unknown power. For me, those Ethernet and CAN shields are like binoculars or hydraulic pliers if compared with the CAN and EMAC controllers embedded inside Due. We need to take advantages of these capacities. This thought made me figure any possible way to reach them...but let's leave my wedge design in mystery for now. So, I will be working these next few days with the Ethernet API. As I mentioned before, it is compiling good but it is not relevant yet in the Arduino context.

Bottom line: Get ready with you Dues and I would recommend you to get the Davicom PHYs. I believe we can start doing official tests, God willing, in about two weeks.


Today I have ordered some DM9161 from ebay so I'll be able to contribute to the progress on arduino due ethernet port. ;)

Some time ago I wrote tutorial on: arduino + ethenet shield + node.js for udp streaming http://frenki.net/2012/10/remote-logging-with-arduino-and-node-js/
I would like to use the same technique (but faster) to convert DUE into simple oscilloscope and logic analyser. (But this time without W5100 ethernet shield)


Frenki_, I am happy you also embark in this journey. Welcome aboard!
In reference to your arduino + ethenet shield + node.js, shrewd and amazing! You should submit it to the Arduino blog if you have not already done so.

By the way, I just noticed something in the Taijiuino.

The pin 10 (RESET) of its Ethernet terminal is connected to the pin 47 (NRSTB) of the SAM3X8E instead of pin 69 (NRST).
Pin 47 is input only and enables asynchronous reset of the SAM3X8E when asserted low, unlike pin 69 which is bidirectional and can provide a reset signal from SAM3X8E to the external components.

In the SAM3X-EK, pin 69 is connected between SAM3X8E and DM9161.


Jan 26, 2013, 10:51 pm Last Edit: Jan 26, 2013, 10:52 pm by cowasaki Reason: 1

Can anybody post a picture showing the Eth terminal? Thanks.


Hi all,

First I would like to thank you for all the energy you put is this project , which seems very interesting :) !

Then I have one simple (maybe stupid) question :

On one hand, we have Arduino Uno which comes with ethernet shield (with W5100) and is able to do some client/server application with ethernet.
On the other hand, we have Arduino Due which indeed has a SAM3X and thus some ethernet capabilities, but no access to these ethernet pins and it also needs another PHYceiver, which means alse another kind of shield (Am I right?)

So my question is... what is wrong with the existing ethernet shield ? Is it a matter of speed ? In what case would we need to use this new extra shield rather the W5100 existing one ?

You may answer with "it depends on your application, the amount of data you want to transfer, etc.", so here is what I would like to do:
Just one client, one server, ethernet connection. The arduino is the server. The client makes requests, which mean "I want information number X". The servers makes the answer, which is just a few characters for each answer. So it's a lot of small requests - answer, maybe a hundred per seconds. It must be able to run for hours without "bugging or overloading"

=> Is this good with the standard "ethernet W5100 shield" ? Or should I follow in more details your developments which aim at using the SAM3X ethernet hardware with a specific PHYceiver?

Thanks for your answer !


Jan 28, 2013, 01:17 am Last Edit: Jan 28, 2013, 01:19 am by Palliser Reason: 1
Hello dammien,

Yes, speed. What moved me with this Ethernet interface, besides the exercise of help building a future Ethernet API for Due, was the ability of SAM3X8E's EMAC controller to work with RMII at 50MHz, thanks to the fact that all transfers between the EMAC and the core through the DMA interface are 32 bit words (FIFO 128-byte). 100 Mbit/s pure. There are of course more embedded characteristics you can find in page 1267 of the SAM3X specs (Atmel doc11057). We can implement also lwip network stack, or NUT/OS or even the venerable ┬ÁC/IP (now 6LoWPAN). I don't remember now but I think W5100 only has inbuilt IP stack, but without any doubt, W5100 remains to be a phenomenal Ethernet controller. Indeed, It should work for what you want.


Jan 30, 2013, 08:54 am Last Edit: Jan 30, 2013, 01:19 pm by Frenki_ Reason: 1
I have found this DP83848 PHY ethernet board which should be very simple to set up, because it's kind of all in one. On the header are all the signals neded for RMII.



The cheapest price that I have found is on ebay for 15.99$:

Since I'm not really experienced in pcb design I'll go with this for a start and perhaps later make my own pcb design...


At the beginning, I was tempted to use DP83848, but once I realized that the Atmel guys already have the driver for the DM9161, I decided to save some time. May be you are aware of, but, a better but more expensive option is to use a Micrel PHY, pretty much because, according to Atmel, it has better hardware integration and documentation.
Indeed, it is in my list To-Do to purchase one of the series KSZ80. Anyway, if you choose the TI, likewise I will help you with it.


Tnx :)

I'm not familiar with (this or) other PHY modules, I just liked this one because It has everything soldered so there is only the software part to do.
I'm a developer so software is easier to me than pcb design...


Feb 06, 2013, 04:39 am Last Edit: Feb 06, 2013, 04:44 am by kcore Reason: 1
I received a couple of the TAIJI-UINO Due models from Elechouse.  The build quality is pretty good overall but one of them had a bit of metal in the USB mini-b connector that I had to bend out with a precision screwdriver.

Let me know if you want any up close pictures of it, I'll be happy to post them up.

I don't have any pins small enough to solder into the holes for the ethernet terminal area so I'll have to figure out what size they are and order some.  They look to be the same size as the small pins next to the Due 4 pin debug post.  Anybody know what size those are?

I'm still waiting on some of the Davicom phy chips to arrive along with some 50 mhz oscillators and some extra magjacks.  I figure I'll just re-create the AS-DM9161 schematic on a breadboard since ordering them from the Russian site wasn't very apparent.


Hello kcore and thank you for the update.
Regarding the Davicom, I'll be posting tomorrow night an electric schematic with connections to Arduino Due. Like you, I still waiting for my Davicom module (AS-DM9161) from Moscow and hope to get it by early next week. I also ordered one Taijiuino as a second front (in case my wedge doesn't make it with the original Due. By the way, the wedge is almost done. I just need to sold the wire connectors to it). In reference to the Taijiuino connector specs., it is a 12-pin 2-row, 1.27mm (50mil) pitch. In my case, to avoid the soldering, I asked the vendor provide connectors for me and they did it for free!(I don't know exactly what they did it. I have to wait to see it). I hope to be ready to start tests in one week with the original Arduino Due and the Taijiuino (one at a time). Regards! 


It would be nice if you could achieve this with a DP83848 PHY as I have some laying around here :D

As the pitch is 1mm, this would fit


Hello gaplee and good catch with the TaijiDUE.
Can anybody post a picture showing the Eth terminal? Thanks.

OK. I have good news!. I just ported the Atmel Ethernet API to Arduino IDE. At least the 'EMAC_EMAC_EXAMPLE1' now called 'Arduino_Due_EMAC_Sample_1.ino' is compiling with no errors. My next step now is try to simplify as much as possible the library (34 files) and then wait for my shield to be ready for preliminary tests before upload it to github. Yes!

Hey Palliser - any chance you can share the code for example you have - I am working with a KSZ8051RNL which I had working on LPC1789 and want to port to the SAM3X8E.



Looks like I found a header that will work for the TaijiDUE, It's 1.27 mm pitch dual row:

I've been getting a little better at using Eagle recently and looking at the schematic for the AS-DM9161 it looks fairly simple and possible to build at home:

I think I might be able to recreate this in Eagle as long as the schematic is correct.  I may need you to verify Palliser.  It's basically a Ethernet magjack, the DM9161, some resistors, capacitors, an oscillator and a header for breadboard.  Anyone interested?


Feb 07, 2013, 05:01 pm Last Edit: Feb 07, 2013, 05:05 pm by Palliser Reason: 1
Here a couple of schematics:
1- Original Arduino Due and Taijiuino Ethernet pins connection reference with DM9161 PHY.


2- Original Arduino Due and Taijiuino Ethernet pin location reference.


The PHY can be simplified like the one posted by kcore (reply #28).

Go Up