avr programmer - Page 1
Forum section: electronics / general

author: kjn4685
author_rank: Regular Contributor
timestamp: January 10, 2015, 01:11:21 am
content: I am tying to program a atmega328p with a pocket avr programmer. My problem is that when I hook up the programmer and it shuts down. trying to program a led and make it flash. Can anybody help me. Also I am using winvar v-20100110 program . As you guys probable figure out that I am just getting started in programming.thank you in advance

author: dannyf
author_rank: Super Contributor
timestamp: January 10, 2015, 01:33:02 am
content: QuoteThe correct way to describe a problem follows the "who does what to whom when" rule. "it shuts down" has no meaning to anyone but you.Unless you want to seek help from yourself, I suggest that you describe it in a way a complete stranger can understand.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 10, 2015, 01:56:20 am
content: I mean when I plug the programmer into the atmega 328p. The programmer leds goes off I until unplug the cable that connects the programmer to the chip. On the programmer there is a switch that sends power on or off to the chip. So I hope I have explained myself. I do not know if it is shorting out or what.

author: joetorelli
author_rank: Contributor
timestamp: January 10, 2015, 01:57:32 am
content: I use pro mini's that use the 328 chip.I am assuming you are programming via ISP. The pinouts for ISP are really not standardized like a JTAG port.You will have to look at the pin out of your programmer and 328 board and find out which pins match.I plug my pro mini into a bread board and use jumper leads to from the programmer connector to go to the correct pins.JoeT

author: kjn4685
author_rank: Regular Contributor
timestamp: January 10, 2015, 02:02:24 am
content: Yes I use a isp cable from my pocket avr programmer to the chip

author: xibalban
author_rank: Regular Contributor
timestamp: January 10, 2015, 06:17:25 am
content: Quote from: kjn4685 on January 10, 2015, 01:56:20 amIf you are using ISP protocol, there is no need for disconnecting the programmer's cable for chips like Atmega32*. The following are the checklists:The 5V is present on the chips Vcc pin, as well as the programmer's 5V Vdd terminal pinsThe ground is connected to both the chip and the programmerThe connections to MISO, MOSI, SCK, RST, VDD and GND are correctThe 10K resistor and 100 nF capacitors are connected to the reset pin accordinglyYou could check the status of connections by running the AVRDude's terminal command:Code:avrdude -p atmega328p

author: sleemanj
author_rank: Super Contributor
timestamp: January 10, 2015, 07:42:20 am
content: Quote from: kjn4685 on January 10, 2015, 01:11:21 amIs this a bare chip on a breadboard.A chip on a PCB from a manufacturer.A chip on a PCB you made yourself.A chip wired deadbug style.A chip on an Arduino...It sounds like a short (or attempt at too high but legitimate current draw) VCC to ground as the most likely cause.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 10, 2015, 06:58:55 pm
content: Yes it is a bare chip on a breadboard. I guess these is what you want to know.

author: zapta
author_rank: Super Contributor
timestamp: January 10, 2015, 07:14:13 pm
content: Quote from: kjn4685 on January 10, 2015, 06:58:55 pmA picture is worth 1k words.

author: dannyf
author_rank: Super Contributor
timestamp: January 10, 2015, 07:48:16 pm
content: It seems that everyone struggles mightily trying to help you.You probably want to learn to ask for help.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 10, 2015, 08:15:19 pm
content: Well guys I thought I was asking for help. And as for taking a picture and here they are.

author: dannyf
author_rank: Super Contributor
timestamp: January 11, 2015, 12:30:11 am
content: The first picture was really clear,Make sure your header orientation is correct and the connection matches your chip.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 11, 2015, 01:34:30 am
content: According to the data sheet I have hook up right.

author: sleemanj
author_rank: Super Contributor
timestamp: January 11, 2015, 01:43:57 am
content: Unplug the cable at the programmer and leave it plugged into the AVR, use a multi meter to check the cable's VCC and GND pins to see if they are shorted.Double check your connections.The breadboard wires look correct, but I can't tell what's going on in that cable.It would be advisable to check carefully, with a a multimeter continuity test, that each end of the cable is what you expect, that you haven't got it inverted for example.

author: zapta
author_rank: Super Contributor
timestamp: January 11, 2015, 03:56:13 am
content: Doesn't the AVR require bypass caps? The wires from the programmer to the IC look very long.

author: sleemanj
author_rank: Super Contributor
timestamp: January 11, 2015, 05:04:41 am
content: Quote from: zapta on January 11, 2015, 03:56:13 amIt will get by without (but yes). But he says that his programmer just shuts down (ie leds go out) when he plugs it in. Short somewhere most likely I'd think.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 14, 2015, 11:53:39 pm
content: Sparkfun e-mailed me and said that I needed 2 bypass caps and a 16 kHz Crystal. Do you guys agree.

author: sleemanj
author_rank: Super Contributor
timestamp: January 15, 2015, 12:14:02 am
content: Quote from: kjn4685 on January 14, 2015, 11:53:39 pmIf your ATMega has been setup (fuse bits set) to use an external crystal, then yes - however you can also usually just fire in a 1 MHz square wave to XTAL1 as an alternative clock good enough to reset the fuse bits to use the internal RC oscillator.http://www.larsen-b.com/Article/260.html

author: cmnybo
author_rank: Newbie
timestamp: January 18, 2015, 01:47:20 am
content: You didn't connect the AVCC and ground on pins 20 and 22. They should be connected even if you aren't using any of the analog stuff.

author: westfw
author_rank: Super Contributor
timestamp: January 18, 2015, 07:05:47 am
content: 16kHz is an unlikely crystal frequency. 16MHz is more likely.

author: kjn4685
author_rank: Regular Contributor
timestamp: January 18, 2015, 07:29:05 pm
content: You are right sorry for that.

author: rickselectricalprojects
author_rank: Regular Contributor
timestamp: February 01, 2015, 08:18:35 am
content: this may or may not be helpful but you could get a replacement (if you haven't already), try a different programmer (there are some really cheap ones on ebay) or if you are just trying to program an atmega 328 you might be interested in getting an arduino uno board as they already have a atmega 328 as the main chip.i hope that was helpful

author: MacAttak
author_rank: Unknown
timestamp: February 01, 2015, 09:18:47 pm
content: Quote from: cmnybo on January 18, 2015, 01:47:20 amYes, you need to do those things.Is this chip previously used in another application? By default, it should be programmable as-is. It should be using the sloppy internal oscillator, and all ISP pins should be configured for programming.Also, try moving the chip to a different set of tracks in the breadboard. Those aren't always terribly reliable.

author: zapta
author_rank: Super Contributor
timestamp: February 01, 2015, 11:48:19 pm
content: Quote from: sleemanj on January 15, 2015, 12:14:02 amRemember also that the AVR can be programmed at max speed of 1/4 of the clock. I had to slow down avrdude to program at 250khz.

author: Stonent
author_rank: Super Contributor
timestamp: February 04, 2015, 05:04:30 pm
content: Connect the AVR programmer with only ground and VCC and see if it shuts down.Then if that's OK, add the reset wire and power it up.Then SCKThen MOSIThen MISO

author: Stonent
author_rank: Super Contributor
timestamp: February 04, 2015, 05:10:13 pm
content: Quote from: cmnybo on January 18, 2015, 01:47:20 amTo clarify:Connect Pin 7 and 20 both to your VCC lineConnect Pin 8 and 22 both to your GND line

author: kjn4685
author_rank: Regular Contributor
timestamp: February 05, 2015, 11:18:00 pm
content: Hey thanks guys I have got it to recognized the chip and I am trying to program it to blink a led. Again I say thanks