ethernet possible with pic?

ethernet possible with pic?

Postby ozzythaman » Thu Apr 08, 2004 5:22 pm

hi, thank you for a great site,
ive been planning on using microchip pics to connect directly to the ethernet network, ive searched for a long time for proof that it is possible (i havent been able to see why it shouldnt), but everything that ive come up with is pic chips AND ethernet network cards connected, but that is just too ugly.

then i found your site, and your principles on handling the raw communications (with udp for example) is just about exactly as i had imagined.. thank god i found this site..

Im not very into fpgas, but i'm very fond of the microchip pic series, i've already worked with them on a tiny little project with asynchronous data transfer over 2 wires (one ground). it had a header with sync, data length field and 4 BITS of payload :), it used manchester encoding..
so ive done very little of signal analysis with the pic, all done with C code, and now i want to do a pic that receives udp data directly from the ethernet socket...

i realise the main problem is the speed of the pic
the one i want to use is a pic 16F877 that uses a 20 MHZ clock... i wonder if it can be sufficient as a 10mbit ethernet signal has 20mbits to be checked, per second...

and i wonder if i will be able to use C for the coding...

ill try to keep you updated..


O D
ozzythaman
 
Posts: 1
Joined: Thu Apr 08, 2004 5:02 pm
Location: Ankara, Turkey

Postby fpga4fun » Fri Apr 09, 2004 2:06 am

I doubt you can do much with a microcontroller alone.
Transmission might be possible if the microcontroller can send synchronous bytes back-to-back at 10mbps, and you have some outside electronic to do the Manchester encoding.
Reception is harder because you have to sync-up on the incoming stream. Might be possible with a PLL to sync-up and a DMA or fast interrupt in the pic to grab the bytes.

Anyway I suggest you add an FPGA to your pic, would take some efforts to learn but you won't regret it.
fpga4fun
Site Admin
 
Posts: 837
Joined: Thu Sep 18, 2003 6:47 am

PIC Core in fpga

Postby csavery » Mon May 24, 2004 4:23 am

Hello,

Saw this post and had to comment. If you want to work with pic code then maybe check out the idea of emulating a pic in an fpga and having the ethernet built in as well. You can find several good pic cores out on the internet and if you put one in an fpga it can run at 48-60 mhz (I've read anyway and expect in some fpags you could go higher). The result is you can program in pic code and downlaod it into your fpag and then use the fpga for the ethernet i/o (and a heap of other i/o as well). It's incredibly flexible as you could even change the design and drops parts of the pic you don't want and add new peripgerals you do want. And the speed...

I haven't done this, yet, but it's doable. Look around.

I'm waiting to get my hands on some of the Spartan 3s. I can't find any anywhere but they say they're cheaper...

Chris :)
csavery
 
Posts: 5
Joined: Mon May 24, 2004 3:34 am
Location: Thailand

Postby Kristallo » Mon Sep 20, 2004 3:41 am

The PIC uses 4 clock cycles to execute one instruction so you would have to clock it at 80 MHz to have any hope of generating the correct timings. Even then you would have extreme problems.

C is not a good language for timing sensitive applications, Assembly gives you more control over the timing.

There is no chance you will make it without external circuits like a FPGA or a significant number of simpler chips.
Kristallo
 
Posts: 203
Joined: Mon Sep 20, 2004 3:25 am

Postby alxx » Tue Nov 16, 2004 11:57 am

For 8 bit micros and ethernet have a look at www.edtp.com (avr and pic )
or ethernut.de (avr)

To do it with just the micro you
could probably use a ubicom sx52 ,
they are almost compatable with pics
except they don't have hardware peripherals
(do everything in softwarea)
but run at up to 75MHz
alxx
 
Posts: 25
Joined: Tue Nov 16, 2004 11:50 am
Location: Sydney, Australia


Return to Ethernet