Pages: [1] 2   Go Down
Author Topic: ATMEGA 644 won´t work with WIZNET5100 WIZ812MJ  (Read 3882 times)
0 Members and 1 Guest are viewing this topic.
Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I´m new here and have a little problem with my ethernet.

I use the Atmega 644 with the Duino Bootloader http://bit.ly/dK8zCf ,the core files from http://bit.ly/gr0xH9 and the Arduino IDE 022.

The 644 is on a breadboard wired with the WIZ812MJ and a Duemilanove to programm it.

The WIZ812MJ works with the Duemilanove 328P, i tested the Webserver example.

But it didn´t work with the Atmega 644, i read that there could be a Pin setting problem with slave select but i doesn´t really understand the code from the libaries and the core files to fix it myself.

Any ideas?

PS: sorry for my english smiley-wink
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6659
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you wiring the Wiz812 module to the ISP connector, or to the "shield compatible" pins on the Duino644 ?
The wiznet libraries use the hardware SPI module of the AVR, so you MUST connect the 812 to the pins that the hardware SPI module uses, which is NOT guaranteed to be present on the same shield pins across Arduino versions.  (For example, the Arduino MEGA does NOT work with the old wiznet-based ethernet shield for exactly this reason.  The new wiznet shield gets the SPI signals from the ISP connector instead to solve this problem.)
Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats a bit strange, because at least in the Atmega1280 the SPI pins are connected to the USART0 and not to the SPI pins.
Just grab the Atmega644 datasheet and se where the the hardware SPI pins are.
Logged

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answer but i don´t think this is the problem. The Atmega 644 use the same pins for ISP as for Ethernet SPI, it´s like the Atmega 328P on the Arduino board. Am I wrong ?

The Datasheet from the WIZ812MJ say I should connect to SS MISO MOSI SCLK and it does work with the 328P in this way, so the connection is probably right.

http://dl.dropbox.com/u/9937069/644.JPG

http://dl.dropbox.com/u/9937069/WISNET.JPG

I need the USART, so it would be a problem to use it for Ethernet.



Logged

Portugal
Offline Offline
God Member
*****
Karma: 6
Posts: 962
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, in what board is that Atmega644, what I said is that you need to use the SPI pins of the Atmega644, grab its datasheet and see where they are!
Logged

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I read the Datasheet before wireing the Atmega 644. The WIZ812MJ ist wired with the Hardware SPI Pins of the 644.

The 644 is on a Breadboard, wired with the Duemilanove to program it and is wired with the WIZ812MJ.



* 644.JPG (138.36 KB, 763x542 - viewed 34 times.)

* IMAG0456.jpg (1167.58 KB, 1552x2592 - viewed 52 times.)
Logged

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So nobody has a suggestion besides wrong wireing.

Than another question, does anybody have a working Ethernet with a Atmega 644 ?

In the best case a working Ethernet with the WIZnet 5100.

(Hardwireing the SS Pin to GND don´t work with a WIZnet Chip)
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6659
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So nobody has a suggestion besides wrong wireing.
Nope.  Sorry...

(studies photograph)
Um, are you trying to power the Wiznet from the 3.3V output of your duemilanove?  I don't think it's capable of providing enough current!  I don't see a spec in my module datasheet, but the W5100 chip itself says 138 to 183 mA, and the duemilanove 3.3V (provided by the FTDI chip) is only good for about 50mA....
Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey,

I have had my WIZ812MJ working fine with my 644P.
I have also had it working fine with my Arduino Duemilanove.

It was about 6 months ago I did it though. I am currently designing a new set of boards which will be using it, so I will be getting back to the software in the next month.
From memory, it uses the standard SPI hardware pins including the hardware Chip Select pin.

If you want to move away from this, I think you need to modify the SPI library as it is hardcoded in there based on the pins_arduino.h file.
To keep it intact, its probably easiest to duplicate the SPI library and rename it specifically for your Ethernet, and change the cpp file to use a differernt SS pin.

I am by no means an expert on this. I have had it going however, enough to test the Wiznet board with the Micro, and determine that 'yes, it works' and therefore I have used it in my design.

Are you using the Sanguino bootloader for the 644?
That is what I use and it works fine. If you are using someone elses, then you may need to check that they have the correct configuration for the SPI pins in their pins_arduino.h file.

Just an idea - hope that is of some help
Logged

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answers

@ westfw

It works fine with the 3.3V from the Duemilanove board thats no problem.

@ WanaGo

I have the option to use the 644P instead of the 644, or better said I ordered it already for testing. I used the Sanguino bootloader first so I can change back (I have the Atmel AVRISP MK2 to burn the bootloader).
Would it be possible for you to post your modifed files for the 644P or to send it by email ?
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6659
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It works fine with the 3.3V from the Duemilanove board thats no problem.
It *is* a problem.  It may have worked once, but it's WAY out of spec.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 525
Posts: 26570
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, maybe not WAY out of spec, but certainly somewhat out of spec:
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6659
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Way out of spec with respect to the current that the 3.3V pin on duemilanove is supposed to be able to provide (50mA) compared with the current that the Wiznet Module is supposed to use (130mA+)
Logged

Bavaria
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The WIZ812MJ did work with the Atmega 328P in the duemilanove borad on the 3.3V . But I see, I had more luck than brain, that my devices don´t die.

I have to confess that the power LED on the WIZ812MJ died while the tests.
This configuration with the duemilanove borad is my testing area. In the end I put the Atmega 644 and the WIZ812MJ device on a other board with a extra powerregulation (LM 317) for the WIZ812MJ.

But thanks for washing my head. I hope my duemilanove borad isn´t to angry about it smiley-wink

Logged

NZ
Offline Offline
Sr. Member
****
Karma: 0
Posts: 390
Turtle in a hard shell
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@ WanaGo

I have the option to use the 644P instead of the 644, or better said I ordered it already for testing. I used the Sanguino bootloader first so I can change back (I have the Atmel AVRISP MK2 to burn the bootloader).
Would it be possible for you to post your modifed files for the 644P or to send it by email ?

Hey sorry for the delay in reply.
I didnt create any modified files - I only tested it using the standard SPI library. As mentioned above, I have only done enough work with the software to prove that it works and can be used in the hardware design. I havent gone into detail of making software that I will actually use as a final product yet.

I too used the Wiznet with the Duemilanove 3.3V and it worked ok. No doubt out of spec like mentioned but it did work for the few minutes I needed it for. The 130mA or whatnot stated in the spec may be the case at full speed, but since the Arduino cant transmit over Ethernet at the full speed, maybe it doesnt end up using the full power requirement? Just guessing and I am probably totally wrong, but does sort of make sense to me that if the Wiznet isnt having to switch its output flat out then maybe it wont use the full power as per the spec. Either way, it worked for a few minutes for me.

Hopefully you can get yours working on the 644(P) etc.

Regards
WanaGo
Logged

Pages: [1] 2   Go Up
Jump to: