Snap programmer with ATMega644

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

Hi,

 

Has anybody experience with a SNAP programmer and an AVR controller? I used my SNAP to program a PIC18F46J50 via MPLAB X IPE 5.15, which works fine.

Now I try to program an ATMega644 (I connected the MISO/MOSI/SCK/RST pins) and supply an external 5V and GND to the controller and the SNAP.

 

When trying to program, I get a message "No device detected (32)". Any idea what I have been overlooking here ?

 

Thanks,

Edward

Edward

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

Welcome!

emulder wrote:
Any idea what I have been overlooking here ?
MPLAB IPE changes for AVR?

EDBG - MPLAB debuggers are configured for PIC at the factory; IIRC, selecting an AVR should set the debugger to EDBG mode.

 


MPLAB Snap | Page 2 | AVR Freaks

 

edit :

MPLAB® PICkit™ 4 Debugger Pinouts for Interfaces - Developer Help

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Aug 24, 2021 - 09:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I would suspect the wiring first - sure you have routed RESET to Snap's AUX pin (and not MCLR)?

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

Hi mraardvark,

 

The "reset" is connected to pin 6 on the SNAP (and not to pin 1).

 

 

Edward

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

Hi gchapman,

 

This is what I get when power up sthe SNAP: "Application version............0.14.230",

as I understand it from the reference, this should be a V5.10 compatible version.

 

Edward

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

emulder wrote:
The "reset" is connected to pin 6 on the SNAP (and not to pin 1).

Hmmm.  

Next suspect would be clock, which must at least be:

- present on the AVR

- ISP clock specified in MPLAB to 1/4 of the clock frequency

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

emulder wrote:
V5.10

I would also recommend (for AVR at least) to use a newer MPLABX, like 5.40-ish, which should use v1.6.171 debugger.

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

Hi mraardvark,

 

My settings on the X-IPE side are: "isp mode" and "Speed = 0.5MHz"

I have a 2MHz crsytal on XTAL1 and XTAL2 with two 27pF capacitors to ground.

 

How does the AVR know that it should use the external crystal oscillator by the way?

 

Edward

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

Hi all,

 

I just downloaded and installed MPLAB V5.50, and the IPE that comes with it works well.

smiley

Thanks a lot to both mraardvark and gchapman for pointing out my mistake.

Edward

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


emulder wrote:
How does the AVR know that it should use the external crystal oscillator by the way?
fuses, low byte, least significant four bits, fuse data is latched shortly after RESET is deasserted.

ATmega164A/PA/324A/PA/644A/PA/1284/P megaAVR® Data Sheet

[page 39]

[page 297]

Table 27-5. Fuse Low byte

 


ATMEGA644PA | Microchip Technology

 

"Dare to be naïve." - Buckminster Fuller

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

A little heads-up since you are coming from the PIC-world: Fuses in AVRs are not cleared on chiperase, like configuration bits in PICs.