ENC28J60

This forum is for posts that might be considered off-topic but that may be useful or interesting to members. Examples include posts about electronics or programming in general, other microcontrollers or interesting devices, useful websites, etc.
Post Reply
DH*

ENC28J60

Post by DH* »

In this month's Circuit Cellar, Fred Eady (EDTP) has converted his Realtek RTL8019AS C code for use with the ENC28J60.
DH*

Post by DH* »

There is C code for interfacing with a Mega88 here.
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

ENC28J60

Post by zbasicandy »

Just a sampling of ENC28J60 protoboards that can be obtained from the following suppliers.
Note: This list is not complete!
Feel free to add to it.

www.sparkfun.com / www.olimex.com (Foreign)
Ethernet Interface Board - ENC28J60
SKU#: NET-ENC28J60 Price: $34.95

http://www.mikroe.com/en/tools/serialeth/
$29.00 (foreign co - check for local supplier) <-- not released yet???

http://www.edtp.com/
Frame Thrower II $37.00

http://www.jelu.se/shop/index.php
ENC28J60 Ethernet Module (TenPin)
Cost ????

Please Note:
Microchip made a TCP/IP stack "FREE" that can only be used on the ENC28J60 and their PIC(s) - talk about Free!

My next door neighbor and I are in the process of "trashing" all of our unreliable PLC X-10 junk, expensive PLC UPB / Insteon modules and using a ZBasic microcontroller to talk Ethernet in our home automation systems. We looked at the expensive on board Ethernet Rabbit solutions and Lantronics Xports and we felt that using the ENC28J60 is a very inexpensive design solution. Our scheme is to use Homeplug 1.0 (See below) Ethernet bridge modules to communicate via "Local power wiring". This would greatly reduce the cost of rewiring our homes for Ethernet. Using RF, in home automation, is so unreliable due to interference from wireless routers, phones and consumer electronics that this option was considered and then later dropped. Our design will use the UPD Internet Protocol (User Datagram Protocol or Unreliable Delivery Protocol) because of its relative ease of use and implementation. Using TCP/IP requires a lot of "tight timing" and overhead and we chose not to use this protocol.


Note: On HomePlug
Imagine entering your house, you unpack and plug in your newly purchased flat-panel TV. Simply and quickly - the TV automatically connects to the cable box, the DVD player, the Digital Video Recorder, the Home Theatre system, and also to the Internet.The wave of the future is HomePlug 100MHZ A/V (Audio Visual), HomePlug HPCC Command/Control and Homeplug BPL Broadband over Powerline. Check out www.Homeplug.org
DH*

Post by DH* »

Good luck with HomePlug. I've yet to see a positive realworld, hands-on review. Most of the reviews I have seen say the throughput falls far short of the advertised rate.

Several major players split from HomePlug and there are now two other competing and incompatible standards.
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

x-10

Post by zbasicandy »

Our day is totally ruined! Both of us thought you OD on the local cuisine of Skyline Chili in "The Queen City" of Cincinnati, Ohio and you were never heard from since on this forum.

HomePlug will still be more reliable than anything X-10, UPB & Insteon can deliver. HomePlug A/V will deliver 100Mhz on a bad day and 200MHz normally. Since HPCC,HPBL, HPAV & HP 1.0 can coexist, then this is the wave of the future! Deep six X-10 for good.

-------------------------------------------------------------------
Correction above UPD should be UDP

:) :) :)
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

ENC28J60

Post by zbasicandy »

Z-wave is RF and not powerline. If you add the cost up per "node" of Z-Wave you are paying thru the nose. Having an Ethernet connection via powerline and having the ENC28J60 Ethernet module connected to a ZBasic microcontroller is the best, cost effective, most reliable, secure home automation network you can build.
:) :) :)




-------------------------------------------------------------------------
Are you by any chance D Houston's next door neighbor?

:) :) :)
DH*

Post by DH* »

Z-Wave has some serious (and in my opinion fatal) flaws. It takes too long for messages to traverse the network so ACKs are tardy. The low max number of hops restricts it to a rather small physical network. Devices programmed with one controller don't play well with other controllers. A missing or defective node screws up the network. Unlinking a defective node means starting over with a blank slate and re-installing all of the good nodes. I think it was born braindead.
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

ENC28J60 Ethernet controller

Post by zbasicandy »

For those users hoping to use the ENC28J60 Ethernet controller by Microchip with a ZBasic microcontroller there is bad news.

ENC28J60 Rev. B4 Silicon Errata (from their web site)
1. Module: MAC Interface
When the SPI clock from the host microcontroller is run at frequencies of less than 8 MHz, reading or writing to the MAC registers may be unreliable.
Work around
Run SPI at frequencies of at least 8 MHz, or use the same clock source for both ENC28J60 and the host controller for synchronization.
One solution is to run a TTL clock source to both ZX/ENC28J60 chips.
Another solution is to use the SPI bus instead of the pin selectable shiftin/shiftout commands. This will still only yield 7.3728 Mhz @ double speed but this bus solution might interfere with the program read fetch cycle?

What are your thoughts Don K?

Also, the Frame Thrower and Olimex/Spark Fun boards have no 5 VDC to 3.3VDC power regulator on board and no interface level translators on board! The only other solution is the board from http://www.mikroe.com/en/tools/serialeth/ ... it has both but this board is not officially released as of yet. This board also has many software examples to form as a base for programming the ZBasic microcontrollers.
DH*

Re: ENC28J60 Ethernet controller

Post by DH* »

zbasicandy wrote:This board also has many software examples to form as a base for programming the ZBasic microcontrollers.
I think you will find that those examples merely call functions in their ENC28J60 library file which, in turn, is written in PIC assembly language for linking with their mikroC, mikroPascal or mikroBasic compliers. Unless one is adept at PIC ASM, the Basic code will not help much - you'll still have to do all the heavy lifting in ZBasic. Anyone adept at PIC ASM will probably not use either ZBasic or mikroBasic. They've had a library file for RealTek RTL8019AS for some time. You can find examples for it in their manuals. I would expect the ENC28J60 examples will be similar.

BTW, in the lower right corner of the Swedish page you cited, you can select the currency. Their ENC28J60 board is $33+. Its does not show a 3.3V regulator nor level shifters either.

Now, if only some C wizard would look at the C code I referenced and convert it to ZBasic...
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

ENC28J60

Post by zbasicandy »

Now, if only some C wizard would look at the C code I referenced and convert it to ZBasic...
My neighbor's son was able to complete this job in one day.
Converting from C to ZBasic is extremely easy if you know ZBasic and have a C reference guide.

Some (not all) of the ZBasic/ENC28J60 design/application issues:
1. Errors on SPI below 8MHz. (see above)
2. ZBasic Sram buffer/variable sizes. (ZBasic ZX-xx resource limitations)
3. Packet sizes. (64 min to 1518 max)
4. SPI buss fetch/read issues.

:) :) :)
zbasicandy
Posts: 193
Joined: 25 January 2006, 19:56 PM

ENC28J60

Post by zbasicandy »

Since the ENC28J60 doesn't support auto-negotiation, the full-duplex mode is not compatible with most switches/routers.
This means you a stuck in half duplex mode.
The ENC28J60 is VERY power hungry consuming 200mA in a circuit where a Realtek consumes 10mA.
Better check your overall power requirements.

:) :) :)
Plutohn
Posts: 1
Joined: 14 January 2007, 9:54 AM
Location: INDIA
Contact:

8Mhz ??

Post by Plutohn »

Hi all,

The tuxgraphics link where Mr. Socher gets his board running with a mega88 definitely means that ENCs can talk at SPI at or below even 5Mhz (Since mega88 cannot be clocked above 20Mhz) ... The 8Mhz is necessary only with devices for which version B4 of errata was written not for devices before that, nor after ... so I really dont think the 8Mhz SPI Clk requirement is much of an issue.
Post Reply