ATMega328 RESET/programming

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I am designing a board with an ATMega328 and I have a few questions.

 

1) Do I need a pullup resistor on the RESET pin?

2) Can anyone recommend a good programmer for me to use?  I am using the SPI interface for serial programming.

 

Thanks,

Dan

This topic has a solution.
Last Edited: Wed. Jul 26, 2017 - 04:17 PM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I rarely use an external pull-up on reset. There is an internal one and it is generally adequate except for situations where the is a long trace on that pin (perhaps going to a programming connector). When this is the case, reset can sometimes be triggered by external electrical "signals". If you do use one, beware of the minimum recommended value (10K, I think); programmers can't cope with a smaller resistor.

 

There are many programmer options. I've used an "AVR Dragon" for several years but there are now others available at very modest prices. Be careful to get one with DebugWire capability (for M328x).

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you only want a "programmer" you might as well just buy a $3 USBAsp on ebay - in fact buy 10. If one ever fails move onto the next one.

 

But if you want a "professional" programmer then the best device from Atmel right now is the Atmel-ICE will do both programming and debugging.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Jim,

 

Thanks for the reply.  That's a good point about noise on the reset line.  I'll add a pull-up to my design.

 

Thanks again,

Dan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll check into the Atmel-ICE...sounds like the right way to go.

 

Thanks,
Dan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Clawson,

 

I downloaded the datasheet for the Atmel-ICE and it left me with a question.  Figure 4-10 shows a 6-pin connector with VCC on pin 2.  Elsewhere in the document, it talks about VTG as the "Target reference voltage".  My target is running at 5V, so should I connect the 5V supply from my target to the VCC pin on the ICE 6-pin connector?  I assume it's the same as VTG?

 

I attached an image for your reference.

 

Thanks,
Dan

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

should I connect the 5V supply from my target to the VCC pin on the ICE 6-pin connector? 

 

Yes.  This will let the ICE know that the target board is running at +5V.   The ICE will set its output signals at +5V.  If the target were at 3.3V, then the TGV voltage pin would let the ICE know that it should only put out 3.3V on its signals.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just to be clear the ICE does not provide voltage, it senses it. It does that because you may be connecting to an AVR/circuit with Vcc at anything from about 1.8V to 5.0V so it has to adapt to the level. So you just power the target circuit as normal but connect the Vcc form that to VTG so the ICE can sense the level and adapt. If you don't the IDE will warn something about "cannot sense target voltage"