PICcoder.co.uk Forum  


::post new topic::
<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >>
Re:Building an ENC28J60 Ethernet Dev Board
Date: 2006/03/14 12:56 By: asmallri Status: User  
Karma: 2  
Posts: 5
graphgraph
More suggested modifications to the Ethernet Development Board Rev1.1

  1. Connect the interrupt lines between the SNC and the PIC. INT of ENC to INT0 on the PIC and WOL on the ENC to INT1 on the PIC


  2. Add additional status LEDs (suggest two more connected to the PIC) With a total three LEDs this gives 1 LED for Status (toggles every stack tick), another LED that is set whenever a packet is read from the ENC (and therefore got through the filters) and another that gets pulsed whenever a packet is transmitted. RB6 and RB7 are good candidates for this as it does not impact the ISCP capability of the PIC.


  3. Change the Crystal to 10MHz and implement the HSPLL, This will enable the SPI to run at 10MHz for optimal throughput. Also the current clock means the SPI bus is 6MHz which is a problem with the current silicon bug in the ENC28J60 as per errata B1 and B4.


  4. Add a RS232 port to the PIC - simplifies development debugging.


  5. Add a FM25256 FRAM (RAM version of an EEPROM) this enables the applications to deal with significantly more open file handles.


Post edited by: ian, at: 2006/03/14 13:00
reply | quote

Re:Building an ENC28J60 Ethernet Dev Board
Date: 2006/03/14 14:01 By: Ian Status: Moderator  
Karma: 5  
Posts: 85
graphgraph
Thanks for you comments, very useful.

Basically I tried to keep the article as simple as possible, my board has an RS232.

I am thinking of putting in a second article with some of these sort of updates.


  1. These lines aren't used in the current microchip stack but I can included them for completness


  2. Leds are a nice idea, I don't think the code for them is included in the stack as standard? If I get the time I might write them


  3. From looking at the data sheet for the PIC18LF4620 as far as I can tell at 3.3volts the pic will only run upto 25Mhz. So using the HSPLL isn't an option with this circuit. I will try running the PIC and the ENC from the same clock source.


  4. Straight forward, will add to the next version I publish


  5. How easy is this to do?




Ian
reply | quote

Re:HEX FILE
Date: 2006/03/14 15:08 By: xx Status: Visitor  
 
Sorry, it was a typo, the files which are to be changed are
the ones you mentioned, namely compile.h and
end28j60.c.

If you object then I am am sorry you feel that way,
hopefully we will sort the software issue together, and
then I will not say any more that it does not work.

xx
reply | quote

Re:HEX FILE
Date: 2006/03/14 15:56 By: Ian Status: Moderator  
Karma: 5  
Posts: 85
graphgraph
At the end of the day there are many reasons why the .hex file might not be identical. I get different versions from different compiliers (slightly differnet version numbers) on different PCs.

It doesn't matter if you hex is slightly different. It will probably still perform just fine on the hardware.

Not getting the exact same binary as me doesn't mean the project doesn't work.

Until you have actually got some hardware to run it on I don't really see the point of compiling it.
reply | quote

Re:HEX FILE
Date: 2006/03/14 16:43 By: xx Status: Visitor  
 
Ian,

As I said, I have the pic, and you have said that one of the
simplest tests I can make is with one pic, one xtal, and one
led, and this is what I am doing. Unfortunately I do not have
a 24mhz osc, so I am using a 20mhz xtal, and optionally
internal osc 1,8,32mhz - all have been used, and the led
is still not blinking. I am now going to disasemle the
non matching lines as you are refusing to answer the
question of whether YOU are sure that your hex is an exact
one, simply because you are lazy to check it.
reply | quote

Re:HEX FILE
Date: 2006/03/14 16:55 By: Ian Status: Moderator  
Karma: 5  
Posts: 85
graphgraph
xx,

I'm sorry if I have led you into thinking that the hex will run without the ENC hooked up. I'm not sure it will.

My Post suggests that using this simple setup you write a simple C program to test that the PIC and occilator and LED are running.

The hex is an exact one. Far from being lazy I download the code from the link in the article into a fresh folder and then followed the 4 website software instructions. It is exact in that I followed my article exactly.

Hope that helps.

Post edited by: mat, at: 2006/03/14 17:22
reply | quote

Re:HEX FILE
Date: 2006/03/14 17:20 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Hi,
Firstly welcome to the site, Sorry you are having little success with setting up the Ethernet Controller, however please bear in mind that this site is run in people's spare time.

What I would recommend you try and do, is yourself write a simple program which will just turn the LED on and off, to test that your hardware is functioning correctly. If this works then you might want to check the configuration setting associated with your project.

I too have a different hex to ian, however it runs fine (and so does his uploaded one!), i really wouldnt worry too much about 10 lines difference.It is most likely a version difference in the compiler or mpasm, which version of the compiler and MPLab are you using?

Mat
reply | quote

Re:HEX FILE
Date: 2006/03/14 17:22 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Oh and sorry about moving the discussion on you yesterday, thought it would be a better setup this way. Mat

Post edited by: mat, at: 2006/03/14 17:23
reply | quote

Re:HEX FILE
Date: 2006/03/14 19:32 By: xx Status: Visitor  
 
Thank you

My versions are as follows

mplab 7.30
C18 3.02 Demo procedure abstructure disabled by choice for compatibility with Ian compiler.
Stack 3.02

I have a question:
Since D0 should be flashing, how is it possible
that nowhere in the whole program there is any
reference to TRISD, so in effect TRISD is left
as inputs, so how would D0 flash?
reply | quote

Re:HEX FILE
Date: 2006/03/14 19:36 By: Ian Status: Moderator  
Karma: 5  
Posts: 85
graphgraph
MainDemo.c Line 1079

// Turn off the LED's.
TRISD = 0x00;
LATD = 0x00;


MainDemo.c Line 23

LATD0 ^= 1;
reply | quote

Re:HEX FILE
Date: 2006/03/15 00:20 By: xx Status: Visitor  
 
Ian,
You were right, it will not work when unconnected, I don't
know why but removing InitStack and StackTask will fix
the problem. Now that the led is flashing, did you manage
to get the rs232 working? I connected it to my pc, but no
message appear on the screen. My HyperTerminal was set
to 19200 8-n-1.
Thanks
reply | quote

<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >>
::post new topic::