Go Down

Topic: ISP woes (Read 670 times) previous topic - next topic

llhetlet

I have successfully put together my ISP shield http://www.ladyada.net/library/arduino/arduinoisp.html.  I mounted this on my Duemilanove and loaded my code onto my ATmega328p via the Arduino IDE 1.0. 

Everything appears to work just fine, as I don't receive back any error codes.  However, when I place the chip on my breadboard setup according to this instructable http://www.instructables.com/id/Standalone-Arduino-ATMega-chip-on-breadboard/, nothing happens.

I have simple code, that I've tried with my UNO, and it works as expected, but not the 328.  I even tried another 328, but no change.

Any ideas as to what I'm missing???  It seems to be too simple, yet it doesn't work.   :~

Just in case, here's my code:
Code: [Select]
int led = 9;
int myTimer;

void setup(){

  pinMode(led, OUTPUT);
  digitalWrite(led, LOW);

}

void loop(){

    for(int i=35; i > 0; i--){
      myTimer = i * 20;

        digitalWrite(led, HIGH);
      delay(myTimer);

        digitalWrite(led, LOW);
      delay(myTimer);

     }
}

smeezekitty

I am willing to bet you may be putting the LED on the wrong chip pin.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

JimG

#2
Jan 29, 2012, 04:02 am Last Edit: Jan 29, 2012, 04:11 am by JimG Reason: 1
I also wonder about your power supply?  The Instructable suggests (under Option/Alternative #1) that any switching regulated supply from 5V to 16V is OK to use without a 5V regulator.  Yikes!

It would be a good idea to put a resistor and LED on D13 (chip pin 19).  The bootloader will flash this 3 times at startup whether or not a sketch is loaded.  Provides a nice visual confirmation that the bootloader is present and working.

I'm also going to put in a plug for what I think is a particularly good ISP shield (I have no affiliation):
http://evilmadscience.com/productsmenu/tinykitlist/253

The LED's can tell you a lot about what is, or isn't, happening.

Jim
TC4 Open Source Digital Thermometer and Temperature Controller
http://code.google.com/p/tc4-shield

llhetlet


I am willing to bet you may be putting the LED on the wrong chip pin.



I checked that about 27 times.  And then another 2 more after reading your post.

I was hoping it was that simple, but not this time.

llhetlet


I also wonder about your power supply?  The Instructable suggests (under Option/Alternative #1) that any switching regulated supply from 5V to 16V is OK to use without a 5V regulator.  Yikes!

It would be a good idea to put a resistor and LED on D13 (chip pin 19).  The bootloader will flash this 3 times at startup whether or not a sketch is loaded.  Provides a nice visual confirmation that the bootloader is present and working.

I'm also going to put in a plug for what I think is a particularly good ISP shield (I have no affiliation):
http://evilmadscience.com/productsmenu/tinykitlist/253

The LED's can tell you a lot about what is, or isn't, happening.

Jim



Okay, I do have the 5V regulator.  I checked with my volt-meter, and I do have 4.98V feeding the circuit.

I used your idea with the LED on D13.  It blinks, but doesn't stop after 3 blinks. 

The ISP shield you mention looks really nice (and wish I'd seen that earlier), however, I would really like to get working what I've got.  From everything I see on the web, there's no reason for it not to work.


Coding Badly


Did you install a bootloader on the 328?  How?  Using the IDE?

smeezekitty

Remember that digital pin 9 is probably not the same was physical pin 9.
Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Go Up