ATMEGA16L substitute, and prog services:

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

I use an ATMEGA16L-8AU (package=TQFP44) in my product that we buy and have mass programmed with our bootloader from Avnet. I just placed an order for 500ea with them and they came back with a lead time of 16 to 18 weeks. (I'm lights out in four weeks) The rep said they have zero blank devices on hand, but she is checking on the reason for the delay, such as obsolescence. Meanwhile but I would like to ask the community here if they know of a later version of the ATMEGA16 I can swap in using the exact same bootloader image and firmware. Question 2: Avnet has done a great job programing the devices, but whenever I order, I do knot know what to expect in terms of pricing and lead time. Any suggestions on a more down to earth component distributor who programs and caters to small niche product manufacturers ordering 500-ish?

 

Thanks,

 

Dan

Campbell

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

Just a WAG (wild *** guess), but could you possibly substitute a Mega32 in the TQFP44 package for the the Mega16?  It is possible that Avnet has many more Mega32 in this package than they do of the specific Mega16L that you have been using. 

 

In my experience, the firmware for the Mega16 can be loaded into the Mega32 without change.   The internal structure is the same, if I recall (it been five years since I've used the Mega16).   There isn't the RJMP vs. JMP issue for the vector addresses in the way that there is between the Mega8 and the Mega16.

 

Do you have the source code? 

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

Thanks for the reply. Our situation/configuration is as follows: A bootloader image is loaded by Avnet, the chips then go to Thailand for PCBA assembly, then back here for final firmware load. Both pieces of software (bootloader and product firmware) are licensed from an EE who's life has been turned upside down by a horrible, random event, and he is largely unavailable now. Avnet is not going to give me a copy of his bootloader, and no, I do not have his source code. I have an email out to the EE, and another party he worked with. But I am in hopes that Avnet's delay is due to the old part number.

 

Breaking news on this: I found on Atmel's site a notice saying the ATMEGA16L has been replaced by the ATMEGA162. The PDF datasheets for the two devices seem to match. Any idea if the firmware/bootloader will load properly?

 

Thanks,

 

Dan
 

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

The vector tables are different.  The bootloader likely doesn't use interrupts, the app code almost surely does.

 

Many of the I/O registers are in different places, and SRAM is mapped at a different start address.

 

Fuse bytes also differ.

 

I think the m32 is your best bet.  The app code should work fine, but the bootloader will need to be rebuilt for the larger device. 

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

Last Edited: Sat. Mar 4, 2017 - 01:58 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dapeake wrote:
Breaking news on this: I found on Atmel's site a notice saying the ATMEGA16L has been replaced by the ATMEGA162.

 

Would you be so kind as to post a screenshot, or link to this?

 

Jim

 

EDIT:

Why would Avnet NOT give you the bootloader if YOU supplied it to them AND you are their client/customer? And are you loading the firmware from a HEX file and thats all you have?  I find it extremely odd you are the client in all of this and everyone you hired to do this work is holding you hostage.

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

Last Edited: Sat. Mar 4, 2017 - 02:26 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So MUST you have the L version (low power) or it doesn't matter? The Mega16 is an old chip anyway with newer pin compatible device, as pointed out above, most likely being as good for lower power (the P or PA versions).

 

Yes you will need to recompile/twig your code but then you would have many more years of life in your product.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

dapeake wrote:
... ATMEGA16L-8AU ...

I just placed an order for 500ea with them [Avnet] and they came back with a lead time of 16 to 18 weeks. (I'm lights out in four weeks) The rep said they have zero blank devices on hand, but she is checking on the reason for the delay, such as obsolescence.

Avnet appears to have an entire reel of ATMEGA16L-8AU.

Will Avnet partial reel it?

Can Avnet reel-to-program-to-reel?

Can the assembler take reels in-lieu of trays?

Part number : ATMEGA16L-8AUR

https://products.avnet.com/shop/en/ema/atmega16l8aur-3074457345627930789

via

https://octopart.com/search?q=ATMEGA16L-8AUR&avg_avail=(1__*)&start=0

dapeake wrote:
Meanwhile but I would like to ask the community here if they know of a later version of the ATMEGA16 I can swap in using the exact same bootloader image and firmware.
ATMEGA16A

AVR522: Migrating from ATmega16 to ATmega16A

http://ww1.microchip.com/downloads/en/AppNotes/doc8163.pdf

...

The ATmega16A is a functionally identical, drop-in replacement for the ATmega16.

...

http://www.microchip.com/wwwproducts/en/atmega16a

dapeake wrote:
Any suggestions on a more down to earth component distributor who programs and caters to small niche product manufacturers ordering 500-ish?
"Sometime" in the future Microchip may (will?) program AVR.

Might read the Microchip programming FAQ to see if it's a match.

Microchip Direct Logo

microchipDIRECT

Frequently Asked Questions   Programming Center

http://new.microchipdirect.com/FAQMainPage.aspx?catid=1c99a89d-722f-69fd-9699-ff0000260584

Microchip will sell a partial reel if a reel is in-stock; otherwise it's multiples of trays.

Microchip Direct Logo

microchipDIRECT

Frequently Asked Questions   Partial Reeling

http://new.microchipdirect.com/FAQMainPage.aspx?catid=1f99a89d-722f-69fd-9699-ff0000260584

 

P.S.

The post-EOL distributors should have ATMEGA16L-8AU in-stock for quite sometime.

  • Rochester Electronics
  • Ewing Components
  • <what are the others?>

Some of those may program the AVR they stock.

Else, mod the PCB to add AVR ISP SPI; the assembler may mod their test rig to add AVR ISP so they can burn the bootloader (if you have a copy of the bootloader binary)

 


http://www.ewinginc.com/profile.php

 

Edit : microchipDIRECT partial reels

 

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

Last Edited: Sat. Mar 4, 2017 - 02:53 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmdesign wrote:
Would you be so kind as to post a screenshot, or link to this?
http://www.microchip.com/wwwproducts/en/ATmega16

can be compared with

http://web.archive.org/web/20161231172817/http://www.atmel.com/devices/atmega16.aspx

 

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

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

dapeake wrote:
Both pieces of software (bootloader and product firmware) are licensed from an EE who's life has been turned upside down by a horrible, random event, and he is largely unavailable now. Avnet is not going to give me a copy of his bootloader, and no, I do not have his source code.
I am sorry for his loss and pain.

Arrived for a project, was shown the source code, then told that the one who created it had passed on.

Mortal beings we are.

Sometimes an offer can be made for the source code that its creator may accept; better that offer is made immediately after the code is accepted.

Consider becoming organic; iow create source code within the partnership.

If that won't work then buy the source code from the teammate.

Might consider a redesign that's a port from MEGA16L to MEGA324PB; it currently has engineering samples on the MEGA324PB Xplained Pro with quantity arriving maybe this month.

The redesign can be clean room if the source code is not available (iow one starts from the specifications and/or requirements)

 


http://www.microchip.com/wwwproducts/en/ATMEGA324PB

 

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

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

dapeake wrote:
Any suggestions on a more down to earth component distributor who programs and caters to small niche product manufacturers ordering 500-ish?
(if you have the bootloader image)

DIY?

Partners

http://www.atmel.com/about/contact/sales/default.aspx

categories pull-down, Third Party Support - AVR

expertise pull-down, Programmers

 


http://www.rpmsys.com/avr_programmer.htm

 

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

Last Edited: Sat. Mar 4, 2017 - 04:28 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dapeake wrote:
I found on Atmel's site a notice saying the ATMEGA16L has been replaced by the ATMEGA162.

I find that very hard to believe.

 

Do your comparison with ATmega16A.  Probably an app note on that. http://www.atmel.com/Images/doc8...

 

While the bootloader etc. might well drop in, I'd get a couple and do some trials before doing the full monte.

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

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

theusch wrote:
While the bootloader etc. might well drop in, I'd get a couple and do some trials before doing the full monte.

I guess you missed the part in POST#3 where Avnet will not give him the bootloader, and the EE that is licensing the code and bootloader is not available anytime soon.  So I don't know about you, but I think the OP has hit the point of S.O.L.

 

JIm

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

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

So what do we know about the bootloader? When code is being delivered to it what PC tool is used and what's the invocation? There has to be a chance that it's a standard protocol like AVR109 or STK500v2 or something like that.

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

OP here again. Thank you for all of your wonderful comments, advice and links.

 

>The post-EOL distributors should have ATMEGA16L-8AU in-stock for quite sometime.

 

 I will check with these companies. (That approach hinges on Avnet accepting chips supplied by a non-Avnet party)

 

>Why would Avnet NOT give you the bootloader if YOU supplied it to them AND you are their client/customer?

 

The licensing arrangement used Avnet as a spigot: the rights holder, the EE, could easily protect himself from runaway unauthorized reproduction by contacting Avnet, identifying himself, and requesting the file be deleted. It is very unlikely, however that Avnet would give even the EE a copy of his own file out of concern over the cost of rights holder verification and the repercussions of mishandling of intellectual property. If I ran Avnet, I would have a strict one-way-trip policy - IP comes in, but never out. i am going to lean on Avnet to release the file, or find a supply or substitute chip. BTW: the Avnet rep has no idea what the long lead time is about. I am still pressing her to find out - she sounds like a freshly minted liberal-arts grad - this is going to be work.

 

Thanks,

 

Dan

 

 

 

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

jgmdesign wrote:
I guess you missed the part in POST#3 where Avnet will not give him the bootloader,

I don't get it.  Avnet will "give" him the bootloader -- i.e. provide Mega16L chips with it installed.  But >>will not<< do it for the drop-in Mega16A?  But >>will<< on the ridiculous suggestion of Mega162?

 

This seems like the "alternative facts" and "post truth" being bandied about in some circles.

 

Did OP look at the '16A datasheet and the migration note for possible differences?  Heck, I'm too lazy to look but it might even have the same signature.

 

 

 

 

MicrochipDirect shows stock of over 200000 pieces.  So your particular distributor has chosen to not stock that particular obsolete model?

 

 

 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Sat. Mar 4, 2017 - 08:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dapeake wrote:
(That approach hinges on Avnet accepting chips supplied by a non-Avnet party)

dapeake wrote:
... but whenever I order, I do knot know what to expect in terms of pricing and lead time.
May be what Avnet does is buy, trade, offset, or credit/debit to obtain what a customer needs.

An implication from the Octopart data is Avnet is risk adverse for some AVR whereas other distributors are not; also, Rochester Electronics appears to be buying EOL and NRND stock from some distributors.

dapeake wrote:
... or substitute chip.
... or substitute bootloader?

Could burn a generic bootloader onto a production board, attempt burn of the app via the matching generic loader, then a test; a risk is loss of a production board but might be able to run this test on a STK500 or STK600.

That idea won't fly if there are functions in the bootloader that are invoked from the app; a possibility due to trying to squeeze as much functionality as possible into 16KB of program space.

dapeake wrote:
I am still pressing her to find out ... this is going to be work.
Maybe not so much.

I must of made a mistake yesterday for noticed today that Microchip has stock in trays and reels :

http://new.microchipdirect.com/ProductSearch.aspx?keywords=ATMEGA16L-8AU

Forgot that another avenue for EOL or NRND parts is from distributors back to the manufacturer.

 

P.S.

dapeake wrote:
... - she sounds like a freshly minted liberal-arts grad - ...
There's nothing like jumping into the deep end of the pool wink

I hope she's receiving education, training, and mentoring for she is practicing.

That might be a micro indicator of good health (Avnet, customers, manufacturing)

If it's classic supply and demand we're in for good health with some turbulence (that's common)

 

Edits : NRND, generic loader

 

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

Last Edited: Sat. Mar 4, 2017 - 10:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
jgmdesign wrote: I guess you missed the part in POST#3 where Avnet will not give him the bootloader, I don't get it. Avnet will "give" him the bootloader -- i.e. provide Mega16L chips with it installed. But >>will not<< do it for the drop-in Mega16A?

 

What the OP wrote:

dapeake wrote:
Avnet is not going to give me a copy of his bootloader, and no, I do not have his source code.

Which tells me that the EE may have an agreement with Avnet where the EE has Authorized the OP to be able to buy the AVR's with the EE's bootloader in them only.  From the way I read it the OP requested a copy of the bootloader from Avnet and they said NO.

 

Jim

Edit...spelling faux pas

If you want a career with a known path - become an undertaker. Dead people don't sue! - Kartman

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

Last Edited: Sun. Mar 5, 2017 - 01:59 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

EE may have an arraignment

Isn't that a layer or police thing? ...or maybe just a helpful auto complete which is likely to start WW3...

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

jgmdesign wrote:
Which tells me that the EE may have an agreement with Avnet where the EE has Authorized the OP to be able to buy the AVR's with the EE's bootloader in them only.
jgmdesign wrote:
I don't get it. Avnet will "give" him the bootloader -- i.e. provide Mega16L chips with it installed. But >>will not<< do it for the drop-in Mega16A?

Still doesn't sound right.

 

OP still has a little bit of time to poke about.  In all probability, if the proper question is asked of the right person, a flat of '16A programmed as needed will appear in due time.

 

It sounds like OP's organization has a working relationship with that distributor.  IME those distributor contacts will bend over backwards to continue the relationship, and try to help with any reasonable requests.

 

Indeed, things are probably complicated with the demise of Atmel and loss of the technical and sales support network.  [hmmm -- perhaps Avnet and the new owners don't have much of a relationship, or something like that.  then OP is indeed caught in the middle]

 

I'd still like to know more about this recommendation of the Mega162 alternative.  The mention of it adds further weight that the right person isn't being asked the right question, as it is ridiculous on the face of it.  Somewhere along the line between the question and the response received by OP, "Atmega16A" changed into "ATmega162".  Not realizing that those are apples and oranges, to me, gives further credence that there is a reasonable path to take here if only those involved would look at the street signs.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Sun. Mar 5, 2017 - 02:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jgmd..
>EE has Authorized the OP to be able to buy the AVR's with the EE's bootloader in them only.

Yes, that is the case. Gchapman's suggestion (use an generic bootloader) gives hope. However, I would imagine the EE tweaking an existing bootloader just enough to foil that plan.

 

jgmd..
>I'd still like to know more about this recommendation of the Mega162 alternative

Apologies - my mistake: I think I glossed over the L, visiting Avnet.com's parametric search, I came to this page.  
http://www.microchip.com/wwwprod... - sorry for the head scratching.

 

BTW, Our Circuit:
Vcc is 3.3v. Clock is 7.37mhz

gchap..
>Could burn a generic bootloader onto a production board...

Is it possible to erase/write a bootloader through the JTAG in circuit? A simple (optional) QC process is built into our boot loader for the Thai PCBA house, so I know it is custom, but that may be the extent of the customization. I have a JTAG programmer in a drawer somewhere and can try this rather easily. Does anyone have a lead on where I can find a generic bootloader image?

 

gchap..

>Octopart...

Great resource. Thanks for mentioning that.

theu..
Do your comparison with ATmega16A.  Probably an app note on that. http://www.atmel.com/Images/doc8... While the bootloader etc. might well
drop in [16A], I'd get a couple and do some trials

Thanks for the transition advisory document link. Just minor current consumption changes. I did check Octopart and the A is actually less abundant than the L. but it is good to have an option. the quarter million parts held at Microchip/Atmel, suggest current production - that seems like a lot.

 

Sorry guys for the apparent denseness - I am a marketing-centered entrepreneur/ME with light digital electronics and assembly language in my background. e.g. I had no idea Atmel no longer exists or that Microchip is now running the Atmel line!

 

I greatly appreciate the patience and excellent input. Thanks to all of you, the fog is lifting!

 

Dan

 

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

Does anyone have a lead on where I can find a generic bootloader image?

There really isn't any such thing.  The only commonality in all bootloaders is that they write to flash and/or EEPROM.  How and where they get the image is particular to each bootloader.  Some use an SD card to store the image.  Some use a USART interface (Arduino).  Some use a Bluetooth link.

 

Beyond the interface, the particular protocol used by the bootloader to talk to a host can vary widely.  Many emulate (a subset of an) existing protocol like AVR109, or STK500.

 

Before answering that question you'd need to tell us at least a little about how your current bootloader works.  How do you communicate with it?

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"Read a lot.  Write a lot."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

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

dapeake wrote:
Is it possible to erase/write a bootloader through the JTAG in circuit?
Maybe

The JTAG enable fuse is default JTAG enabled but

http://www.atmel.com/products/microcontrollers/avr/megaavr.aspx?tab=documents

...

ATmega16(L) Complete
(file size: 7482304, 357 pages, revision T, updated: 07/2010)

http://www.atmel.com/Images/doc2466.pdf

(bottom of page 260)

5. If the JTAG interface is left unconnected, the JTAGEN fuse should if possible be disabled. This to avoid static current at the TDO pin in the JTAG interface.

dapeake wrote:
A simple (optional) QC process is built into our boot loader for the Thai PCBA house, so I know it is custom, but that may be the extent of the customization.
If use of JTAG to toggle mega16L pins is the optional QC process then JTAG is probably enabled.

dapeake wrote:
I have a JTAG programmer in a drawer somewhere and can try this rather easily.
If somewhere turns into nowhere then AVR ISP SPI is the alternate (a near plethora of AVR ISP) or obtain an Atmel-ICE debugger (complete kit has the adapter with an AVR JTAG connector)

AVR ISP SPI signal, port pin, QFP package lead

  • MOSI, PB5, 1
  • MISO, PB6, 2
  • SCK, PB7, 3
  • RESETn, , 4
  • VCC, , 5
  • GND, , 6

An STK500 or STK600 would make it easier to jumper and switch in-lieu of patching a production board.

Likewise if want to bench test a mega16A before committing to qualifying a change order.

dapeake wrote:
the quarter million parts held at Microchip/Atmel, suggest current production -
... with a lead time of about 4 months.

http://new.microchipdirect.com/ProductSearch.aspx?keywords=ATMEGA16L-8AU

The probability of failure (mega16L non-availability) is low (in production, stock is "high") and the consequence of the failure is low (mega16A as alternate, 12 months to enter EOL, possible LTB); therefore the risk is low so status quo.

Recommendations :

  • periodically evaluate mega16L stock and lead time
  • sign up for Microchip PCN on mega16L

dapeake wrote:
I am a marketing-centered entrepreneur/ME with light digital electronics and assembly language in my background.
You have what it takes to either port to another AVR or to specify for other ones to do the port.

dapeake wrote:
Sorry guys for the apparent denseness ... e.g. I had no idea Atmel no longer exists or that Microchip is now running the Atmel line!
You're not dense though looks like you just walked out of a cave wink

 


Microchip Technology Inc

Microchip

Product and Process Change Notification (PCN) and End-of-Life (EOL) Notifications

FAQs

http://www.microchip.com/pcn/faqs

Can I register to receive notifications for all, current and future, device families? (expand)

...

Please note: If you opt to select specific devices ...

...

http://ww1.microchip.com/downloads/en/Quality_ReliabilityDocs/EOLpolicy0809179.pdf

Product Life Cycle / End of Life

...

... which provides a 12 month window from EOL notification until final delivery of product.

...

Final Notice: Implement Microchip Part Aging Policy, Label and Packing Changes for Atmel Products.

September 5, 2016

http://www.atmel.com/Images/SC163003A%20-%20Implement%20Microchip%20Part%20Aging%20Policy%2C%20Label%20and%20Packing%20Changes%20for%20Atmel%20Products.pdf

via

http://www.atmel.com/about/quality/pcn-eol/pcn-eol-notifications.aspx

 

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