Need Help With ATmega128 ISP Programming

Status
Not open for further replies.

mohandessina

New Member
hi,
I'm trying using ATmega128 on my project but I have no idea how should I use the pin "PEN". Datasheet says "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" .Unfortunately I haven't seen any sample schematics for ATmeg128 ISP programming. does anyone has any idea?
 
The "PEN" pin is just another way to place the MCU into reset but the reset condition is latched even the pin logic level has changed back. A power OFF/ON sequence is thus needed to release the internal reset condition. This is different from the RESET pin where the reset condition is released after pin level changed.

The "PEN" pin is internally pulled high and is not required to be connected in performing ISP. It can be left unconnected or pull high externally by a 10K resistor but I don't see why it is necessary to do so.

Warning: The ISP programming pins on the Mega128 are located on the Pin 2,3 and 11. This has tripped many many users before. Refer to the datasheet section on SPI memory programming pin mapping.
 
Tnx for your useful tip! I used to work with Atmega32 and actually placed the ISP connection the same. But it seems in this MCU is totally different. tnx a lot
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…