Forum Discussion
If your data rate is under 1Mbps, you could probably just run the interface at 10Mbps (versus 100). This leads into the issue of putting the magnetics on a seperate board. Generally, when you are running "high speed" signals, you want to keep traces short. In your case, keeping the magnetics close to the chip. But you have some isolation concerns - are you referring to isolation from the standpoint of high voltage / PCB dielectric breakdown? Or are you worried about digital signals contaminating the Ethernet signals (crosstalk)? Be careful with running these traces off-board - especially if you intend to run at 100Mbps. There are many ways for a designer to connect two boards - flex circuits, cables, connectors. Whatever solution you decide to use, you should perform a signal integrity analysis. Also, the design of the PCB near and around the magnetics is usually very specific (at least it is for GigE). For example, not having any other signals (except the ones from the PHY) on any other layer below the magnetics. Some recommend having a nice clean ground plane under the PHY - others recommend not having one. The best thing to do is read the device datasheet, and contact the manufacturer. Some will critique your PCB design free of charge to make sure it looks OK. Personally, I would keep the magnetics right next to the PHY - but in your case, I don't fully understand the specific requirements / circumstances that you are facing.
I wish I could provide you with the state machine code I had, but that is the property of my employer and I'd be in big trouble if I made it available (even though the code is so simple that it's like patenting 1+1 = 2). Have a look at section 10.3 and 10.4 (transmitting and receiving a packet) in the LAN91C111 datasheet. I implemented those exact routines. Section 8 is your friend. You'll probably need to read it several times before things start to sink in - at least that's what I needed to do. For example, to start the Receive process, you might have something like this: -- Set Bank register to 0: WHEN State0 => nWR <= '0'; Address <= X"30E"; Data <= X"0000"; Next_State <= State1; WHEN State1 => nWR <= '1'; Address <= X"30E"; Data <= X"0000"; Next_State <= State2; -- Set RXEN to 1, as stated in 10.4 WHEN State2 => nWR <= '0'; Address <= X"304"; Data <= X"0001"; Next_State <= State3; WHEN State3 => nWR <= '1'; Address <= X"304"; Data <= X"0001"; Next_State <= State4; .... I think you get the idea..