1
\$\begingroup\$

I would like to make a web server from an AVR uC. I use Atmega168 with the ENC28J60 ethernet module. I have connected the module with my Atmega using SPI. I have a problem, because the communication does not work. The green LED on the ENC module is solid green, and the yellow is flashing when I try to ping the device... Unfortunately I get the "Destination host unreachable message"

I am using the diagram and software provided in the tutorial from tuxgraphics.com http://tuxgraphics.org/electronics/200606/article06061.shtml

I tried to connect everything as it is here. I didn't connect the IO port. Just the LED to the Atmegas' PB1 (pin15);

The difference is, that I use the 5V to 3.3V converter to supply ENC28J60 with power. The input pins are 5V tolerant so I didn't use the 3.3V for the input pins. I supply to board with the 5V from the usbasp programmer. I've noticed that sometimes the green LED flashes, but then I remove the power and connect it again it is solid green.

Do I need to change the Atmega from the 1MHZ? I tried to use the external crystal oscillator from ENC module. I have set the low fuse to 0x60 (that info was in ReadMe file from Tuxgraphics)but I dont know if it worked... When i use AVRdude I get the following output:

avrdude -p m168 -c usbasp -v -q
Output:

    avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : lpt1
         Using Programmer              : usbasp
         AVR Part                      : ATMEGA168
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no        512    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     16384  128    128  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x1e9406
avrdude: safemode: lfuse reads as 60
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 1

avrdude: safemode: lfuse reads as 60
avrdude: safemode: hfuse reads as DF
avrdude: safemode: efuse reads as 1
avrdude: safemode: Fuses OK

avrdude done.  Thank you.

I am concerned about the: "avrdude: auto set sck period (because given equals null)"

Here are the photos of my circuit:

Circuit

And one more thing about the connection - I have an unamanaged switch. I use straight cables. So the topology is: Laptop > Switch > ENC28J60. When I run Wireshark I do not see any traffic coming from 192.16.0.2 (address of my ENC) My computer is 192.168.0.100;

Regards!

\$\endgroup\$

1 Answer 1

-1
\$\begingroup\$

Actually circuit worked for a while. I think that everything is OK but there's some instability....

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.