Hot answers tagged

116

It probably isn't bricked I've got quite a few Arduinos, and over the last few years have only ever "bricked" one, and I think that was by zapping it with static electricity. Unfortunately that particular one had a SMD (surface mounted) processor chip, so it isn't easy to try swapping it with another chip. Stay calm, and try the following steps ... ...


14

At least - as I assume you upload your sketch via avrdude - please give more information about the upload failure (e.g. output of sketch uploader) so people here can help you better. Additionally to the great answer of Nick Gammon, please search for exclamation marks in your sketch. If your sketch contains a string with more than or equal to 3 exclamation ...


13

It's for the other MCU on the board. The main MCU on the Uno is labelled "ZIC1". This is the one that is programmed when you press "Upload" in the IDE. But unlike other Arduinos that use a FTDI chip to connect to the serial port on the main MCU, the Uno uses another MCU instead, labelled "U3" on the left. This MCU runs a small bit of code that acts as a ...


12

There's a thread about that on the Arduino Forum - someone had a similar question. I found a schematic (below) which is not for that board, however the header pins are labelled the same as you found, so it is plausibly similar. It appears that header is used for "Synchronous Bit Bang mode" as documented here: Bit Bang Modes For The FT232R and FT245R (...


9

In-system programmer is activated with RESET line. During normal operation reset line is not active and ISP module is disabled. You can find detailed description of AVR ISP in this document: http://www.atmel.com/images/doc0943.pdf


6

They're for programming, as well as carrying the non-select signals for SPI. The right one is for programming the main MCU, the left for the USB communication MCU. You should almost never need to use them unless you need to write a bootloader to a new chip or change the fuse or lock settings on them.


5

I recommend going out and buying an AVR Dragon - costs aroud $US50. That gives you ISCP programming plus debugwire debugging (using the Atmel Studio IDE).


5

First of all, as configured, the RESET pin can not be used as an output pin. In order to use it as an I/O pin, you would have to program the RSTDISBL fuse. But once you do that, as jippie said, it becomes near-impossible to reprogram your Arduino (if you have the socketed through hole variety of the MCU, you could pull it out and put it into a high voltage ...


5

The ICSP is used for 'bare metal' programming. This what you'd use if you wanted to replace or remove the bootloader, change the clock oscillator settings, or program the device as a bare 328. The USB port is for communicating with a program running on the Arduino. When it's first booted, the bootloader program checks to see if there's any activity on the ...


4

Assuming you have reprogrammed the Arduino Nano's Atmel processor (an ATmega328) directly using the processor's ICSP pins, you may have erased the Arduino boot loader from the processor. In such a case you no longer have an Arduino. Rather you have an ATmega328 processor surrounded by some hardware. To recover you need to reprogram the ATmega328 processor ...


3

From packages/arduino/hardware/avr/1.6.*/variants/leonardo/pins_arduino.h: // Map SPI port to 'new' pins D14..D17 #define PIN_SPI_SS (17) #define PIN_SPI_MOSI (16) #define PIN_SPI_MISO (14) #define PIN_SPI_SCK (15) static const uint8_t SS = PIN_SPI_SS; static const uint8_t MOSI = PIN_SPI_MOSI; static const uint8_t MISO = PIN_SPI_MISO; static const ...


3

Yes. When you program using ISP you overwrite everything in the chips flash, even the bootloader. This has some pro's and con's: Pro: The program starts immediately, meaning it doesn't wait to check if there's any programming coming in before starting your sketch. Con: You need to use ISP to program your Arduino again or to upload the bootloader again. ...


3

It is extremely confusing to have a variable val and then use _val in your function but then: shiftOut(dataPin,clockPin,LSBFIRST,val); As James pointed out, you are not sending the value passed to the function, to the shift register. Also this is just going to give you a boolean: updateRegister(!i); Why take "not i" there? I suggest you use SPI and ...


3

Because it is not needed. The chip comes with the bootloader pre programmed in ROM, not in Flash. It cannot be replaced, upgraded, removed, etc like other more sensible chips. So there is no real need for ICSP since the main use for that is putting the bootloader on. Unknown. Unlike the AVR chips, whose bootloader always runs first for about 2 seconds, the ...


3

To answer my own question, just to report that I found something close to what I was looking for, which I link and describe briefly below. Gammon Software Solutions forum - Atmega Bootloader Programmer - Programming Cable On that page, the author suggest that we cut pin 5 from the 6-pin ICSP programming cable, solder a pin to it, and wire it to pin D10. ...


3

Yes you can program the Arduino's reset input pin as an output and use that to program another AVR, but you can no longer program your Arduino as that relies on the controller being reset through its own reset pin. Coming to think about it, I am not sure how the other devices (like the USB controller) responds to being reset by Arduino's controller itself. ...


2

ICSP is used for PICs, not AVRs. Use ISP, which can be performed either by an Arduino via ArduinoISP or by a dedicated programmer.


2

You can use every single last byte of flash on the device. Since you're performing low-level programming of the device you get the entire chip to play on, without having to worry about bootloaders and such. You can debug (breakpoint, single-step, watch, disassemble, etc.) the code on the chip using software on your computer. Admittedly the devices you'd ...


2

I have bricked 2x ATMega328P on my Arduino Uno board due to static (I think). The static seems to have killed the TX pin and hence the program can't be downloaded using the USB cable. The easiest solution is to replace the microcontroller. You can buy a new ATMega328P DIP programmed with the Arduino bootloader (such as this one from Adafruit) and you are ...


2

The difference between ISP and ICSP is a hyphen. ISP stands for In-circuit Serial Programming, and ICSP stands for In Circuit Serial Programming. Any arrangement that allows you to program a microcontroller while it is in a circuit using a serial protocol can be called ISP or ICSP.


1

I suggest you to try and read the Arduino page about ArduinoISP. Particularly, you will notice that pins 11, 12, 13 and Vcc and GND are all common, BUT the reset pin is not common to both boards. So I suggest you to detach the pin 5 of ICSP from the ArduinoISP board and connect it to its pin 10. Or, if you prefer, connect ISP - Target +5V - +5V GND - GND ...


1

I have a page about a minimal board. The minimal circuit is the chip itself, and a couple of decoupling capacitors. A pull-up on /RESET is advisable (however the processor has a weak pull-up on it). The six wires you mention are required for ICSP programming. An example from my page is: That is using an Arduino as an ICSP programmer. I think most ...


1

There's a hardware conflict between these two boards which seems to not be resolvable. The solution was to buy the Keyes USB shield, make sure only it has access to pins 9 and 10 from the Arduino and then wire pin 7 (or 8) into pin 9 of the CAN shield, while also properly initializing the CAN shield with that new pin. Lastly, the Keyes USB shield's ICSP ...


1

const int clockPin = 17; I'm pretty sure that should be 13, not 17.


1

Do you need to add the _ to the shiftOut(dataPin,clockPin,LSBFIRST,val); ?


1

Take a look at my circuit for a minimal "Arduino": The top image in the question uses the ICSP header, which you can see from the schematic "mirrors" pins on the processor. That is: SCK is D13 MISO is D12 MOSI is D11 Reset on the target goes to D10 on the programming board Vcc and Gnd are connected Trace out the wires to the ICSP header and you will see. ...


1

The wiring is actually identical. It just uses the ISP header (2x3 pins) on the target board, instead of the pins 5v, GND, RST, 11, 12, 13. Just like the table you added says. The downside to using the ISP header, is you need a male to female wire for connecting. Upside is you can easily take of these 6 pins, and connect it to a different arduino to be ...


1

See How to make an Arduino-compatible minimal board. Also, can I upload the bootloader directly by using it on the Uno in place of the original chip. No, a blank chip cannot install its own bootloader. You use a second chip. My page above describes how to do that. An alternative is a stand-alone ICSP programmer, which can be purchased for around $20. ...


1

One interesting thing I just came up with: you could use this header to attach a simple control panel for your Arduino. Imbed the Arduino in any place/box/machine you like. Then use a cable with a 6 pin connector to connect the header to a small control panel. The panel could have 3 buttons or LEDs, a reset button and a power plug.


1

Yes you can. However the SS isn't present on that header. You can however use any pin you want for SS (if the library you use supports it, that is)


Only top voted, non community-wiki answers of a minimum length are eligible