Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Monday December 19, @11:49AM   Printer-friendly
from the to-SPI-and-back dept.

https://imihajlov.tk/blog/posts/eth-to-spi/

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.

[Time for a bit of work with the soldering iron.... JR]


Original Submission

This discussion was created by janrinok (52) for logged-in users only, but now has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 2) by janrinok on Monday December 19, @02:10PM

    by janrinok (52) Subscriber Badge on Monday December 19, @02:10PM (#1283145) Journal

    I do a bit of project work with ESP32s. This hardware seems to fit the bill quite nicely. Thank you.

  • (Score: 2) by epitaxial on Monday December 19, @04:40PM

    by epitaxial (3165) on Monday December 19, @04:40PM (#1283161)

    Now these are the stories I really enjoy.

  • (Score: 1, Funny) by Anonymous Coward on Monday December 19, @04:41PM (2 children)

    by Anonymous Coward on Monday December 19, @04:41PM (#1283162)

    One shots instead of a PLL and RC delays with inverters?

    I threw up a bit in my mouth when I saw what he came up with.

    • (Score: 2) by Rich on Monday December 19, @06:22PM

      by Rich (945) on Monday December 19, @06:22PM (#1283189) Journal

      Why not? The signal has at least one clock edge on every bit. The Woz Machine with its bit-syncing states was much more reliable in its time than anything with a PLL, particularly the WDC1772, but also the uPD765/9229 combo.

      Now, the clock is a bit high for such a state machine, but I've been thinking whether the entire Ethernet PHY could be done with a 74AHC14 and a few jellybean discretes. :)

    • (Score: 2) by RS3 on Monday December 19, @07:18PM

      by RS3 (6367) on Monday December 19, @07:18PM (#1283206)

      > One shots instead of a PLL

      I don't know if I've ever designed a PLL into a circuit, but I'm curious: how does a PLL replace a one-shot? I'll re-read up on it- maybe a PLL can be used to generate a defined pulse length?

      >RC delays with inverters

      Assuming you're implying the RC delay with inverter is inexact? The inverter is a Schmitt trigger [wikipedia.org]: fairly well defined 1/0 transition voltage point, with hysteresis (the little symbol inside the triangle). I'd have used a pot to trim it up, but it should be fairly reliable in its context.

      As my brother used to say: "you have to learn to walk before you learn to run".

  • (Score: 2) by VLM on Monday December 19, @04:51PM (3 children)

    by VLM (445) on Monday December 19, @04:51PM (#1283165)

    I find it interesting technologically that SPI and 10baseT were both late 80s developments.

    The "silicon stuff" made them both reasonable at about the same time.

    Another novelty about this story is "technically" a 74LS123 multivibrator (at least in the old days) was just barely too slow to generate 100 ns pulses but in practice you could generally get a link light on "most cheap ethernet switches". So I recall a practical joke of one coworker trying to convince another coworker than a '123 was actually an ethernet compatible single chip microcontroller back in the days when PICs were new. Or maybe it was massive abuse of a 555. Anyway the point of this ramble is its pretty easy to trick a 10baseT port into "link light on" and in the old days the idea of a single chip ethernet microcontroller was "pretty funny practical joke" although they're obviously commercially available now.

    • (Score: 2) by RS3 on Monday December 19, @08:38PM (2 children)

      by RS3 (6367) on Monday December 19, @08:38PM (#1283218)

      > I find it interesting technologically that SPI and 10baseT were both late 80s developments.

      I'm curious- you mean they were advanced for their time, or behind the times? Or something else?

      • (Score: 2) by VLM on Tuesday December 20, @03:02PM (1 child)

        by VLM (445) on Tuesday December 20, @03:02PM (#1283333)

        They both appeared in the late 80s at the same time with similar clock speeds.

        SPI was IIRC a motorola thing that turned into a "standard"

        10baseT was a modified version of starlan or something like that eventually replacing 10base2 (the thinnet coax)

        Technologically they have little to nothing to do with each other, except for operating at about the same speed using the same level of silicon technology so they appeared about the same time. SPI for fast cheap peripherals and 10baseT at more expense for roughly as fast short range LANs.

        • (Score: 2) by RS3 on Tuesday December 20, @06:11PM

          by RS3 (6367) on Tuesday December 20, @06:11PM (#1283375)

          Thanks, yes, pretty interesting. I have no direct knowledge, but maybe the sum of other electronic developments, including more and more microprocessors, their software, and communication protocols, specifically shared-bus, created the need all around the same time?

          IIRC SPI was even being used in televisions in the late 80's- communication between the UI (buttons), remote control, and various signal processing chips.

          The big difference: SPI is a "commander" ("captain"? and "conscripts"?) and "subordinates" system. One station is the the boss who tells individual stations when they're allowed to "own" the bus and talk on it, otherwise the subordinates are only allowed to listen.

          With Ethernet, anyone can talk or listen at any time. The "signaling protocol" is: first listen, if the bus is quiet, talk. Electrical circuits sense when two (or more) happen to talk at the same time, and those circuits tell the communication chip to stop, wait a pseudo-random ("exponential backoff") time, and try again.

          I got into computers, networks, etc., around 1990. Thankfully never had my hands on the original thick-net, but did some 10base2 "thinnet". Still have some BNC connectors and crimper and BNC "Tees".

          Anyway, the original 10baseT plugged into "hubs", sometimes called "concentrators", which were not the switches we use now, but were effectively parallel connections. IE, every port saw all of the traffic, so network packet collisions and saturation could still happen as in "thick-net".

          The reason for using CAT-3 wire was that telephone technicians already knew how to wire that stuff. RJ-45 connectors were used extensively in offices and larger "PBX" local phone systems, so connectors and crimpers were already out there.

          I remember when 100baseT was being proposed, there were 2 major competing technologies- one that we have now which uses only 2 wire pairs, and the other used all 4. I didn't get into the details- I knew I'd use whatever ended up becoming standard.

  • (Score: 2) by VLM on Monday December 19, @04:56PM (1 child)

    by VLM (445) on Monday December 19, @04:56PM (#1283167)

    But the ... MCU had barely enough RAM ... for all the buffers I needed

    LOL that is my experience with every networked microcontroller project ever. We've all been there LOL.

    Arduino peeps are satisfied with "blink the LED", but you connect a project to a LAN and its like "yeah I 'need' MDNS and NTP and and and and" and next thing you know a quarter meg of ram is not nearly enough.

    • (Score: 2) by maxwell demon on Monday December 19, @05:54PM

      by maxwell demon (1608) Subscriber Badge on Monday December 19, @05:54PM (#1283183) Journal

      But NTP requires just 3 bytes! At least in ASCII encoding. :-)

      --
      The Tao of math: The numbers you can count are not the real numbers.
(1)