Replacing an Atmel 90S1200 - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: November 30, 2022, 08:43:08 pm
content: I have a product in production, since 1997. It uses the 90S1200, SOIC-20 package.http://ww1.microchip.com/downloads/en/devicedoc/doc0838.pdfThe function is simple:- wait for an input to go 0 to 1 (interrupt; wakes up the CPU)- set an output pin- read a 4 bit dipswitch, calculate a timer delay- run the timer,- reset the output pin- go to idle modeThe reason for the sleep is to reduce power, because I am running the chip with a 4MHz ceramic resonator (PBRC-4.00AR AVX). The oscillator runs all the time though, IIRC.So, a very simple job. It was written in AVR assembler, assembled with a batch file under DOS. We production program the boards with an AVR programmer:http://www.equinox-tech.com/products/details.asp?ID=370The 90S1200 went on a last time buy 10+ years ago and I bought loads then, £0.50 eachLater I went to redesign the board with the supposed replacement, the 8313, only to find Atmel dropped it by the time I got around to it. I think they may still do it in some tiny package. I still have enough 90S1200 for a year or two but ought to look at a redesign. The trouble with Atmel is that by then they will drop whatever chip I go forCan someone recommend a cheap chip which is likely to be around for many more years, draws low power like the 90S1200 (2mA active, 0.4mA idle), runs off 5V, and isn't BGA? I am not using the EEPROM and in fact the 90S1200 had corruption issues there (1st location only, IIRC). It also needs to be easy to "get into"; I don't want something weird.The 90S1200 needs an external reset controller and I am using one of the Seiko SOT-23 chips to do that. That costs another 30p or so, and it is silly; the CPU ought to have a robust power-on reset internally.The timer calculation (shortest time delay is 100us) needs to be accurate to 1% so internal RC oscillators are marginal at best.Many thanks for any pointers.

author: Warhawk
author_rank: Frequent Contributor
timestamp: November 30, 2022, 10:03:00 pm
content: Could you maybe use an LDO to 3.3V if you could drop the external reset circuitry?Btw: PIC16F84 is still available and started in 1996. I think using one of the new Microchip PICs is the most practical solution. I assume they won't obsolete something they have just released.

author: Kleinstein
author_rank: Super Contributor
timestamp: November 30, 2022, 10:20:15 pm
content: If it should be an AVR the ATtiny20 or Attiny24 would be likely OK. Ideally get a layout that can use both types - I think this should work.These type are relatively popular though already relatively old. Even if they run out, chances are new chips would use a similar pin-out.For some strange reason the tiny204 and similar don't seem to support an external crystal, which is a bit anoying.Chances are the 2 kB version should be large enough even when writing the program in C.If low power is relevant and a lower clock is OK I would reduce the clock, e.g. a 533 kHz resonator or even a 32 kHz watch cystral.Chances are they would still have the classic errata of not haveing the internal caps working.A reduced voltage (e.g. 3 V) also helps.With a very new chip one never knows if that type really gets popular, if not it may as well disappear fast. However chances are the case / pinout would follow some common pattern.

author: MikeK
author_rank: Super Contributor
timestamp: November 30, 2022, 10:21:38 pm
content: Microchip doesn't seem to retire old PIC's; they just get more expensive. I have no idea about Atmel chips, but the 5-digit 16F PIC's are the latest (16F18xxx, 16F19xxx).

author: Ian.M
author_rank: Super Contributor
timestamp: November 30, 2022, 10:45:46 pm
content: Also, look at the timing accuracy required. The internal oscillator in many newer MCUs is now accurate enough for many interval timing applications. e.g. Microchip PICs with calibrated oscillators that can hold better than 1% accuracy at nominal voltage and room temperature, and no worse than 2.5% over their full voltage range and extended temperature range have been available for a decade or so now. If that's good enough, you should also be able to eliminate the resonator.

author: wek
author_rank: Frequent Contributor
timestamp: November 30, 2022, 11:19:20 pm
content: >supposed replacement, the 8313,You mean, AT90S2313?>only to find Atmel dropped it by the time I got around to it.Yes, but that in turn has a replacement, too, ATTiny2313. And that's still in production (and has a newer version, too, with A suffix but the difference is small as it's mostly just a shrink).Atmel/MCHP has migration documents.JW

author: westfw
author_rank: Super Contributor
timestamp: November 30, 2022, 11:28:22 pm
content: Isn't there still a pin- and nearly code-compatible ATtiny2313A being manufactured and sold? (not particularly cheap, though.)QuoteThere is no more "Atmel."Microchip tends to be better than many vendors at continued manufacturing of old chips. (You can still buy PIC16C54s!) (At least historically; who knows how the current fabrication meltdown is going to affect such strategies.)Which chips are likely to stick around in "common" sales channels at low prices is harder to predict.What about packages "in between" SOP and BGA? A lot of the new chips seem to come in QFN packages.I'd be looking at the new "xTiny" chips (ATtiny406, ATtiny416, ATtiny426 would be the 20pin versions. (may require external oscillator - no HS crystal osc on chip (32kHz, though.))) Or maybe the new AVR-DD series.These were released post-acquisition, so I'd somewhat expect them to be more "favored" going forward.(All are serious overkill for your application, of course :-( )

author: james_s
author_rank: Super Contributor
timestamp: November 30, 2022, 11:48:19 pm
content: Isn't the attiny2313 still made? That should be a nearly drop in replacement. Newer AVRs have much more robust reset, there is no need for a separate controller.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: December 01, 2022, 03:22:51 am
content: Quote from: peter-h on November 30, 2022, 08:43:08 pmSOIC-20 is very large, and something of a fading package in 2022.The most common 20 pin gull wing package would be TSSOP20, but you can get some MCUs in SO16N and SO14NQuote from: peter-h on November 30, 2022, 08:43:08 pmThe 1% is interesting, that is in the ballpark of modern RC oscillators, what temperature range do you need that over, and can you accept post-assemble calibrate check ?The trim-step on most MCUs on chip OSC, is well under 1%Parts like Silabs EFM8BB52 are likely to be available for along time, and they have good RCOSC specs, but that part lacks a Xtal osc.A trend these day on smallest MCUs was to drop XTAL oscillator, as the on board RC osc is good enough for UARTS, tho I see some add-back the xtal choice on 20 pin parts.Some offer 32Khz Xtal osc and auto-calibrate the RC osc from that.Quote from: peter-h on November 30, 2022, 08:43:08 pmMost new MCU should be able to manage the POR internally.Quote from: peter-h on November 30, 2022, 08:43:08 pmIf TSSOP20 package is ok, you could look at the '003' pinout standard, and in that family, with English dataand a Xtal Osc, would be theNuvoton MS51FC0AE - stocks showing at Digikey and lcscI notice not everyone has the Xtal on the same pins, with that '003' pinout, but a PCB option can cover that ?If you want to keep the older SOP20-300 package, and even layout, you could trial the older but still available AT89LP2052 ? IIRC the reset flips but the pins otherwise are the same.STC did 2052 pinout version in their older STC12C5xx series, tho I see their upgrade to that family, the STC12H series, favours TSSOP20 and TQFP32 packages, so you can see the SOP20 fading in use.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: December 01, 2022, 03:31:56 am
content: Quote from: james_s on November 30, 2022, 11:48:19 pmFor some values of still made...Website says this for the SOP20 version : ATTINY2313-20SURAvailable To Order Order now, estimated to ship on04-Mar-2024No, wait, the ATTINY2313A-SUR showsAdditional Stock Arriving. Order Now to Secure 6,000 estimated to ship on 22-Feb-2023 Lead Time For Additional Quantities Additional quantities estimated to ship by 23-Dec-2023and the price is quite high, especially for a part with just 2k code.

author: amyk
author_rank: Super Contributor
timestamp: December 01, 2022, 03:56:43 am
content: PIC12F510?

author: james_s
author_rank: Super Contributor
timestamp: December 01, 2022, 04:10:08 am
content: Quote from: PCB.Wiz on December 01, 2022, 03:31:56 amThere's a global chip shortage, the dates are not too surprising.It's an old part, you're paying for the compatibility with existing designs, not the code space.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 08:04:19 am
content: QuoteYes that was the one.I can use a smaller package but not BGA.I see a ATTINY2313A-MU showing stock at Farnell at ~£1 for 500+ so should be a lot less via distribution. The big Q is how long will this one last? Most of the 2313 family was discontinued years ago.Does it still have a simple DOS-compatible assembler?Is RESET implemented with a proper threshold? The data sheet states min 0.2V max 0.8V so probably not, but it does say it has "brownout hysteresis".

author: james_s
author_rank: Super Contributor
timestamp: December 01, 2022, 08:24:24 am
content: I don't know what the threshold is, but I've always just left the reset pin floating with the attiny and atmega chips and never had an issue.

author: westfw
author_rank: Super Contributor
timestamp: December 01, 2022, 08:28:08 am
content: QuoteDigikey shows qfn, vqfn, soic, and dip as "active" products. They even have stock of some of the qfn and dip.QuoteNo one here can answer that. I would guess that, as the last pin-compatible replacement for the original ("90S") AVRs, it's likely to last for a long time. You're not the only one with old designs.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 01:47:09 pm
content: I am going to get a quote for 5k x ATTINY2313A-MU.I am OK for a couple of years with existing stock (so should really wait for this bubble to burst) and getting 5k of the above will take care some distance into my old age

author: nctnico
author_rank: Super Contributor
timestamp: December 01, 2022, 02:39:59 pm
content: Beware the ATTINY2313A has silly low voltage level thresholds and poor noise margin. In a design I inherited, that caused trouble during immunity testing. Don't know if they like to be run over 5V. Another problem I ran into is that the ATTINY2313A didn't like to run from 1.8V (read the fine print!) so at the high end of the voltage range you may run into maximum ratings.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 02:52:38 pm
content: I am indeed running at 5V.There are two parts which are probably best future proof wise: the MMH and MU, and their MMHR and MUR 6k/reel versions which even Farnell lists at 89p.The power consumption is much lower than the 90S1200.Funny that the SOIC versions, which most would go for as a 90S1200 replacement (which existed only in SOIC), cost a lot more. A bit of predatory pricing thereBut the pinouts are not compatible anyway.Immunity (ESD discharge) is better done with capacitors to GND, IMHO.The MU is cheapest at £0.60 (5k) which is not bad going since I was paying £0.50 15 years ago for the 90S1200.

author: nctnico
author_rank: Super Contributor
timestamp: December 01, 2022, 04:49:31 pm
content: Even with capacitors to ground, it was problematic. Immunity is not just ESD but all kinds of externel influences like strong electric fields. I would not recommend to have an external wire connected to an ATTINY device directly. Vih is ballpark 0.7V IIRC. Something like a buffer with a schmitt trigger (which decent microcontrollers have built in) is much more reliable.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 08:39:17 pm
content: QuoteSure; that would be nutsMy view on ESD is that you have no control over whether the spike will be 0.5V or 5V or 50V; the selection of which one you will get will depend on very slight differences in the setup. And the 3rd one is likely to blow something up...The SPI interface on the 2313 is hilarious. Take a look at the clock generationBut it's better than nothing.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: December 01, 2022, 09:22:22 pm
content: Quote from: peter-h on December 01, 2022, 02:52:38 pmI call that 'go away' pricingIt means they really do not want new designs using that package.Quote from: peter-h on December 01, 2022, 02:52:38 pmThe main pins look compatible ?Quote from: peter-h on December 01, 2022, 02:52:38 pmYes, in real terms the MCU's you buy today are far more bang for the same cents.

author: peter-h
author_rank: Super Contributor
timestamp: December 01, 2022, 10:25:19 pm
content: Deffo more bang for buck today, but there are many apps where you don't want to pay more than half a buck regardless of the bangI vaguely recall there are even STM 32F (ARM32) chips which are 5x5mm, but they cost a bit more than 60p.

author: james_s
author_rank: Super Contributor
timestamp: December 01, 2022, 10:44:35 pm
content: Quote from: PCB.Wiz on December 01, 2022, 09:22:22 pmLight bulb manufactures do the same thing. When they want to discontinue a type of lamp, the first thing they do is jack up the prices to encourage people to use alternatives.