Author Topic: avr programmer  (Read 8358 times)

0 Members and 1 Guest are viewing this topic.

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
avr programmer
« on: January 10, 2015, 01:11:21 am »
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 
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: avr programmer
« Reply #1 on: January 10, 2015, 01:33:02 am »
Quote
when I hook up the programmer and it shuts down.

The 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.
================================
https://dannyelectronics.wordpress.com/
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #2 on: January 10, 2015, 01:56:20 am »
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.
« Last Edit: January 10, 2015, 01:59:42 am by kjn4685 »
 

Offline joetorelli

  • Contributor
  • Posts: 18
Re: avr programmer
« Reply #3 on: January 10, 2015, 01:57:32 am »
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
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #4 on: January 10, 2015, 02:02:24 am »
Yes I use a isp cable from my pocket avr programmer to the chip
 

Offline xibalban

  • Regular Contributor
  • *
  • Posts: 99
  • Country: ca
Re: avr programmer
« Reply #5 on: January 10, 2015, 06:17:25 am »
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.

If 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 pins
  • The ground is connected to both the chip and the programmer
  • The connections to MISO, MOSI, SCK, RST, VDD and GND are correct
  • The 10K resistor and 100 nF capacitors are connected to the reset pin accordingly
You could check the status of connections by running the AVRDude's terminal command:

Code: [Select]
avrdude -p atmega328p
____________________

"Age is an issue of mind over matter. If you don't mind, it doesn't matter." - Mark Twain
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3020
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: avr programmer
« Reply #6 on: January 10, 2015, 07:42:20 am »
I am tying to program a atmega328p

Is 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.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #7 on: January 10, 2015, 06:58:55 pm »
Yes it is a bare chip on a breadboard. I guess these is what you want to know.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: avr programmer
« Reply #8 on: January 10, 2015, 07:14:13 pm »
Yes it is a bare chip on a breadboard. I guess these is what you want to know.

A picture is worth 1k words.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: avr programmer
« Reply #9 on: January 10, 2015, 07:48:16 pm »
It seems that everyone struggles mightily trying to help you.

You probably want to learn to ask for help.
================================
https://dannyelectronics.wordpress.com/
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #10 on: January 10, 2015, 08:15:19 pm »
Well guys I thought I was asking for help. And as for taking a picture and here they are.
« Last Edit: January 10, 2015, 11:03:05 pm by kjn4685 »
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: avr programmer
« Reply #11 on: January 11, 2015, 12:30:11 am »
The first picture was really clear, :)

Make sure your header orientation is correct and the connection matches your chip.
================================
https://dannyelectronics.wordpress.com/
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #12 on: January 11, 2015, 01:34:30 am »
According to the data sheet I have hook up right.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3020
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: avr programmer
« Reply #13 on: January 11, 2015, 01:43:57 am »
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.
« Last Edit: January 11, 2015, 01:49:53 am by sleemanj »
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: avr programmer
« Reply #14 on: January 11, 2015, 03:56:13 am »
Doesn't the AVR require bypass caps? The wires from the programmer to the IC look very long.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3020
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: avr programmer
« Reply #15 on: January 11, 2015, 05:04:41 am »
Doesn't the AVR require bypass caps?

It 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. 
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #16 on: January 14, 2015, 11:53:39 pm »
Sparkfun e-mailed me and said that I needed 2 bypass caps and a 16 kHz Crystal. Do you guys agree.
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3020
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: avr programmer
« Reply #17 on: January 15, 2015, 12:14:02 am »
Sparkfun e-mailed me and said that I needed 2 bypass caps and a 16 kHz Crystal. Do you guys agree.

If 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
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline cmnybo

  • Newbie
  • Posts: 1
  • Country: us
Re: avr programmer
« Reply #18 on: January 18, 2015, 01:47:20 am »
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.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: avr programmer
« Reply #19 on: January 18, 2015, 07:05:47 am »
16kHz is an unlikely crystal frequency.  16MHz is more likely.
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #20 on: January 18, 2015, 07:29:05 pm »
You are right sorry for that.
 

Offline rickselectricalprojects

  • Regular Contributor
  • *
  • Posts: 188
  • Country: au
Re: avr programmer
« Reply #21 on: February 01, 2015, 08:18:35 am »
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 :)
 

Offline MacAttak

  • Supporter
  • ****
  • Posts: 683
  • Country: us
Re: avr programmer
« Reply #22 on: February 01, 2015, 09:18:47 pm »
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.

Yes, 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.
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6189
  • Country: us
Re: avr programmer
« Reply #23 on: February 01, 2015, 11:48:19 pm »
If 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

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

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: avr programmer
« Reply #24 on: February 04, 2015, 05:04:30 pm »
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 SCK
Then MOSI
Then MISO

The larger the government, the smaller the citizen.
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: avr programmer
« Reply #25 on: February 04, 2015, 05:10:13 pm »
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.

To clarify:
Connect Pin 7 and 20 both to your VCC line
Connect Pin 8 and 22 both to your GND line
The larger the government, the smaller the citizen.
 

Offline kjn4685Topic starter

  • Regular Contributor
  • *
  • Posts: 154
  • Country: us
Re: avr programmer
« Reply #26 on: February 05, 2015, 11:18:00 pm »
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf