reaper7 67 Posted February 3, 2013 Share Posted February 3, 2013 This is a JeeLab ENC28J60 library mod for Energia StellarPad, working OK with other devices on the same SPI bus. Library: Ethercard_v09a.zip Ethercard_v09.zip Ethercard_v08.zip EtherCard_v07a.zip EtherCard_v07.zip EtherCard_v06.zip EtherCard_v05.zip New version 0.9a [28.06.2014]: 1. fix wrong type of variable in emit_p 2. fixes by Francis Van Den Bussche, email 9/5/2014 3. fixed obvious bug, redmine issue #539 4. update README info and links 5. Add documentation on class BufferFiller New version 0.9 [20.06.2014]: 1. added all fixes since my last release -> exactly between 01-03.05.2014 (https://github.com/jcw/ethercard/commits/master) 2. library (v09) from now should work on MSP430F5529 too, please test New version 0.8 [26.04.2014]: 1. Fixes issue #492 (DNS lookup fails) New version 0.7a [07.04.2014]: 1. changes inside dhcp.cpp - Custom DHCP option processing #119 New version 0.7 [05.04.2014]: 1. contains all github fixes since the last release. 2. working with oryginal spi library from Energia 0101E0012 New version 0.6 [27.04.2013]: 1. For clarity *.ino files I decided to move SPI initialize to library. from now begin look like this: ether.begin(sizeof Ethernet::buffer, mymac, CS_PIN, SPI_MODULE). eg.: - ether.begin(sizeof Ethernet::buffer, mymac) -> DEFAULT initialize eth on SPI 2 & Chip Select on PB_5 - ether.begin(sizeof Ethernet::buffer, mymac, PD_1, 3) -> initialize eth on SPI 3 & Chip Select on PD_1 SPI speed is defined in enc28j60.cpp file (line 256), maybe more sense is move SPI speed to begin too? New version 0.5 [20.04.2013]: 1. "DHCP fix" - Andy Lindsay github commit New version 0.4 [12.04.2013]: 1. "Implemented a simple UDP listening server, that listens for packets on ports and triggers callbacks" - brianlah87 github commit New version 0.3 [04.04.2013]: 1. "adding header arg to browseUrl" - jscrane github commit New version 0.2 [24.02.2013]: 1. "Accept of tcp packets refactored to a separate method" - mrbig github commit 2. New example for the above: "quasiMultiport" -> You can open more browser windows on different ports with different contents e.g. http://stella_ip, http://stella_ip:1224, http://stella_ip:22222, etc... 3. New function setupWakeUp() in enc28j60.cpp/h -> You can setup enc28j60 to filter/receive only WOL package for e.g. WakeUp host (StellarPad) from hibernation,(enc28j60 pdf - chapter 12.2.1 pt1-3), return to normal mode through existing function enableBroadcast() P.S. pt2 & 3 is my low quality ideas, so - don't report problem with them to jeelib still is some bugs e.g. DHCP with mac addr starting with first number > 0 not working for me :-/ Connections (If You are using default Energia SPI bus 2): CS - PB_5 (J1.02) - selectable in *.inoINT - PE_4 (J1.05)SCK - PB_4 (J1.07)SI - PB_6 (J2.07) - (or PD_0 - J3.03)SO - PB_7 (J2.06) - (or PD_1 - J3.04)RST - RESET (J2.05) My sandwich StellarPad + universal ENC28J60 module from e.g. eBay + LCD5110 with tongue (nrf24l01+): Sandwich get temperature from remote sensor (based on my second StellarPad and this project moved to Energia) via MiRF library, display temp on LCD5110 modified library (number & graph idea by timotet) and create a simply web page to display temp This is a very simply and fast making test platform xv4y, bluehash, hoangnguyen578 and 5 others 8 Quote Link to post Share on other sites
xpg 127 Posted February 8, 2013 Share Posted February 8, 2013 Just tried the EtherCard examples with my ENC28j60 breakout board and it works perfectly. Thanks for sharing this. reaper7 1 Quote Link to post Share on other sites
reaper7 67 Posted February 8, 2013 Author Share Posted February 8, 2013 Thanks for the feedback! Quote Link to post Share on other sites
soccou 1 Posted February 11, 2013 Share Posted February 11, 2013 @reaper7, this is really great! I just got it hooked up to a board i have and it is working. I have been using the Ethercard library for over a year and it is what I am most familiar with. I wanted to port it myself, but don't yet have the knowledge. Did you find any online resources or do you have any quick tips that would guide to porting arduino libraries to energia stellerpad? btw I set the MAC higher than zero in the first digit and it worked. That has been one of my complaints with the Ethercard library, inconsistent DHCP results across different DHCP devices. Quote Link to post Share on other sites
soccou 1 Posted February 11, 2013 Share Posted February 11, 2013 @xpg Just curious what your opinion is of the relative merits between lwip and the ethercard code? One of the things I had considered was whether the code you had working with lwip would function as a energia library? Quote Link to post Share on other sites
reaper7 67 Posted February 11, 2013 Author Share Posted February 11, 2013 @soccou - for me LwIP is a complete stack, EtherCard is a collection of some basic functions. My knowledge is low too but desire high so...first of all: PROGMEM, pgm_read_byte and other friends... I remove all PROGMEM and replace pgm_read_byte with * For others You must look out for "avr compat" in uncle goo second: SPI -> look inside my mods (mirf,ether and 5110 lcd by Rei Vilo), in Launchpad we have a good SPI.h lib for that. And last: arduino "word" - I replace it with uint16_t. ...and my new purchase for test (very compact but raster (module width) is not a multiple of 2.54) fast test complete...IT'S WORKING Quote Link to post Share on other sites
xpg 127 Posted February 11, 2013 Share Posted February 11, 2013 @soccou - for me LwIP is a complete stack, EtherCard is a collection of some basic functions. I agree with you, reaper7. The EtherCard TCP/IP-stack (which is based on the tuxgraphics.org stack) is a really elegant low-memory TCP "hack". lwIP and uIP, on the other hand, are real TCP/IP stacks. With regards to lwIP with Energia, that would really be interesting. Not quite sure if it can be done. It would be fun to try, though ;-) Quote Link to post Share on other sites
soccou 1 Posted February 11, 2013 Share Posted February 11, 2013 Hey guys, thanks for the quick responses. Good information. Quote Link to post Share on other sites
energia 485 Posted February 12, 2013 Share Posted February 12, 2013 Awesome! I had 3 of these breakout boards sitting on my desk waiting for me to have time to port the EtherCard to Stellaris. What would it take to get this working on MSP430? Quote Link to post Share on other sites
reaper7 67 Posted February 12, 2013 Author Share Posted February 12, 2013 @energia - sorry, I don't have a MSP430 but oh43 community is really big and I think that someone modify my mod for MSP Maybe you just need to tell them? ...so, keep your modules on desk, because using them on energia is really easy for simply applications Quote Link to post Share on other sites
xpg 127 Posted February 12, 2013 Share Posted February 12, 2013 I am very tempted to try and see if this can work on the MSP430G2553. I fear that it might be a bit short on RAM, though. Adding a bit of SPI ram probably helps a bit, but also makes the code slightly more complicated :-) Quote Link to post Share on other sites
reaper7 67 Posted February 24, 2013 Author Share Posted February 24, 2013 bump... New 0.2 version energia 1 Quote Link to post Share on other sites
reaper7 67 Posted April 4, 2013 Author Share Posted April 4, 2013 bump... New 0.3 version Quote Link to post Share on other sites
reaper7 67 Posted April 12, 2013 Author Share Posted April 12, 2013 bump... New 0.4 version bluehash 1 Quote Link to post Share on other sites
reaper7 67 Posted April 20, 2013 Author Share Posted April 20, 2013 bump... New 0.5 version bluehash 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.