Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ATmega32m1
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR
View previous topic :: View next topic  
Author Message
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Sun Feb 19, 2012 6:29 am    Post subject: ATmega32m1 Reply with quote

I have been experimenting with many different chips using Bascom-AVR and a homebrew STK-200-type programmer over the years. I am now trying to get the programmer connected to an ATmeg32m1 with no luck. I keep getting the could not identify chip response. I have tried two different chips which I soldered to a DIP adapter and to a Schmartboard adapter. It is the same story with both chips. I certainly could have damaged the chips soldering them. But I am wondering if there is some unique factor to programming the ATmega32m1 that I could be ignoring. Before I purchase a ready-made chip and adapter from a commercial vendor ($$$), I thought it would be worth a question to this forum. Is there a trick to programming these chips? Otherwise I'll assume my soldering is at fault. Thanks!
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5071
Location: Holland

blank.gif
PostPosted: Sun Feb 19, 2012 9:12 pm    Post subject: Reply with quote

i think it should work. for the 32m1 i soldered the chip to a test board, and then added an isp connector to be able to program it.
you used pins pind.2, pind.3 and pind.4 ?
i do not think solder skills can be so bad that it would kill the chip. static electricity can harm the chip.

_________________
Mark
Back to top
View user's profile Visit poster's website
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 862
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Sun Feb 19, 2012 9:54 pm    Post subject: Reply with quote

Never used this chip but the datasheet suggests following connection for serial programing.

MISO_A PIN 1 PD2
MOSI_A PIN 2 PD3
SCK_A PIN 12 PD4
RESET PIN 31

VCC and AVCC should be connected according to programing section.
THE CHIP SHOULD COME WITH THE INTERNAL OSC. ENABLED (8MHz) BUT ALSO DIVIDE BY 8 ENABLED.
SO IT SHOULD RUN AT 1 MHz.
PROGRAMING CLOCK FREQUENCY SHOULD BE LESS THAN 250KHz.
Hope it helps.
Hubert
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Mon Feb 20, 2012 12:38 am    Post subject: Reply with quote

Many thanks! I was using the wrong pins, not PD2, PD3, PD4 as you noted. I rewired and that solved part of the problem. I now do get the flash write and read boxes and they seem to go through their paces okay, but then I get the Difference at 0000. The little LED test does not run. I can write to fuse bits, however. But the download process does not complete successfully.

As to the other suggestion: I am not sure how to set the programming clock frequency ... I went to the Programmer dialogue box in Bascom (as mentioned I'm using a homebrew STK-200 compatible programmer which has served me well for years) and tried several different settings for the port delay ... 10, 100, 1000, 10000, but no difference in the result. Also, yes, I do have AVcc at Vcc (5 volts) and have AGND at system ground.

I'm stumped from here.

Many thanks!
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 862
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Mon Feb 20, 2012 4:27 pm    Post subject: Reply with quote

Maybe if you just disable the divide by 8 fuse bit, that might solve the speed issue if it is one.
Hubert
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Mon Feb 20, 2012 4:43 pm    Post subject: Reply with quote

My thanks again for your consideration. Well, I just did that and did not have any luck in changing the situation. I just can't imagine what the problem might be. I am tempted to say it is a problem with my hardware/programmer, but it has worked on many different chips over the years. So why the sudden problem, I ask myself. Is this chip, the ATmega32m1, somehow more "sensitive" to, say, ringing in the line than other chips? I believe it is an "automotive" chip ... is there something different about these chips I maybe am not taking account of? I looked through their documentation, which for my brain is massive, but I couldn't see anything immediately pertinent. When I get some time I'll hook up my scope to the programming lines and have a look ... but as I mentioned this is the first time I will have had trouble with the programmer, if that is in fact it. Anyway, any ideas are welcome, and again, thanks for your input.

Gary
Back to top
View user's profile
hgrueneis

Bascom Member



Joined: 04 Apr 2009
Posts: 862
Location: A-4786 Brunnenthal

austria.gif
PostPosted: Tue Feb 21, 2012 12:50 am    Post subject: Reply with quote

Is there a capacitor connected to the reset input? If so, it might not pull the reset low fast enough before the clock starts (also needs a 10K pull up resistor).
Some chips might be sensitive to that timing.
You might also try to connect an external oscillator or clock-input with 12 MHz or higher and see if it makes a difference.
Then you of course also need to change the clock fuse to external clock.
Maybe you could also try a different type chip and see if the programer still works.
Hope you succeed soon.
Hubert
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Tue Feb 21, 2012 2:31 pm    Post subject: Reply with quote

Well, I checked and/or tried all of the suggestions. No luck. I tried the programmer on another computer with very short cables. Still no luck. I can only conclude that somehow I damaged the chip, so I'm going to order another one and give that one a try. That will take some days, but I'll get back to the thread when I try another chip. Certainly the initial problem was not using the alternative ports for programming, so I won't repeat that error. In any case, many thanks to the both of your for your input. Most appreciated!!

Gary
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Sun Feb 26, 2012 11:17 pm    Post subject: Reply with quote

Well, I solved the problem -- sort of. I tried avrdude and it loaded the atmega32m1 without a hitch. I didn't slow down the speed, just loaded the .hex file with avrdude's defaluts as is. So I am wondering if there is a setting in Bascom I am ignoring. As I mentioned, the sTK-200 has worked flawlessly for years, but maybe the "m" chip requires a Bascom setting I am not using? Or could I have stumbled on a bug in Bascom? In any case the chip is okay and the programmer works okay with avrdude. Any thoughts will be most appreciated. Thanks!

Gary
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Mon Feb 27, 2012 9:17 am    Post subject: Reply with quote

Gary

I have been using 32M1's for quite a few months now, never had any issues with Bascom or
Programming. (I use AVR ISP MKII which works fine). If it's working with Avrdude then
may be it's just a matter of playing with the 'Port Delay' settings under the Programmer tab.

_________________
Peter
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Mon Feb 27, 2012 1:37 pm    Post subject: Reply with quote

Many thanks, Peter! I've tried all whole number integers 1 to 10 then 10, 20, 20 ... 100, 200, 300 ... 1000, etc., for the port delay, still with no luck. And this in two different computers.

Gary
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Tue Feb 28, 2012 9:50 am    Post subject: Reply with quote

Gary

Don't pull any more hair out!, I went and got my STK-200 out and tried to program
my Atmega32m1 and it failed too! (I got Difference at 0000). I then connected it to an Atmega8
and it worked fine. Apart from using another programmer you may have to email Mark
and see if he can figure something out.

_________________
Peter
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Tue Feb 28, 2012 1:40 pm    Post subject: Reply with quote

Thank you, thank you Peter! Indeed, I was pulling my hair out ... and I don't have too much to pull!! I now see it could be a general problem, and not just an idiosyncrasy at my end. I really had tried everything under the sun that I know of but, still, as you said, the "Difference at 0000" has been the result. I noticed that Mark has checked into this thread, so maybe he'll check back. If not I'll email him. The ATmega32m1 is such a novel chip--with its DAC, etc.--that it may be worthwhile trying to figure out what is going on for the sake of future users. Again, thanks for the thoughtfulness and time it took to check this out on the STK-200, Peter, much appreciated!

Gary
Back to top
View user's profile
PeterM

Bascom Member



Joined: 09 Jun 2008
Posts: 118

australia.gif
PostPosted: Fri Apr 20, 2012 8:34 am    Post subject: Reply with quote

Gary

Any luck (did you contact Mark) or did you buy another programmer ?

_________________
Peter
Back to top
View user's profile
jgsparks

Bascom Member



Joined: 25 May 2007
Posts: 19

usa.gif
PostPosted: Fri Apr 20, 2012 11:06 pm    Post subject: Reply with quote

Greetings Peter,

I did send an email the first of March, but there has been no answer. So I had no choice but to give up on the project. At the moment the cost of another programmer is outside my budget. Many thanks for your kind interest.

Gary
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AVR All times are GMT + 1 Hour
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum