What is the story with the PEN pin on the ATMEGA64A

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

I've read through the datasheet and I'm not really getting it.  Can you operate the ATMEGA64A using ISP with the RESET like others?  What is the point of the PEN?

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

Interesting. The Spec Sheet says:

 

  1. PEN is a programming enable pin for the SPI Serial Programming mode, and is internally pulled high. By holding this pin low during a Power-on Reset, the device will enter the SPI Serial Programming mode. PEN has no function during normal operation. 

 

This IS a JTAG chip. The serial programming connection diagram (Figure 31.7) does not show anything about the PEN pin. Very strange! The SPI serial programming algorithm (section 31.9.1) says:

 

  1. Power-up sequence:
    Apply power between VCC and GND while RESET and SCK are set to “0”. In some systems, the programmer can not guarantee that SCK is held low during power-up. In this case, RESET must be given a positive pulse of at least two CPU clock cycles duration after SCK has been set to “0”.

    As an alternative to using the RESET signal, PEN can be held low during Power-on Reset while SCK is set to “0”. In this case, only the PEN value at Power-on Reset is important. If the programmer cannot guarantee that SCK is held low during power-up, the PEN method cannot be used. The device must be powered down in order to commence normal operation when using this method. 

 

 

So, PEN is not required in all cases!

 

Jim 

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

Last Edited: Fri. Feb 23, 2018 - 05:35 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Simple answer: Just ignore it and don't use it. I hope you don't really want to start anything new with the M64, you can use the new compatible chips and gain that pin as a GPIO.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Search the forums - this thing has been a mystery for years. I remember a lot of posts from "microcarl" about it.

 

I think (as John says) the consensus in the end was "ignore it"

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

js wrote:
Simple answer: Just ignore it and don't use it.
clawson wrote:
the consensus in the end was "ignore it"

PEN was (is?) a carryover from the ATmega103.  There is little on /PEN in the Mega103 datasheet; a couple of notes similar to the text in the Mega64 datasheet.

 

Indeed, we fussed a bit with /PEN in our first Mega64-family app years ago.  end result:  Just ignore it and let it float.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

js wrote:

Simple answer: Just ignore it and don't use it. I hope you don't really want to start anything new with the M64, you can use the new compatible chips and gain that pin as a GPIO.

 

I was looking for a 64 pin AVR that can do 5V and has a pair of UARTs.  I think there were some others 128A or 2561.

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

I might have a couple of unmounted m128/m256 lying about...

Tom Pappano
Tulsa, Oklahoma

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

I was looking for a 64 pin AVR that can do 5V and has a pair of UARTs

And in that thread I mentioned the NEWER pin compatible chip to the M64 which is pretty old.

 

edit ATmega1281/2561.
 

edit #2 the price is ridiculously high for those 2 chips compared even to a Mega128A.sad

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Sat. Feb 24, 2018 - 08:50 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks John - it is a for a for fun project but I still don't want to think the AVR I'm using is going to go out.  It still says in production on the microchip site but who knows for how long.

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

alank2 wrote:
it is a for a for fun project but

Just get an Arduino clone with a '2560 mounted, probably for less than a single bare '64A?

$13, with free shipping, wall charger, and USB cable:  https://www.ebay.com/sch/i.html?...

 

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Sat. Feb 24, 2018 - 11:22 PM