I've been really pleased with the 1284p - I'm using the version sold (with Arduino platform already bootloaded) by Hobbytronics.
But I am about to give up on trying to make it work with ENC28J60 modules. (Why ENC28J60? - because the chip is available in DIP form, so that at the second prototype stage, I can make a board with all necessary components that is readily home-solderable)
I've trawled high and low. I've tried multiple 1284ps and multiple ENC28J60s. I've modified sketches to report pin settings for MISO etc, and all looks good. Forums suggest 2013 sketches that presumably worked at the time but won't compile with the current IDE. There are plenty of threads describing and hypothesising problems, and then everything tails off into silence. But seemingly nothing that suggests a workable current-day solution.
As of Feb 2018, has anyone worked out how to get ENC28J60 modules working (as TCP client) with the 1284p?
For ATmega1284P the only thing you should need to change is the SPI pin definitions. However, ENC28J60 is generally a pain to get working no matter which microcontroller you're using it with. I'd recommend just using a W5100 or W5500 module instead.
As to sketches that won't compile, well we're not going to be able to help you with that unless you provide the necessary information.
pert:
For ATmega1284P the only thing you should need to change is the SPI pin definitions.
And that is where the fun starts! I echo the value of defined values SS, MOSI, MISO, and SCK and get the values I expect (10,11,12,13). I tried to track down the hierarchy of where these are values set and used - but it defeated me. Am I missing something obvious?
pert:
As to sketches that won't compile, well we're not going to be able to help you with that unless you provide the necessary information.
I was thinking of the EtherShield library, for which someone in 2013 claimed success running the example sketch with a 1284p, but there is subsequent comment that "The EtherShield library was written for older versions of the Arduino IDE(1.0.6 and previous)" - and there is a clear warning that it is no longer maintained. I am not particularly sold on using that library - it was just the only example I could find of someone explicitly declaring success in using a 1284p with an ENC28J60.
My only experience with ENC28j60 is using the UIPEthernet library:
I just had a look and it appears the library should work for ATmega1284P without any alterations. The other library that's fairly popular for ENC28j60 is called EtherCard. I haven't used that one. I liked UIPEthernet because the API is the same as the regular Ethernet library so (theoretically) you can use any code written for the Ethernet library by just changing the filename in the #include directive.
I haven't ever heard of the EtherShield library so it's probably no loss.
Thanks to pert for spotting absence of AVCC connection. Not sure whether it was that or another issue, but I HAVE now got the Hobbytronics ready-burnt 1284p Arduino working with ENC28J60 using this circuit:
For others finding this thread - there are threads elsewhere suggesting that wholesale code changes are needed to try and get 1284p and ENC28J60 working together, but no records of success. So here is confirmation that they should work with standard pins:
Even when running, the ENC28J60 was slower than wiznet 5100 and wiznet 5200 modules - about 50% longer for each cycle of my repeated-read web client test (6 secs vs 4 secs), and timed out perhaps one reading in 20.
Note: if your ENC28J60 module needs 3v3, do be careful to smooth the output: using a LF33CV voltage regulator, my 3v3 was surprisingly noisy until I added a capacitor.