Page 2 of 2

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Sun Apr 05, 2015 3:59 pm
by Jerry Messina
Here's a package that adds support to the TCP/IP library for the 18FxxJ60 family of devices with internal ethernet.

The zip file contains the following:
  • Ethernet (dir)
    - adds new file eth97J60.bas
    - modified MAC.BAS file to add support for 18FxxJ60
    - copy of the remaining original Ethernet library files (unmodified)

    Copy the contents of these to your existing SF installation directory:
  • Swordfish\Includes (dir)
    - new updated devices files for the J60 family (required)
  • Swordfish\UserLibrary (dir)
    - modified USART.BAS to support all 8/16 bit SPBRG/SPBRGH register combinations
  • PIC_WEB_67J60.bas
    - config, osc, and hdw setup for Olimex PIC-WEB board (18F67J60)
  • basicJ60Test.bas
    - simple serial test program for the 67J60
  • EthernetTest.bas
    - version of the test sample code on the main Ethernet library wiki page
  • EthernetICMP.bas
    - version of the Ping sample code (no DNS) from EthernetICMP
  • EthernetTCPServer.bas
    - version of the TCP server sample code from EthernetTCPServer
I tested these on an Olimex PIC-WEB board running at 25MHz and 41.66MHz and it seems to work ok.

Give it a try and if it all works out I can add it to the wiki.

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Mon Apr 06, 2015 7:15 am
by Coccoliso
It's a shame that there is only SMD! :?
Is there something similar with old features DIP?

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Mon Apr 06, 2015 10:54 am
by Wobbles
Coccoliso wrote:It's a shame that there is only SMD! :?
Is there something similar with old features DIP?
I was lucky Santa brought me a dev board with this icon it then Microchip sent me a sample and I happen to have acquired a 64 pin ZIF (burn in socket they called it) . Just perfect for these.

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Mon Apr 06, 2015 10:57 am
by Wobbles

After an intellectual effort ..
I added the ping function to the W5500 library.
Cool going to try this on Friday.

:-)

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Wed Apr 08, 2015 8:48 am
by RangerBob
Nice one Jerry,

I'll download it and give it a buzz at some point this week on our PICDEM2 board, plus a couple of custom boards I have.

Regards,

Rangerbob

Re: PIC18F66J60 / 18F66J90 - Integral Ethernet

Posted: Wed Apr 08, 2015 8:59 am
by Jerry Messina
I probably should have mentioned that with the way I modified MAC.BAS if the device file has the ethernet flag set (#const _ethernet = $01) then it'll automatically pick the new eth97J60 internal driver... there's no way to change that w/out modifying the logic in MAC.bas.

I added an '#option ETH_MAC' to the file but the '_ethernet' flag overrides it. One way to change that would be to have the '_ethernet' flag set the #option. That way you could override it if desired.

Change MAC.BAS from:

Code: Select all

// default MAC selection if not internal
#option ETH_MAC = ENC28J60

#if (_ethernet = 1) or (ETH_MAC = ETHXXJ60)
// 18FxxJ60 with internal ethernet
to

Code: Select all

#if (_ethernet = 1)
// use internal ethernet
#option ETH_MAC = ETHXXJ60
#else
// default MAC selection if not internal
#option ETH_MAC = ENC28J60
#endif

#if (ETH_MAC = ETHXXJ60)
// 18FxxJ60 with internal ethernet
That way if you want to use the ENC28J60 over the internal one then just set '#option ETH_MAC = ENC28J60' before including the network files

note: I've updated the zip file to include this modification