Here is mine circuit. Intially i used arduino UNO directly for programming. Now i am Using atmega 328 IC for programming. I am trying to connect 32 hall sensor via Mux circut. I wanted to How to upload boot loader or HExfile Here. Will avr pocket programmer satisfy above circuit or i need to add addtional circuit here AVr pocket programmer
2 Answers
The AVR pocket programmer should work fine. Sparkfun has a good guide for doing this.
Here's the pinout of the Atmega328:
You'll want to connect your programmer as follows (note, these are the pins for the bare Atmega328 chip only. The pin numbers on an Arduino board are different.):
Programmer Pin Atmega328 Pin 5V Vcc (7) GND GND (8) MOSI Digital 11 / Physical 17 MISO Digital 12 / Physical 18 SCK Digital 13 / Physical 19 Reset Reset (1)
Note that the physical pins on the chip are numbered differently than the logical pins. In the table above the "Digital" pin numbers are those colored yellow in the figure, while the "Physical" pins correspond to the black-on-white numbers around the edge.
If you already have the ICSP header connected to those pins (it's not completely clear in the schematic if that is the case), you can connect the programmer to those pins instead. This can be easy if you have a 6-pin ICSP cable with your programmer.
Also, if you are already powering your Atmega328 from some other 5V power supply you can omit the 5V-Vcc
pin. However, the programmer and the Atmega328 must share a common ground, so be sure the GND pins are connected.
Connect your programmer to the computer using USB, open the Arduino IDE, select the correct serial port of the programmer, and pick "Arduino Uno" in the "Board" menu. You can program the bootloader by selecting "Burn bootloader" in the Tools menu, or you can simply write your program by selecting "Uploading using programmer" in the File menu.
-
thanks for information.I wanted to know whether above circuit right or wrong– AMPSCommented May 23, 2014 at 4:58
Uploading Hexfile to your arduino can be done using this application:
http://kmtronic.com/upload-hex-files-to-arduino.html
This is how you upload an Arduino Bootloader on an empty ATmega328 / ATmega328P-PU. Using an Arduino. (No need for a separate ISP Programmer).
From Arduino Uno to other Arduino Uno.
- Open the ArduinoISP firmware (in Examples) to your Arduino board.
- Select the items in the Tools > Board and Serial Port > Arduino Uno.
- Upload the ArduinoISP sketch.
- Wire your Arduino board to the target as shown in the diagram below. (Note: you'll need to add a 10 uF capacitor between reset and ground.)
- Also connect TX from Arduino A to the RX of Arduino B and RX from Arduino A to TX Arduino B.
- Select Target Board in Tools > Board > Arduino Duemilanove w/ ATmega328
- Select programmer in Tools > Programmer > Arduino as ISP
- Use the Burn Bootloader > Arduino as ISP command.
- Go to Tools and Select Burn Bootloader. Done.
To upload on a breadboard without External clock.
- Download: Breadboard.zip
- Put boards.txt in your Arduino directory under Hardware > ATmega328. (For windows usually (C:/Program files/Arduino/Hardware/ATmega/boards.txt))
- Close Arduino IDE and reopen it.
- Open the ArduinoISP firmware (in Examples) to your Arduino board.
- Select the items in the Tools > Board and Serial Port > Arduino Uno.
- Upload the ArduinoISP sketch.
- Hook pin13 from Arduino to pin19 on Chip
- Pin12 from Arduino to pin18 on chip
- Pin11 from Arduino to pin17 on chip
- Pin10 from Arduino to pin1 on chip
- pin0 from Arduino to pin3 on chip
- pin1 from Arduino to pin2 on Chip
- connect 5V from Arduino to pins 7 and 20 on chip 14, connect GND from Arduino to pins 8 and 22 on chip
- Select Target Board in Tools > Board > ATmega328 on breadboard (8 MHz internal clock)
- Select programmer in Tools > Programmer > Arduino as ISP.
- Select Tools > Burn Bootloader. Done.
It's also possible with an Arduino Leonardo but you'll have to change some settings for that.
Note: You will need to put target board to Arduino Duemilanove w/ ATmega328 for programming the new chip (Uploading a code to it) instead of targeting Arduino Uno.
-
-
Yes, and since you have an arduino you could use your arduino as ISP for programming your clean/empty chip to burn a bootloader on it and your sketch. Follow the links– HandokoCommented May 26, 2014 at 5:06