ATMega644p not responding

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

Hi everybody.
I have 3 IC all of them ATmega644p, for some reason, they are not working.
I'm using a STK500 to program them, below is the program and the fuses.
Pressing the stk500 buttons, I have no response from the board leds (leds on PORT B and buttons on port A)
If I use the same program on ATmega8515 - ATmega16 and there is no problem, I can interact pressing buttons and lighting the corresponding led.
Tried external crystal and internal clock but both cases I have the same result.

I appreciate any idea.

#include  
int main(void){
	unsigned char x; 	
	DDRA = 0x00; 		
	DDRB = 0xFF; 		
	PORTB = 0x00; 
	while(1){
		x = PINA;		
		PORTB = x;	
	}
return 1;

}

Attachment(s): 

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

When you switched over to the 644, did you recompile the code for the 644? The code you ran on the 8515/32 will not work the same on the 644. For example PORTA and PORTB have different locations.

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

is the mM644 placed in the correct socket?
from the head the right one(when breakout zone is nearest to you).
also did you connect to the right ISP connections

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

The D9 in the picture is close to the default for "HIGH" - the actual default is 99 and the changed bit means that JTAGEN is disabled. So, yes, I'd say he has it in the right socket with the right ISP cables or the D9 would seem to be too coincidental.

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

dksmall wrote:
When you switched over to the 644, did you recompile the code for the 644? The code you ran on the 8515/32 will not work the same on the 644. For example PORTA and PORTB have different locations.

Yes, the code was recompiled all the times.

meslomp wrote:
is the mM644 placed in the correct socket?
from the head the right one(when breakout zone is nearest to you).
also did you connect to the right ISP connections

I thought that, the socket is different from 644 to the 8515. But I'm using the right one because I can read the IC signature, program and verify the program.
Another thing that tells me that the micro is working:
If I set the fuse CKOUT (clock out on PORTB1) I can see the corresponding led on.

And JTAG was disabled by me, yes.

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

I don't have the STK500 logic with me. Is AVCC connected to VCC? You need power to PORTA for it to work correctly and that comes from AVCC. And again when you compile, are you telling the compiler that a 644 is being used, instead of the 8515/32?

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

Quote:
If I use the same program on ATmega8515 - ATmega16 and there is no problem,
But the 2 chips have a different pinout and therefore use a different socket on the STK500.

The M16 has the same pinout as the M644.

Quote:
the code was recompiled all the times.
Using the same folder and therefore the same default directory where to find the .hex file? It is not unusual for people to change directories for a new project but have the programmer still pointing to the old file....just in case. :-)

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

ATmega16 uses the same pinout than 644, M16 works fine, 644 don't.
Of course I've compiled the soft for the specific micro controller before programming it, and for the 8515 I change the socket, yes.

Related to the portA AVCC, another test made was changing the switches input to port C and D.
The same problem, ATMega 16 for example, is working perfectly, but the 644 don't.

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

From the head, but might be wrong here...

When comming from reset the default state of the pins is input without pull-up. You make PORtA input(wich it already is, but better be safe then sorrow, so leaf it in. But you do not enable the pull-ups.
Don't have the STK500 schematic at hand, but from the head the switch was buffered with an opendrain connection.
The M66 is fairly new, so it might be that the leakage current of a pin is to small to get the pin to reach a high level.
so after the DDRA = 0x00, add a PORTA = 0xFF to enable the internal pull-ups of the M644.

If that is not working perhaps it is time to get out a volt meter and measure the voltage on the pins that you are using and see if they are what you expect them to be. AS there is no fast switching stuff it should be doable with the volt meter.

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

And

Quote:
Using the same folder and therefore the same default directory
???

John Samperi

Ampertronics Pty. Ltd.

https://www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

ups... sorry JS, I forget to reply the directory question.
But, this morning I went to a different reseller and buy 3 more 644 IC, all of them are working as supposed to do.
Maybe the first ones IC was the ATMEL chinese version?? :)
For some reason, the oldest 3 micros allow me to program them and verify but there is no response at all..

I take this oportunity to ask for an advice:
I'm trying to use the 644 to generate VGA video output. (just text,it's all I need, maybe few lines)
time ago, I found Lucid Science and it seems to me the best and simplest project designed so far.
[url] http://www.lucidscience.com/pro-... [/url]
Does anyone know another method? or better resolution? using an Atmel micro controller?
Thanks!!