Microcontroller alternative

Hi to all.
I just started learning Arduino a few months ago as a new hobby. I have managed to write many programs and see them in working. Next step was bleutooth and how it all operates and connects via software serial and hardware UART. I have managed to create apps on MIT app inventor and control lights. My next step was to go from HC05/HC06 using Feasycom fsc909 class1 300m bluetooth module and all seems to be working fine.

I now want to be able to get rid of the arduino Uno and upload it to a small microcontroller 8pin IC.
For this I was considering using the attiny85 seeing that I can use the Arduino as the programmer for it but I noticed that the attiny85 doesn't support UART. I don't like using software serial. If there is a microcontroller usb breakout board that I could place the chip inside and program with arduino ide and then remove it and insert it into my control circuit then it would be great. I can use my arduino uno to program it as well so any solutions would be create.

Looking for solution:
8 pin IC
Skecth size is about 4kb
Must support UART
Must have at least 2 x analog outputs.

Can anyone recommend something I could use. I'm at the frustration point due to lack of knowledge.

Look on the Microchip web site, there is a huge selection. Not all are programmable with the Arduino IDE, but all are programmable with Microchip MPLABX and a PICkit 4 (including AFAIK, the non-PIC controllers). MPLABX will be a learning experience for you but maybe one you are ready for.

jason212:
Looking for solution:
8 pin IC
Skecth size is about 4kb
Must support UART
Must have at least 2 x analog outputs.

Why do you want a 8 pin IC? There are very small packages for chips with more pins. Some 14-pin packages are smaller than 8-pin (but not as easy to handle).

Anyways, analog outputs are not very common. This will limit your options even more.

When you say "2x analog outputs", do you mean actual DAC outputs (which are rare), or PWM outputs as usually used with analogWrite() on Arduinos?

Did you need a DIP package, or is the smaller SO8 usable?

The relatively new ATtiny402 might work. It only has 4k of memory (and no 8k variant, at least not yet), so it would be "tight" WRT your requirements. It's got Arduino support via DrAzzy's megaTinyCore...

Don't bother with a 402, do the 412 - it's a little better, and only a few cents more expensive :stuck_out_tongue:

Definitely recommend using the "modern AVR", rather than the "classic AVR" parts like the t85, which are kind of showing their age. For small ones, this would be the tinyAVR 0/1-series, that is, ATtiny parts with a 0 or 1 as the second-to-last digit in the number. On the modern tinys, the last one indicates the number of pins; they end in either 2, 4, 6, or 7,
corresponding to 8, 14, 20, or 24 pins. next one is a 0 or 1 (1-series has slightly better peripherals - they add a wacky type D timer than gets you 2 extra PWM pins on the 20/24-pin ones, a single analog voltage output (not PWM, an actual DAC), and on 16k and 32k 1-series parts, you also get a second independent ADC, which 99% of the time you don't care about, but that last 1% of the time, it makes the chip twice as good at what you care about). Sometime, maybe in time for xmas if we're lucky, there's a 2-series coming, where the headline feature is a crazy fancy ADC, and a second serial port - but no word on any 8-pin 2-series parts). And whatever is before those two digits is the size of the flash in kb, eg, 412 is the 8-pin 1-series part with 4k of flash, the 1604 is 16k flash, doesn't have the spiffier peripherals, and is in 14-pin package, and so on) - sadly they stopped at 4k flash for the 8-pin parts; not sure what their plans are for the future). As long as you don't need any libraries that only work on classic AVRs (install megaTinyCore and see if your sketch compiles with the 412/402 selected - if you're just a little short on space, there are ways to compact it, but if the library is complaining about undefined "variables" with short ALLCAPS names, that's a bad sign).

I basically use only "modern" AVRs now - either the tinyAVR 0/1-series, or the AVR DA-series (that's the higher end line - it looks like they dropped the "atmega" branding), except when I just want something dirt cheap that someone else assembled for me; the $2.50 arduino nano clones have their place :stuck_out_tongue: ). They're the future of the AVR line, and much better specs for the price. They all use a new method, "UPDI" to program - but you can make a UPDI programmer with 3 dupont jumpers, and one of those $2.50 arduino nano clones I mentioned :stuck_out_tongue:

I actually just got the DHL tracking number for a set of boards that'll mount a 412 and it's decoupling cap on a 0.425" square PCB (rows of holes positioned so it matches a DIP-8 package). I've also got a version that's 0.425 x 0.625 with the added space being used for a second cap on the power rail (I think I'll do 4.7uF on that), a 470 ohm series resistor for the UPDI programming line, and a 3-pin Vcc-Gnd-UPDI header for programming, and (potentially) as a way to bring power in once the whole thing is done). Not sure when I will actually be able to start selling them though - it depends on when I'm able to get my product photography equipment back :-/ But with only 2 part placements on a miniscule board like that, unlike most of the stuff in my store, I can actually make it cheap...

In any event - uh - you do know that with my ATTinyCore for the ATtiny85 (as well as basically every other classic ATtiny that's worth using with Arduino), you do get a built-in software serial implementation that's usually "good enough", right? It's even named "Serial" so a lot of code is directly portable....

Don't bother with a 402, do the 412 - it's a little better

I was a little worried that the 412 datasheet doesn't show where the TCA compare outputs go. (I'll assume that they're the same as the 402, but...)

What about ruggedness of the new chips? With so many more cool features for nearly the same price I guess they are using smaller geometry. From my experience the old AVRs survive a lot of abuse (no antistatic precautions, short of two outputs together, powering via protection diodes...) without any apparent damage. Is the same true for the new lines?

What about ruggedness of the new chips? With so many more cool features for nearly the same price I guess they are using smaller geometry. From my experience the old AVRs survive a lot of abuse (no antistatic precautions, short of two outputs together, powering via protection diodes...) without any apparent damage. Is the same true for the new lines?

I don't know the answer to that. I do know that when I worked in a repair workshop for BT in the 1980's we had one of the guys who had done research on static damage come an talk to us and explain it. Since then it seems to me chip geometry has reduced a zillion times and chips have become more robust not less.

Smajdalf:
With so many more cool features for nearly the same price I guess they are using smaller geometry.

Yes, they do.

Smajdalf:
From my experience the old AVRs survive a lot of abuse (no antistatic precautions, short of two outputs together, powering via protection diodes...) without any apparent damage.

Even if the damage is not apparent it can cause issues later in the lifetime of products. Chips had ESD damage for decades. As technologies got smaller, the expertise of the engineers designing chips has increased.

The flip side of the AVRs surviving a lot of abuse is that most engineers could not make use of the additional margin because they had to stay within the limit of the datasheet. The product specification was often overly cautious because they did not have the capabilities to guaranty the reliability over all individual chips because of production tolerance, simulation and test capability and other factors.

This knowledge has increased a lot over the past two decades. So now the datasheet limits are closer to the actual limit.

With this you could argue the ruggedness of old chips is an illusion caused by "bad" data in the datasheet.

The new technologies enable things that were not possible before. It is your choice whether you would like to make use of that even if it means you might need to listen to the datasheet a bit more. :slight_smile:

With so many more cool features for nearly the same price I guess they are using smaller geometry.

As do the SAMD, STM32, ESP, and etc chips that we've also been using for a while.
I haven't seen a lot of complaints from people frying those, either...