Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Hot answers tagged

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 (...


11

I soldered wires to pads to be sure the connection was good, and used those wires for programming from the Uno. Then the programmer worked, without any edits to the command lines as posted in the question. I ran a few variations and was able to answer all my questions, and a few more besides: The "Yikes! Invalid device signature" error was being caused by ...


10

These are the In System Programming (ISP) pins. They are used to program the microcontroller without using the bootloader. The bootloader is a program already loaded into the flash of the microcontroller that allows the program to be loaded into the microcontroller through the Tx & Rx serial lines and hence not requiring a programming device. Using ...


9

No, the ATmega's ISP does not operate over the UART pins but only the ISP pins. To program it via a UART, you need to first load a bootloader, unless your chip was pre-programmed by the vendor, something some offer as a value-added service (or even as an essential stock item, with an Arduino type bootloader)


7

After poking around for a bit more, it turns out my problem was the baud rate. I could make it work by setting it to 19200, just a little slower. Alternatively, you can modify the ArduinoISP sketch to enable higher baud rates. I used this post to enable 115200 baud and I was able to successfully use avrdude at the higher rates. Not sure how I missed this ...


7

You can't change the pins. ArduinoISP uses the SPI interface on pins 10-13 which is provided by the underlying AVR hardware.


7

First reason I'd guess is price: FT232 on octopart: USD2.65 ~ 3 Atmega16U2 on octopart: USD2.12 ~ 2.2 They can probably get much better deals considering that the Atmega328 is also from Atmel (now Microchip). About the programming: There are some projects which make the Atmega16U2 into a MIDI device over USB or HID, for example some repos: 1, 2, 3. I've ...


5

In fact, you can, but you are unlikely to enjoy it as it will be fairly slow. While this module is intended for serial communications - which the ATmega won't support until it has a bootloader on it - the chip around which it is built can also be operated in "bitbang" mode: http://www.ftdichip.com/Support/Documents/AppNotes/AN_232R-...


5

I think µProg – tiny, fast, portable AVR programmer with SD does what you want. You can store multiple files in the SD card (hex, eep etc) and select from the device menu which one to write to the target MCU without any need for a PC. The best part is that it's available for free (PCB, schematic, firmware etc). One of a kind, portable AVR programmer! ...


5

It is possible to skip the Burn Bootloader step. When you do Upload Using Programmer the bootloader is overwritten and thus serves no purpose. However, there is another reason for the Burn Bootloader step, to set the correct fuses for your board selection. The fuse settings configure things on the ATmega328 such as clock speed and clock source. If the ...


5

1. Uploading the sketch to your ESP8266 Tools > Board > select the appropriate ESP8266 board File > Examples > ESP8266AVRISP > Arduino_Wifi_AVRISP Change lines 7 and 8 to match the SSID and password of your WiFi router Sketch > Upload After the upload completes unplug the ESP8266 from your computer. 2. Generating the .hex file and the upload command Open ...


4

I had exactly this problem. If the ATtiny is set for external clock, then the ArduinoISP will not be able to program it without an external crystal. Connected a 16 MHz crystal and 2 capacitors and worked perfectly. (I was then able to set ATtiny to internal clock, remove the crystal, and then worked perfectly without the crystal.)


4

I have no direct solution for what you want, but yes it is possible to do it. You can hack a bootloader firmware so that it reads the firmware flash code and upload it over ISP. Though you obviously can't upload 32k of firmware on the target AVR if both arduinos have only 32k of total flash in their MCUs, you'll need to have the flasher have more flash ...


4

To preserve the bootloader, you should use the -D option in the ISP command line just as it was used in the bootloader upload command line. This will disable usage of full-chip erase. I expect you would end up with something like avrdude -c avrisp2 -p atmega328p -D -U flash:w:_build/image.hex However, it is important to add something which I overlooked ...


4

The bootloader only enables serial programming of the device; it is perfectly possible to run Arduino programs without it provided that the code is compiled with the same hardware options (MCU model, clock speed, etc.) that the standalone device/board uses.


4

This means that if I try to flash the program, ATTiny will start to put PWM power into my Arduino. I don't want that to happen. Why do you think that is a problem? The "PWM power" cannot be any higher than the supply voltage, and that is 5V. The Arduino has no problem with you providing a 5V PWM signal to an input pin. The only time it could be a problem ...


3

Assuming they're based on the more recent Arduino Nano 3.x series or later, the microcontroller in your Nanos is probably an ATmega328 running at 16 MHz. That's the same as the Uno, so there should be no major problems hopefully. It might be worth checking that you've got the latest version of the Arduino IDE though. I seem to remember there was a problem ...


3

Your log demonstrates that Your programmer settings were correct. You have the right sketch loaded on the Arduino You have the Arduino auto-reset properly disabled. The failure occurs at the point at which you're trying to enter programming mode. The two most likely error sources are: Your ATtiny85 is not wired up correctly (e.g. you misidentified pin 5 ...


3

My understanding is that the Arduino language is cross-compiled into C-compatible binary, There is no "Arduino language". Programs are written in C++ or C, and the IDE mangles them in certain ways in order to ease development by beginners (and on occasion frustrate development by veterans). and the Arduino EEPROM libraries are used to effectively 'flash' ...


3

As a practical matter, you're much better off correcting things so you're using the original pins, which correspond to hardware SPI. However, it's not terribly hard to implement SPI in software (at a lower performance, of course): static uint8_t SPITransfer(uint8_t out) { uint8_t in = 0; for (int i=0; i<8; ++i) { digitalWrite(MOSI, (...


3

No, connecting it backwards shouldn't do any damage, it just won't work. The clue is in these two connections: NC -|- GND GND -|- NC With it backwards the ground connection doesn't go anywhere. Without that ground connection there's no circuit. With no circuit, no current flows. The only possible danger is to the protection diodes in the IO ...


3

Since AVR ISP is simply a modified form of SPI, the most universal way to handle this is to use a 3/1 level translator such as the MAX3392E. Once you provide it with 5V on VCC and 3V3 on VL it will translate the MOSI, SCK, and nRESET signals to 3V3 and the MISO signal to 5V.


3

Feeling really stupid about it in retrospect... One last thing I tried was taking the ATmega328P out from the Arduino Uno and plugging the blank ATmega328 in its place, thinking I could use the Uno programmer as such to burn the bootloader on the chip. That didn't work and I don't know if it's supposed to work. However, to plug the new chip into the DIL on ...


3

That's not a USBasp, that's some other programmer that has co-opted Atmel's vendor ID invalidly. If you want to use it then you will need to find and use some program called "ProgISP" that is only available for Windows. That particular device does not show the jumper required for reprogramming, so I wouldn't attempt it (and in fact I would find the nearest ...


3

Because the SD card is an SPI device it shares the same pins as the ISP interface. The only way to not have the SD card interfere with the ISP is to not have the SD card connected. As you have seen, that can be achieved by removing the card. It can also be achieved by adding a tri-state buffer between the MCU and the card so the MCU only connects the card ...


3

As of V1.8.2, the ATMEL-ICE is now included as a programmer in the Arduino IDE. The ATMEL-ICE was not available as a in-system programmer (ISP) in version 1.6.8 of the Arduino IDE. On the 20th of Jan 2017, user facchinm added the ATMEL-ICE to the list of programmers in the IDE, and it was merged into the master on the 8th of Feb. It was released as a ...


3

The one by the USB connector is ICSP for the USB interface chip. The other is ICSP for the main chip and doubles as the (now standard) SPI interface for shields. https://www.arduino.cc/en/Reference/SPI


3

Trying your fuse settings on an AVR fuse calculator shows that you have selected an “external full-swing crystal” as the clock source. Now your ATmega won't work unless you connect it to an external crystal. Or you could try just sending a square wave into the XTAL1 pin. Then you can try to reprogram it.


3

The purpose of the capacitor is to prevent the "master" Arduino (the Mega in the first image above) from resetting when the serial port is opened. If that board resets, then programming fails. There are many ways of preventing that reset - some more permanent than others - but the capacitor trick is one of the simplest. So yes, you do need the capacitor ...


3

The target board was not reset. The "Arduino as ISP" sketch uses pin 10 to reset the target, not the SS pin. So even on Mega, wire reset of target to pin 10, not to pin 53. Is this an error communicating with the ISP (Arduino) or is it an issue with the ISP talking to the target (ATMega8B on USBAVR)? the first error "not in sync" is a problem with ...


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