The teensy is pretty cool, but with all that processing power, it needs to be able to do more than turn pins on and off to communicate. If I’m going to use this for anything truly useful, I’ll want it to send information over a network.
In this experiment, I figure out how to wire an ENC28J60 ethernet module to the Teensy 3.1. This is a 3.3V module and should work with the Teensy 3.0 as well, but don’t take my word for it – I haven’t tested it.
I have written about the ENC28j60 before. I have used it several times with an Arduino Nano. Depending on the software library, I’ve been able to get it to act as a client or server for both TCP and UDP. This link points to a recent blog entry regarding the ENC28J60:
The ENC28J60 I am using for this project is a bit different from the others I have used in the past. It is NOT an Arduino Nano shield. It is just a little stand-alone module. It looks about like this:
I purchased mine from eBay from a seller located in the US for about the going Chinese price:
Mine didn’t have mounting holes. Next time I’ll make sure I find one with holes.
I went searching the web for instructions on interfacing the Teensy to the ENC28J60. I didn’t find anything, but I did find someone who had interfaced the Teensy to a normal Arduino ethernet shield. CLOSE ENOUGH! Here is a link to those instructions:
Using those instructions, and the pin descriptions on the two boards, I came up with this wiring diagram:
You might find the official Teensy Pinout chart useful as well:
Wired up, it looks like this. You can click on the pic to get a much bigger version:
Once I had it wired, I then opened the UIPEthernet TCP Server example code. I simply changed the IP address to something that would work on my local network and compiled/uploaded.
Worked great! Pinged and connected to it on the first try.