Over the years as microcontrollers have become fast enough to do the heavy lifting, we have become used to 10 megabit Ethernet being bit-banged from interfaces it was never meant to emerge from. We think however that we’ve never seen one driven from an SPI interface, so this one from [Ivan] may be a first. With a cleverly designed transceiver using logic chips, it even offers a chance to understand something about the timing of an Ethernet interface, too.
The differential logic signals derived from a simple Ethernet transceiver can be read by an SPI bus, but for the lack of a clock line. The challenge was then to construct a circuit the would construct the required clock pulses from the state changes on the data line. This would become a monostable with XOR gate, and a shift register to handle the clock during the preamble phase.
The resulting circuitry fits neatly on a shield for the ST Nucleo 64 board, where while it might not be the obvious choice for an Ethernet shield it certainly does the job.
If unexpected Ethernet is your thing, how about the i2s peripheral on an ESP8266?
Why do people try to reinvent the wheel ? Not to mention in todays world I doubt it handles all protocols that would probably hose something else out on the LAN.
“My discrete computer lacks two major things: sound and network. The project I describe here is the first step to making it capable of network communication. I don’t touch the computer itself now, but instead build a transceiver which converts a 10BASE-T Ethernet signal to SPI and back. I use an STM32 MCU to test my transceiver for now. In the future I plan to connect the transceiver to the discrete computer.”
So it is not re-inventing the wheel. it is re-inventing the entire car?
*runs out of the room avoiding flying shoes*
Welcome to Hackaday.
Except that you must first reinvent the screwdriver !
“To bake an apple pie from scratch, you must first invent the universe.”
Don’t forget reinventing the tools to make the screwdriver.
And the tools to make the tools to make the screwdriver.
And so on, until you turn into the Primitive Technology guy.
Why do people try to do anything? Everything’s been already done. Multiple times. Duh.
How about a remote control dildo with TWO WAY morse transmission? This is what every chess grandmaster dreams of.
My comment above was supposed to say “insert that meme with Leonardo DiCaprio squinting here” but I put it in angle brackets and WordPress got rid of it. Oh, well. Now it’s even less funny.
Yes please!
That would be the iFriends Network circa 1995
You’re disappointed by his lack of willingness to just buy something that would work? You might be commenting on the wrong site, my man.
Not sure why when a W5500 is < $10 on breakout with RJ45 jack and does this exact job and better.
I am all for designing things myself, but when a chip is low cost and does what I need, I dont reinvent the wheel. except maybe a PIC10F instead of a 555 :)
They might enjoy it.
Bizarre concept, I know.
Someone’s never done something the wrong way on purpose just to actually learn the nitty-gritty details of why the right way is so vastly different
Wouldn’t implementing a proper Ethernet interface on an FPGA be a more worthwhile task and closer to what is actually used than hacking it together with a microcontroller and a few discreet components?
See, now you’re talking sense again.
Because that’s too reasonable.
The biggest problem with a W5500 is it can only provider one raw socket for secure transmission. Up to 8 tcp or up, but if you need tls you’re down to one. This actually sounds like a good idea to me. There are precious few MAC chips left on the market, if you need tls on an mcu. If stm32 or nrf52 or even CC3220 came with a builtin MAC we would have very different possibilities
Apparently the stm32f417 has mac, so that solves a few cases.
If you ever want to know the difference between a consoomer and a creator, this is a good example.
Exactly this.
I’m… not entirely sure this is the place for you…
its learning from basics
>doubt it handles all protocols
see, this comment is a clear evidence you could use some of that learning :) You have no clue how any of this magical “ethernet” works other than press button receive bacon.
>W5500 is < $10 on breakout with RJ45 jack and does this exact job and better
no, W5500 is MAC&PHY and limits (no fragmentation) you to whatever build-in TCP/IP stack supports. Above project is low lever PHY implementation pushing raw data stream to your software stack.
Exactly. It handles no protocols except Layer 1 ethernet, so anything your mcu is able to frame into a valid L1 stream can go over it. Maybe even AES-10, though that would be a miracle indeed.
Anyway, 4 data bits and a data valid is all you get at this level
Because big corp is an asshat and you are not doing it first.
The whole point of doing it is to do things the old-fashioned way — like making a computer from 74xx parts or even discrete transistors/diodes … I mean, who wouldn’t love to solder in just over 3 000 transistors to recreate a 6502 CPU. (Sorry, I think I got a bit carried away there.)
I love to solve puzzles, which is basically a waste of time and rarely particularly educational, whereas many of these types of projects are not only educational but shows off people’s ingenuity.
https://monster6502.com/
I’ve been waiting for these guys to start selling it for years. Still waiting…
Lazarus Long said something that seems to fit in here:
‘Critics are unbiased- they hate all creative people equally’.
Microchip had the SPI->Ethernet 10Base-T ENC28J60 for about 15yrs+ and the 10/100 ENC28J600 for about as long..
AS WELL as the PIC18FxxJ60 MCUs with built-in 10Mb Ethernet for also about 15yrs.
Microchip has had 2 SPI->Ethernet controllers for around 15yrs.
The ENC28J60 (10base-T) and ENC28J600 (10/100base-T).
Also for about the same length of time, Microchip has had the PIC18FxxJ60 family of microcontrollers that have built-in EtherMACs with PHY right in the package. All that’s needed is is external magnetics, a jack and a few passive parts.
I’ve made several projects with them.
Wow, from 26 comments only 3 are remaining/visible. There must have been a really intense discussion here… Btw, i like this hack.
I don’t see why. It’s a PITA….
Microchip’s SPI->EtherMACs made this a breeze over 10yrs ago.
That’s why the discussion is probably so thin.
Those of us who have been around long enough realize this article is a bit of bunk.
The claim of “bit bangling” and “doesn’t exit” are both not true.
We’ve been using the PIC18FxxJ60 series for years…
This article is kinda like, “LOOK! I CREATED NEVER BEFORE EXISTING NETWORKED GAMES!!” in 2022..
Ooof.
WCH sells spi to giga ethernet. Also spi to USB3. Simple one chip solutions. There is a reason we don’t drive model A’s anymore.
Terrible crash protection?
This is the way on education to learn also how stuff really works on lowest levels.. if you learn this then you can do or design anything on technology!!!
Would be keen to use the Raspberry Pi Pico PIO as an Ethernet transceiver. At $1 a pop for this chip it’s cheaper…