 |
|
 |
| Parallax Forums > Public Forums > Propeller Chip > TCP/IP Stack (Includes Beta Code - Responds to Pings / ARP) | Forum Quick Jump
|
  |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/20/2006 9:26 PM (GMT -8) |   | | I think my checksum problem was related to me sending an incorrect number of bytes in a packet. I am going to try udp first since tcp is so dang long with its annoying syn, ack, fin, etc flags. I am hoping to eventually hook this up to some christmas lights and controlling it via network. | | Back to Top | | |
 |  Ym2413a Registered Member

       Date Joined May 2006 Total Posts : 477 | Posted 12/21/2006 4:28 PM (GMT -8) |   | Oh, this is cool. A propeller based web server. *grins*
HEY!! why not write a propeller based browser in its 4-color glory? I have seen a browser for the C64 before, it was pretty neat to say the least. | | Back to Top | | |
     |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/22/2006 8:52 AM (GMT -8) |   | Dave is correct, I am not using the PCI interface on the computer NIC. I am only using the ethernet magnetics (the rectangle on the PCB labeled FB2022) and the ethernet jack (the silver box with the RJ45 cable plugged in).
I would recommend a prebuilt module from edtp.com or sparkfun.com . I used the schematic from http://www.edtp.com/download/ft/framethrower_package.pdf to wire up my test bench.
Harrison | | Back to Top | | |
 |  Catweazle Registered Member

       Date Joined Dec 2006 Total Posts : 17 | Posted 12/22/2006 12:09 PM (GMT -8) |   | Very exciting!
two little questions:
1. I heared there are some bugs in the ENC28... (Microchip Errata), did you haven't any? 2. are the the transformer values (filter,ratio ...) critical? | | Back to Top | | |
 |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/22/2006 12:35 PM (GMT -8) |   | The only problems I ran into with the current B5 rev were: - RX Buffer should start at 0x0000 since crossing the 8kb circular buffer end would corrupt the buffers - Buffer pointers should only contain odd values - Auto half duplex detection via LED polarity errors
I worked around all these issues in software. The driver now sets most, if not all the parameters so the chip doesn't have to infer any major settings. I haven't run into any odd bugs after fixing the ones listed above.
--
I am not sure how critical the ethernet magnetic ratio / discrete components are. I just hooked the magnetics straight into the ENC chip and used the recommended 47 ohm resistors. I completely omitted the inductor / ferrite bead recommended by Microchip. My setup worked perfectly with my dlink router / switch | | Back to Top | | |
 |  acantostega Registered Member

       Date Joined Jun 2006 Total Posts : 105 | Posted 12/22/2006 5:25 PM (GMT -8) |   | | | |
   |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/24/2006 8:25 PM (GMT -8) |   | Very nice. I might eventually make a breakout board for the chip so I don't have to bother with the mess I have right now.
Also, if you don't have a 25mhz crystal on hand then you can use the Propeller to generate the 25mhz clock. That's what I did because I couldn't find a 25mhz crystal.
Harrison | | Back to Top | | |
  |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/25/2006 8:37 PM (GMT -8) |   | This is highly beta code so you will have to look around in the source to see how to configure the mac address, ip address, and i/o.
Here are some pointers: In driver_enc28j60.spin, there is a start method with the paramters start(i_cs, i_sck, i_si, i_so, i_int, clkout) . These are the pins that are used to communicate with the enc28j60 chip. In driver_tcpstack.spin, you will see that the start method calls the enc28j60 driver's start method with pin numbers that correspond with those hooked up to the enc28j60 chip.
The above may be confusing so heres some more info: start(i_cs, i_sck, i_si, i_so, i_int, clkout) cs = hook to enc28j60's cs pin (CS) sck = hook to enc28j60's sck pin (SCK) si = hook to enc28j60's spi in pin (SI) so = hook to enc28j60's spi out pin (SO) clkout = hook to enc28j60's xtal1 in (XTAL1) if you are not using a 25mhz crystal, otherwise leave this pin disconnected
You will need to use your own judgment on how to get this to work. Read the datasheets to make sure you hooked up stuff correctly.
Harrison | | Back to Top | | |
 |  Gavin Registered Member

       Date Joined Aug 2006 Total Posts : 134 | Posted 12/25/2006 11:26 PM (GMT -8) |   | |
Harrison,
Well done, you are making it easier for the rest of us to follow in your footsteps.
I have some premade modules.
Will need to check if they are B5 silicon.
Date code is 05 27, how do I know if it is B5?
From the errata data I need to get it working first to read address 0312 ?
Hmm just read your last post re versions, guess I should just plug it in and test it.
Gavin | | Back to Top | | |
 |  Catweazle Registered Member

       Date Joined Dec 2006 Total Posts : 17 | Posted 12/26/2006 6:59 AM (GMT -8) |   | William, on the schematic the connections to the prop is on the left side, it's a 8pin connector labeled JP1. (CS,SCK,SI,SO,RESET,INT,WOL,CLKOUT)
It's mainly copied from the Olimex schematic.
In the Eagle PCB (.brd) file the connector is on the right upper side.
The www.microchip.com Erratas sais that you should use a 2k7 bias resistor (ENC28J60 pin 14) for revision B1 and B4, and 2k34 for revision 5
- Eric | | Back to Top | | |
 |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/26/2006 12:58 PM (GMT -8) |   | About revision compatibility: The NIC driver start() method has a few lines of code which read the revision register and compares it to the required revision number (B5 in this case). If you find out the driver isn't loading then try commenting out those lines and seeing if it works.
Also, in theory B4 revisions may work if you are using the propeller to clock the enc28j60 chip. The reason why there was a 8mhz spi clock requirement was due to a clocking synchronization between the 25mhz enc28j60 clock and the spi clock. Using the propeller to provide the 25mhz using the counter modules would in theory mean that the clocks are somewhat in sync so it may work. Then again I could be entirely wrong, but you could always try.
Also, the code posted in the original post only does ping responses. The current revision I am working on isn't ready for release yet.
Harrison | | Back to Top | | |
  |  BEEP Registered Member
        Date Joined Dec 2006 Total Posts : 32 | Posted 12/30/2006 5:24 AM (GMT -8) |   | | | |
 |  Harrison. Registered Member

       Date Joined Jul 2004 Total Posts : 441 | Posted 12/30/2006 9:38 AM (GMT -8) |   | Interesting links. I used http://www.edtp.com/download/enc28j60/enc28j60_driver.zip while working on this since I am much more familiar with the PIC line of micros and C compilers. In any case, I resorted to using a tcp scheme thats extremely simliar to the one described in the http/tcp with the atmega micro link you posted.
Harrison | | Back to Top | | |
 |  TransistorToaster Registered Member

       Date Joined Jan 2006 Total Posts : 149 | Posted 1/11/2007 3:46 PM (GMT -8) |   | What documents should one read to become more familiar with embedded ethernet. Do you know these by Fred Eady and if so, which one is better:
http://www.edtp.com/netbook_page.htm http://www.edtp.com/airdropbook_page.htm
Or could you recommend some other reading? Frank | | Back to Top | | |
 |  Kloss Registered Member

       Date Joined Jan 2007 Total Posts : 43 | Posted 1/12/2007 2:24 AM (GMT -8) |   | Take a look at this: http://mikrocontroller.cco-ev.de/de/avr_webserver.php
They're using an ISA ethernet card (NE2000 or 3COM) as an interface. Not a bad idea, as you can get this type of cards for free or less than a buck.
cu Karl | | Back to Top | | |
 | 30 posts in this thread. Viewing Page : 1 2 | | Forum Information | Currently it is Friday, November 20, 2009 11:14 PM (GMT -8) There are a total of 393,738 posts in 55,521 threads. In the last 3 days there were 82 new threads and 702 reply posts. View Active Threads
| | Who's Online | This forum has 17687 registered members. Please welcome our newest member, mark09. 48 Guest(s), 1 Registered Member(s) are currently online. Details SRLM |
Forum powered by dotNetBB v2.42EC SP2.02 dotNetBB © 2000-2009 |
|
|