Hi Lefty,
Thanks for the suggestion. I tried that and no, pin #11 stays low on startup, but in the code it is not initialized either.
But pin #13 is initialized in the code, so I tried that one next. And yes during boot-up that one also goes though some high cycles before normal operation is started.
Any idea?
Anyone else here with a scope who can test this?
Hi Coding Badly,
Thanks for the input I appreciate it!
I have tried pin 5, 6, 9 and 10 just now and it's the same problem for each pin.
Then I tried your code on each of these pins as well, and indeed it's the same situation. The output goes high for a short moment, then low and after a small pause it is up again and running.
Yes the moving pwm in the video is me adjusting the potmeter.
Found something else...
When you power the Arduino from a 9volt battery the problem is gone. It also seems like it boots multiple times faster that way. You plug in the power and a second later the thing is running, the short 'high' pwm problem is gone when run from battery.
So maybe the usb data connection initialization is causing the problem as well as the way slower boot time?
I wonder how to solve this usb situation...
Booting powered from 9v battery = 2 seconds. (no brief output going high problems during boot)
Booting from plugging in the usb cable = 7 seconds. (brief output going high problems during boot)
This is probably an Uno/Optiboot 'feature' - optiboot does less initialization, probably not reseting pins to input mode. Power-up reset does this but subsequent resets don't?
No that happens automatically as a result of the reset pin being hit. It is a hardware thing.
I'm not so sure, the Uno/Optiboot 'features' and the new 8u2 usb converter chip sure made for a rather rocky introduction to the latest board offerings from Arduino, with more bugs then any other new board offerings I can recall. And also requiring two IDE releases in very short order.
In hind site they would probably been better off just introducing the 8u2 feature and put off changing from their more proven bootloader code. That or they need a better beta process before rushing new boards to market.
My money 2 cents is that this symptom uncovered in this posting will be at least related to the new bootloader if not directly caused by it. No proof, just shooting from the hip.
Same result. Output still goes high for a short moment. Just to check I also tried it all on an other Arduino board and the problem is still there.
I have two new video's.
You see it with a led instead of the scope.
I plug in the cable and you see the process. It goes high for a little while, then nothing and after that high again and it's ready for use. I also later on press reset and you see it now does 'reboot' nicely without the 'going high' problem.
Hi,
Yes the board came ready to use so including the chip.
I'm not really sure where we got them, probably a local Dutch electronics store. My boss bought them (we have 2 boards)
Yes the same board as used in the scope video.
Yes pwm pin 10.
I have two boards and both behave the same.
I have no ICSP
Using the "Arduino Duemilanove or Nano w/ ATmega328" board option (ATmegaBOOT_168_atmega328.hex bootloader) I cannot reproduce the problem. Everything works as expected.
I have not been able to test with the "Arduino Uno" (optiboot_atmega328.hex bootloader)...
Would someone with an Uno (or someone who can get Optiboot working) mind trying to reproduce this problem. All that's needed are a few LEDs + resistors and one of the Sketches above.
Thanks for trying,
Odd that you don't see this issue, I tried two broads and the problem is the same.
That is, only when powered from usb cable, powered from battery solves the problem.
Looks like the usb communication interrupts the operation of the board when cable is just plugged in.
So if anyone wants to verify this problem, this is what you need:
470ohm resistor and a led.