SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« on: March 05, 2012, 01:02:33 pm » |
I got this http://www.ebay.com/itm/Kit-Arduino-UNO-Compatbile-Board-Mega328-W5100-Etherne-Shield-PoE-10736-/170793326725?pt=LH_DefaultDomain_0&hash=item27c4135885so far I tested the uno and ethernet part to work fine. I need to get an sd card to test the sd. the listing clearly mentions in order to upload sketch, the ethernet shield must be disconnected, which is the case for the one I got. question is, is this the same for the genuine ethernet shield as well? if not, anyone know why this is the case with this shield and is there any work around? the shield is sold as a version 6 shield. It would be nice to be able to upload without having to disconnect the ethernet shield first, but for the price, I am willing to put up with a little hassle right now. thanks jerry
|
|
|
|
« Last Edit: May 04, 2012, 09:17:31 pm by doughboy »
|
Logged
|
|
|
|
|
Seattle, WA USA
Offline
Brattain Member
Karma: 311
Posts: 35470
Seattle, WA USA
|
 |
« Reply #1 on: March 05, 2012, 01:13:14 pm » |
I have two official shields. I don't need to remove them to upload new code. I can't imagine why you have to, either.
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #2 on: March 05, 2012, 01:37:46 pm » |
when the non official eth shield is connected, com3 disappears from the port list in the IDE. I checked the shield has no connection to pins 0 and 1 (the serial pins) to the main board, so I am puzzled why it would affect the usb interface to make the com port disappear. The usb is using the serial pins 0 and 1 to communicate with the cpu right?
on the other hand, it might be the uno board that has the problem. I noticed while I was testing the x10 library, from time to time com3 disappears also, and would actually make my pc shutdown.
|
|
|
|
|
Logged
|
|
|
|
|
Miramar Beach, Florida
Offline
Faraday Member
Karma: 50
Posts: 3448
|
 |
« Reply #3 on: March 05, 2012, 02:07:40 pm » |
According to one person on the forum, that does not happen. That is a bogus ad, according to him. http://arduino.cc/forum/index.php/topic,85571.0.htmlWhat do you think, doughboy? Can you upload a sketch to the arduino with the shield connected or not?
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #4 on: March 05, 2012, 04:22:13 pm » |
SurferTim,
I am able to upload fine to UNO if ethernet shield is not connected.
I think the other thread you referenced is for a different problem. My sketch is about 3000 bytes only, way below 30k.
another thing I am thinking of trying is to connect a 12v power so uno+eth shield is taking power from the power jack instead of the usb to see if that makes a difference.
I have not seen any problem at runtime so far (well other than Serial.xxx won't work), just annoying to have to disconnect the shield to upload a sketch.
jerry
|
|
|
|
|
Logged
|
|
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #6 on: March 06, 2012, 01:41:36 am » |
zoomkat
thanks man, I just tried it and it works!! as soon as I see uploading... I press reset and program uploads!
I just finished debugging a program and posted in another thread about serving files from SD card. I must have attached/detached the ethernet shield at least 100 times since this afternoon. I was actually getting to be an expert doing it. lol.
with this trick, it truly makes this uno+ethernet shield package a great deal!
Jerry
|
|
|
|
|
Logged
|
|
|
|
|
Miramar Beach, Florida
Offline
Faraday Member
Karma: 50
Posts: 3448
|
 |
« Reply #7 on: March 06, 2012, 07:00:35 am » |
So that ethernet shield does affect the ability to upload code. Despite James_C4S repeating himself, he was still wrong both times. Good to hear there is a fix. Sounds like the shield interferes with the auto reset function of the usb/serial port. Thanks for that link, zoomkat! 
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #8 on: March 06, 2012, 12:53:42 pm » |
speaking of auto reset, this is the description
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.
So it makes sense to manually press the reset button when uploading starts.
perhaps the reset circuit on the ethernet shield is interfering with the capacitor on the UNO board causing auto reset to not work.
if the dtr can be controlled from the avrdude, I wonder if that can be made to stay low a little longer.
|
|
|
|
« Last Edit: March 06, 2012, 01:16:45 pm by doughboy »
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #9 on: March 06, 2012, 01:49:29 pm » |
I found these in avrdude.conf file for ATmega328P
resetdelayms = 1; resetdelayus = 0; resetdelay = 15;
I have no clue if this is related to controlling the dtr to auto reset (can't find much documentation on avrdudue). I'll try tweaking it to see if it makes any difference.
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #10 on: March 06, 2012, 03:58:12 pm » |
I just found out from UNO page one of the changes to Revision 3 is
Revision 3 of the board has the following new features:
Stronger RESET circuit.
The reset pin spec only says line should go down < 1.4v typical for 25us (or some really short time). So perhaps with the (clone) ehternet shield attached, it is unable to bring the voltage down low enough, hence the need for "Stronger RESET circuit" in Rev 3.
(I just checked rev2 and rev3 circuit for reset and they are identical, except rev3 is using the 16u2 chip).
|
|
|
|
« Last Edit: March 06, 2012, 04:07:58 pm by doughboy »
|
Logged
|
|
|
|
|
Miramar Beach, Florida
Offline
Faraday Member
Karma: 50
Posts: 3448
|
 |
« Reply #11 on: March 06, 2012, 05:10:35 pm » |
They (or anyone else) could increase the "strength" of the reset circuit by increasing the value of C5 on the schematic without modifying the circuit board.
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #12 on: March 06, 2012, 05:15:55 pm » |
Looking at the ethernet shield schematic, the reset circuit there is pretty much identical to the one on the UNO board. Since the reset line is tied together, the 10k pullup resistor essentially becomes 5k and the 100nF capacitor essentially is doubled. So perhaps the DTR line from the 8u2 is unable to discharge the capacitor low enough since it is now doubled with the ethernet shield attached. Perhaps removing the 10kresistor and 100nF capacitor on the ethernet shield would fix this.
|
|
|
|
« Last Edit: March 06, 2012, 05:18:01 pm by doughboy »
|
Logged
|
|
|
|
|
SF Bay area
Offline
Full Member
Karma: 0
Posts: 156
|
 |
« Reply #13 on: March 06, 2012, 07:31:35 pm » |
I checked a few other shields, and none of them have the resistor/capacitor connected to the reset line, just a switch to ground. The ethernet shield reset is also connected to a chip (circled at right) that is not present with other shields. So I don't think removing the resistor/capacitor would be a good idea. with the additional resistor and capacitor, now when the DTR line goes down to reset, more current will come down from the pull up resistor, and capacitor will take at least twice as long to discharge. So it probably is not able to bring the voltage down to < 1.4v. I tried changing the values in avrdude.conf, that didn't help. 
|
|
|
|
|
Logged
|
|
|
|
|
0
Online
Tesla Member
Karma: 50
Posts: 6534
Arduino rocks
|
 |
« Reply #14 on: March 06, 2012, 08:25:51 pm » |
A read of the below info will explain some of what is going on. Apparently the arduino has to be powered up a fraction of a second before the wiznet shield is powered up. The resistor/capactor combo delays the wiznet just enough for the arduino to come up first. This appears to be built into the PoE shields due to both the shield and arduino being supplied from the same power source. This eliminates the need for the manual reset on powerup which would be a bummer in a situation where PoE is used. The issue can be duplicated with an arduino with a non PoE shield installed. Install a simple web server code on the combo and verify it works using a browser. Then unplug/replug the USB connector to the pc to power cycle the arduino/shield. Once the arduino boots up, try to connect to the arduino with the browser. The attempt will fail. Next push the arduino reset button and and let the arduino boot up. Now try the the browser connection again and it should work. http://marco.guardigli.it/2010/11/arduino-wiznet-ethernet-shield-proper.htmlhttp://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1281785804/0
|
|
|
|
|
Logged
|
|
|
|
|
|