Author Topic: USBASP and ATMEGA64A  (Read 1341 times)

0 Members and 1 Guest are viewing this topic.

Offline masterx81Topic starter

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
USBASP and ATMEGA64A
« on: April 25, 2020, 08:45:07 pm »
Hi!
I'm trying to program a blank ATMEG64A with a cheap USBASP. The chip is on a board, with a crystal connected.
I know that the USBASP is working as i have 2 of them, and i've used each other for update the firmware (using "usbasp.atmega8.2011-05-28.hex" file, that i think is the correct one to use)
I'm using both AVRDUDESS 6.3 and ExtremeBurner.
When i try to do a device read or simply a "DETECT" of the device, it always fail.
I've attached the logic analyzer for try to understand what's going on.
On VCC and AVCC i have 4.5v.
The reset signal goes to 0 correctly.
The programmer start the clock at 500hz
Then the programmer send correctly via the MOSI pin to the pin 2/PE0 of the ATMEGA64A the AC 53 00 00 command
After this, i must read something on the MISO pin (pin 3 of the package), but the ATMEGA doesn't output nothing.
Attached there is a screen of the LA.
CH0 0 reset, CH1 CLK, CH2 MOSI, CH3 MISO
What's going on??
Thanks!
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1417
  • Country: us
  • Very dangerous - may attack at any time
Re: USBASP and ATMEGA64A
« Reply #1 on: April 25, 2020, 09:04:11 pm »
That clock doesn't look right. It should be much wider.
 
The following users thanked this post: masterx81

Offline masterx81Topic starter

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: USBASP and ATMEGA64A
« Reply #2 on: April 25, 2020, 10:28:00 pm »
Uhm, need to check what cam cause this. The period is correct.
 

Offline admiralk

  • Regular Contributor
  • *
  • Posts: 178
  • Country: us
Re: USBASP and ATMEGA64A
« Reply #3 on: April 25, 2020, 10:41:22 pm »
That clock doesn't look right. It should be much wider.

That is my thought. Zoom out a bit and see if the changes are on the right edge; rising or falling.
 
The following users thanked this post: masterx81

Offline masterx81Topic starter

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: USBASP and ATMEGA64A
« Reply #4 on: April 26, 2020, 10:42:17 am »
The clock was the right direction to follow. I've tested the clock without the board attached and had the correct shape. So i've isolated the clock pin of the mcu lifting it from the board and... tadan! Programmer is working. Maybe there is some load on the pin that do interference to the programmer. Thanks!
 

Offline masterx81Topic starter

  • Frequent Contributor
  • **
  • Posts: 481
  • Country: it
Re: USBASP and ATMEGA64A
« Reply #5 on: April 26, 2020, 11:17:01 am »
Ehm... i've set the fuses to Low=0 High=0 Ext=0xFC and stopped responding... spi programming is enabled (SPIEN=0). Starting to hate this thing  :palm:
 
Edit

Ok, got it, if the clock source is wrong the device not work also on spi programming. Sourced the right clock and started to answer. I'll add to my list of things to NOT DO "trust fuse settings found somwhere".
It's the first time that i do AVR (always used pic) and i'm a bit confused
« Last Edit: April 26, 2020, 11:57:45 am by masterx81 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf