0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« on: March 27, 2007, 04:46:15 pm » |
Hi all,
I got an Arduino NG a couple of days ago.
When i try something like "digitalWrite(10, HIGH);" or "analogWrite(10,255);" after a "pinMode(10, OUTPUT);", a led plugged between 10 and GND does not light.
Touching directly the solder joints does not work either. However, when connecting directly to the atmega pins it works.
It seems there might be something buggy in my board.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #1 on: March 27, 2007, 06:14:08 pm » |
hi
You can't connect an LED directly to pin 10. You need a resistor with each LED (...it works without a resistor on pin 13 as there is a resistor built into the board for that pin only). Without a resistor, it is possible to burn out the Atmega outputs.
D
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #2 on: March 28, 2007, 07:39:30 am » |
Hi, Im connecting it with a resistor. For instance, i found out it was not working properly when i tried reading a pushbutton ( http://www.arduino.cc/es/Ejercicios/ReadAPushbutton). This same exercise works properly with pin 9 or 11, for example, but not with pin 10.
|
|
|
|
|
Logged
|
|
|
|
|
Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 7
Posts: 3532
|
 |
« Reply #3 on: March 28, 2007, 10:27:49 am » |
Yea, sounds like one of the traces in the board is broken. If it's a big problem, you can try to get it replaced.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #4 on: March 28, 2007, 05:16:03 pm » |
Hi,
Do you know if i can join the pin of the atmega with the socket directly by soldering a cable between them?
Thanks
|
|
|
|
|
Logged
|
|
|
|
|
Forum Administrator
Cambridge, MA
Offline
Faraday Member
Karma: 7
Posts: 3532
|
 |
« Reply #5 on: March 29, 2007, 04:54:19 am » |
You should be able to, yes.
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #6 on: March 30, 2007, 09:55:26 am » |
Hi,
I've been doing further tests, and i have noticed that the led does not blink even if connected directly from GND to the microcontroller leg. If i plug a led to GND and the first leg of the atmega (start couinting from bottom right: PB1), it blinks as if where plugged into digital IO 9. Same with every leg except the second one, that is, PB2 or pin 10.
I have tried this on two ATmega168 and one ATmega8 with same results.
May be there is something like a short in the board?
Thanks
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #7 on: March 30, 2007, 11:04:54 am » |
hi
you really do need a resistor on an LED connected to the Atmega... it might look like it works, but you will eventualy damage the port of the ATmega, as you seem to have done. D
|
|
|
|
« Last Edit: March 30, 2007, 11:05:08 am by Daniel »
|
Logged
|
|
|
|
|
0
Offline
Newbie
Karma: 0
Posts: 5
Arduino rocks
|
 |
« Reply #8 on: March 30, 2007, 04:25:27 pm » |
hi
you really do need a resistor on an LED connected to the Atmega... it might look like it works, but you will eventualy damage the port of the ATmega, as you seem to have done. D Hi, I use 220 Ohm. resistors on every led i plug on arduino, i even have spare leds with resistors soldered on them. I think its no matter of using resistors, is something that is not working properly on the board, a short or something like that. I have tried with 3 atmega's and pin 10 does not work on any, everything else is fine. Thanks
|
|
|
|
|
Logged
|
|
|
|
|
|
|
 |
« Reply #9 on: March 30, 2007, 04:31:21 pm » |
hey
I understand what you are saying.. what I meant is that <not> using resistors can damage your Atmega.
To test if it is the board or the chip, remove the chip, bend pin 10 up so that it isn't touching the socket, and repeat your tests...
D
|
|
|
|
« Last Edit: March 30, 2007, 04:48:20 pm by Daniel »
|
Logged
|
|
|
|
|
|