| Author |
Message |
|
|
Posted: Sep 22, 2011 - 11:13 PM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
Hmm... I think I have an Issue.
I have a board that I have been running a '168 on for a while. I decided to add some features, but had NO memory left....so...I opted to bump up to the 328.
(an ATMEGA328-AU to be exact......)
anyway, I am running AVR Studio 4.18, build 684.
and WinAVR-20100110
It has NO selection for a '328....only for a 328P.
I also only have the STK500 project board.
well, me...only having ONE option...took it.
the compiler hated that choice, and the signature bytes don't match...and the chip doesn't work.
(i did try to program it anyway..... call me stubborn)
anyhow....does support exist for the 'standard' 328 in AVR Studio 4.18??
If I hafta purchase a programmer that AVR studio 5 supports, and use that compiler....I will.
any thoughts???
Thanks, Buds!
-Steve |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 12:05 AM |
|

Joined: Nov 28, 2004
Posts: 3552
Location: San Diego, Ca
|
|
Check again, you may be missing it on the list ( In the release notes for all 3 Sps, none mention m328. So it must come with studio... ? ) Anyway, 4.18 with SP2 has it so install that, if you need to. You won't find it anymore on Atmel site, but get it here it's good:
http://myweb.msoe.edu/~mossbruc/atmel.html
You don't have ANY SPs installed, so you have to do SP1 1st from what I've read here. |
_________________ 1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 12:38 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
My AVR Studio is showing SP3.
(and, I reviewed the list many times...I couldn't find it.
:-/ |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 12:41 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
BUT.....you do list Version 4.18 build --700--
my build is 684....so, maybe that is the ticket!! |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 12:41 AM |
|

Joined: Nov 28, 2004
Posts: 3552
Location: San Diego, Ca
|
|
| build 684 isn't SP3, you're reading the SP of your OS probably. build 700 => SP1 and build 716 => SP2. |
_________________ 1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 01:29 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
OK,I can't seem to get the SP2 file to install to bring me to '716'.....
otherwise, the files you listed installed OK.
(and..the SP1 file as well....)
AVR Studio 4.18.700
GUI Version 4, 18, 0, 685
Operating System
Major 5
Minor 1
PlatformID 2
Build 2600
Service Pack 3
Plugins:
AvrPluginAvrAsmObject 1, 0, 0, 48
AvrPluginavrgccplugin 1, 0, 0, 11
Stk500Dll 1, 0, 1, 15
Reviewing this installed version..the 328 is still not listed.
(aaarrrghhhh....)
wow....guess I am a pain, eh?! |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:38 AM |
|

Joined: Jun 19, 2002
Posts: 957
Location: SF Bay area
|
|
|
Quote:
It has NO selection for a '328....only for a 328P.
I don't think anyone has been able to figure out how those differ form each other. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:44 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
Well, 'westfw'...the compiler sure seems to know the difference. :-/
it complains that all of the Interrupt vectors are wrong, and a few other items.
the STK500 does also...the signature doesn't match. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:36 AM |
|

Joined: Nov 28, 2004
Posts: 3552
Location: San Diego, Ca
|
|
|
Quote:
wow....guess I am a pain, eh?!
More like the software tools .
What error msg. do you get when trying to install SP2 ? I installed it from that site , no problem ( just sayin', it works ). Maybe a reinstall of 4.18 and the SPs ( last resort )... ?
What OS do you have ? XP, I guess as your OS numbers are same as mine. |
_________________ 1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:52 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
Well, bud...I am XP, with SP3.
I actually un-installed my 4.18, installed the one from your link...and then ran the SP2 package that was there as well.
I STILL get no listing for a ATMEGA328....
dangit!!!
I did download the AVRStudio5.0.1163 FULL.
(Several HOURS....geeeeez!!!)
I installed it, and YES...it has the MEGA328.
but...NO, it will not support the STK500 with that CPU.
it DOES support the STK500, but only with selected micros.
(that STINKS!)
..oh, and side-note....Version 5 is SUPER slow...and looks a lot like a Microsoft product....very bloated.
SO, I guess I am back to trying to get this 328 (STANDARD) supported by the old reliable 4.18 of Studio......
I do have all 3 of those files from your link.
but, they don't seem to give me the 'option' I want.
but, ur doing great!.... |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 05:17 AM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
UPDATE:
Downloaded the final release of AVR Studio 4.19.
it does have the MEGA328, and I thought I was out of the woods....but....now, I have a 'new' problem.
gcc plug-in: No AVR Toolchain installation found. The AVR GCC plug-in can still be used if you set up your own build tools.
arrrgghhhh.... |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 06:07 AM |
|

Joined: Nov 28, 2004
Posts: 3552
Location: San Diego, Ca
|
|
| Latest Winavr works with 4.19, which is just 4.18 with Sp1-SP3, out the box. That version of Studio has enough significant bugs that I uninstalled and went back "home". YMMV. |
_________________ 1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 11:12 AM |
|


Joined: Mar 28, 2001
Posts: 20390
Location: Sydney, Australia (Gum trees, Koalas and Kangaroos, No Edelweiss)
|
|
I get BOTH the M328 and M328p with the Dragon as programmer/debugger, only M328p for winAvr. (V4.18 B700)
edit just checked with the STK500 and BOTH the M328 and M328p appear. |
_________________ John Samperi
Ampertronics Pty. Ltd.
www.ampertronics.com.au
* Electronic Design * Custom Products * Contract Assembly
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 11:17 AM |
|

Joined: Nov 02, 2009
Posts: 3239
Location: Zelenograd, Russia
|
|
| From the compiler's point of view both -P and non-P chips are exactly the same, so I really can't see a reason of the whole thread. |
_________________ Warning: Grumpy Old Chuff. Reading this post may severely damage your mental health.
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 02:35 PM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
if they were exactly the same, then I don't understand WHY support was added to the compiler at a later revision for the non-p version.
Currently, with a -P version selected, the compiler issues warnings, and it has no option for selecting the correct chip so that the signature will be correct.
btw, MBedder, the reason for the whole thread is because a person has issues/questions...and is seeking guidance and assistance. Sharing of knowledge, and learning...... I believe that is what this is all about.
I appreciate every ones input. I may not have fixed this problem yet, but...I have learned many other items in the process. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:40 PM |
|

Joined: Feb 12, 2005
Posts: 16324
Location: Wormshill, England
|
|
As a general rule, your Compiler will produce exactly the same code for a mega328 as a mega328P.
The Studio tools will look in the XML files in the PartDescriptions directory. They will use the Signature from there. So all you have to do is copy the ATmega328P.xml file to a new "ATmega328.xml" file.
Change the Signature entry with an XML editor. (or even NotePad)
I cannot understand why anyone would choose to buy a 328 when the 328P is available.
David. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:47 PM |
|


Joined: Jul 18, 2005
Posts: 62354
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Guess what:
AVR-LibC io.h wrote:
Code:
#elif defined (__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
# include <avr/iom328p.h>
Exactly the same SFR/vector definition used for both - so clearly they are binary compatible. |
_________________
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 03:54 PM |
|


Joined: Jul 18, 2005
Posts: 62354
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
Even more interesting is to compare the two XML files in Studio's PartDescriptionFiles. It's a bit complicated by the fact that one file is ordered slightly different from the other but the REAL difference is:
Code:
<!-- <BIT6>
<NAME>BODS</NAME>
<DESCRIPTION>BOD Sleep</DESCRIPTION>
<TEXT/>
<ACCESS>RW</ACCESS>
<INIT_VAL>0</INIT_VAL>
</BIT6>
<BIT5>
<NAME>BODSE</NAME>
<DESCRIPTION>BOD Sleep Enable</DESCRIPTION>
<TEXT/>
<ACCESS>RW</ACCESS>
<INIT_VAL>0</INIT_VAL>
</BIT5> -->
Note the <!-- --> commenting of that? For 328 it's commented by hand, for 328P it isn't. Clearly they got BODS wrong in 328 so re-issued it as 328P with BODS fixed. |
_________________
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 04:21 PM |
|

Joined: Nov 17, 2004
Posts: 13849
Location: Vancouver, BC
|
|
|
Quote:
I don't think anyone has been able to figure out how those differ form each other
From the datasheet:
Quote:
BODS and BODSE only available for picoPower devices ATmega48PA/88PA/168PA/328P
Because of this, (and maybe other things), the signature bytes are different. It also means that these bits may not be defined for the compiler when using the mega328. The signature difference does not make a difference to the compiler, but it certainly does to the programmer. |
_________________ Regards,
Steve A.
The Board helps those that help themselves.
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 04:32 PM |
|

Joined: Dec 03, 2010
Posts: 70
|
|
WOW...guys...this has all been GREAT to read.
You folks definitely make me feel like a complete bozo!
(not in a bad way...it's just amazing how little I really know about this stuff!!)
anyway....I did finally 'fix' the issues.
1.) I downloaded and installed AVR Studio 4.19
2.) I discovered that it 'defaults' to using 'AVR ToolChain'..which, as it turns out...I didn't have.
3.) I popped up the configuration for that, de-selected the toolchain checkbox, and then pointed AVR Studio 4.19 to utilize the WIN-AVR files.
(i.e.... avr-gcc, and make.exe in the WIN-AVR directories.....)
4.) Selected the 328 as listed for the desired CPU...
5.) discovered that the Interrupt Vectors are defined differently, so...edited my .C file to match.
6.) POW....it all works.
NOTE: I do apologize for all the banter. I also apologize for ordering a 'standard' 328, instead of a -P model! :-/
I had no idea I would encounter these issues.
BUT...this really HAS been a great learning experience!
The BEST part is.....this all gets stored for the next poor soul that discovers this situation!
I LOVE this place.  |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 04:32 PM |
|


Joined: Jul 18, 2005
Posts: 62354
Location: (using avr-gcc in) Finchingfield, Essex, England
|
|
|
Quote:
(and maybe other things)
Nope, comparing the XMLs it seems that is the ONLY difference.
This does kind of raise the question as to why, if 328Ps were the only chips being sold why are there now 328s appearing on the market? It's either that Atmel decided to start production of the version with the faulty BODS after all or more likely (perhaps?) they'd originally made a load of 328's for some customer who's switched to 328P and Atmel have a load of the faulty ones they just dumped into distribution? |
_________________
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 04:42 PM |
|


Joined: Nov 20, 2009
Posts: 251
Location: Virginia
|
|
DigiKey seems to have plenty of the plain 328's here in the Colonies, with the Dip package being the exception with no stock
[quote="clawson"]
Quote:
(and maybe other things)
This does kind of raise the question as to why, if 328Ps were the only chips being sold why are there now 328s appearing on the market? ?
|
_________________ Gary - W4GNS
Tel: BR549
In my many years I have come to a conclusion that one useless man is a shame, two is a law firm and three or more is a congress. -- John Adams
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 05:08 PM |
|

Joined: Feb 12, 2005
Posts: 16324
Location: Wormshill, England
|
|
The mega328P has a SIGRD bit. This does not work on my mega168, so I suspect that the mega328 has no SIGRD bit either.
In practice the two chips are interchangeable. However if you want to sleep with really low current consumption, the picoPower part is best.
I find it difficult to understand why the mega328 appeared after the mega328P. I would guess that they have the same die size, so why should they complicate their product inventory?
I suppose that the proud owners of the mega328 could try a few mega328P features e.g. BODSE, SIGRD, ... . If they work, it may be that Atmel had a lot of reject wafers, and decided to invent a new part number. I am assuming that Atmel are capable of altering the Signature row after wafer testing.
David. |
|
|
| |
|
|
|
|
|
Posted: Sep 23, 2011 - 05:28 PM |
|

Joined: Sep 26, 2004
Posts: 78
Location: Stirling, UK
|
|
One thing I've noticed is that the 88P will wake from sleep mode with an edge triggered INT0 interrupt (contrary to the datasheet), where the older 88 does not..
I only found out due to not paying enough attention to the datasheet, and then re-using code from a 88P project on a 88, but the 88P has been running happily that way for a couple of years on a hobby project here.. |
|
|
| |
|
|
|
|
|
Posted: Sep 27, 2011 - 02:04 AM |
|


Joined: Sep 04, 2002
Posts: 21272
Location: Orlando Florida
|
|
| Welcome Mr Colt. Fill in your city and state in your profile. Freaks near you might want to have a get together. (You in Florida by any chance?) |
_________________ Imagecraft compiler user
|
| |
|
|
|
|
|