Smaller Alternative to 328P - Page 1
Forum section: electronics / general

author: paul_g_787
author_rank: Frequent Contributor
timestamp: October 30, 2019, 12:25:03 am
content: Hi.I have a project that I created on an Arduino Uno which uses the 28-pin ATMega 328P-PU DIP. However I am only using a few of the pins on the 328P and was wondering if there is an alternative micro-controller which is compatible with the Arduino IDE that I can use in place of the 328P-PU?I already know about the ATTiny 45 and 85 but these are too small as they are only 8-pin! I require aminimum of 4 digital GPIO pins and 3 Analogue GPIO pins.Physical size is important in this project, I need to get the device as small as possible,but still using a DIP IC.Is anyone able to recommend anything or point me in the right direction at all?Thanks

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: October 30, 2019, 01:35:05 am
content: A quick google implies that the ATtiny84 has a support package. Will that do?https://github.com/damellis/attiny

author: Mr. Scram
author_rank: Super Contributor
timestamp: October 30, 2019, 01:46:29 am
content: Using an SMD part is the obvious solution but you say you need DIP. If size really matters I'd look into eliminating the DIP part. Or could you maybe multiplex or eliminate one or more outputs?

author: Brutte
author_rank: Frequent Contributor
timestamp: October 30, 2019, 09:16:04 am
content: Thisis the tool you need.

author: Psi
author_rank: Super Contributor
timestamp: October 30, 2019, 09:28:20 am
content: ATTiny26 comes in 20pin DIP and has ADC, a lot of the ATTiny's dont have the ADCATTiny44 comes in 14pin DIP and has ADC too.

author: paul_g_787
author_rank: Frequent Contributor
timestamp: October 30, 2019, 08:35:21 pm
content: Quote from: Brutte on October 30, 2019, 09:16:04 amTempting...

author: paul_g_787
author_rank: Frequent Contributor
timestamp: October 30, 2019, 08:45:56 pm
content: Quote from: Psi on October 30, 2019, 09:28:20 amThanks for that. just has a look at the ATTiny 44 and also found the ATTiny24 which is cheaper.If I were to use the ATTiny24 would I require an external crystal or can it be done without like with the 328P?

author: sleemanj
author_rank: Super Contributor
timestamp: October 30, 2019, 09:06:05 pm
content: Quote from: jhpadjustable on October 30, 2019, 01:35:05 amGah, do not use damellis' package, it is worse than useless.Better arduino cores to support the various tinys:https://github.com/sleemanj/optiboot/blob/master/dists/README.md(my own highly optimised for space supporting the 24/44/84, 25/45/85, 13, 4, 5, 9 and 10)https://github.com/SpenceKonde/ATTinyCore/(that from which mine derives, not so optimised for space and doesn't handle the 13 and smaller)https://github.com/SpenceKonde/megaTinyCore(for the new generation of attinys)

author: sleemanj
author_rank: Super Contributor
timestamp: October 30, 2019, 09:07:38 pm
content: Quote from: paul_g_787 on October 30, 2019, 08:45:56 pmInternal oscillator is fine.

author: jackthomson41
author_rank: Regular Contributor
timestamp: October 31, 2019, 01:31:13 am
content: Quote from: paul_g_787 on October 30, 2019, 12:25:03 amYou can use ATtiny44 orATtiny85, both will do the job and will fulfill your requirements.

author: Psi
author_rank: Super Contributor
timestamp: October 31, 2019, 08:16:08 am
content: Make sure you check how much flash memory and RAM you will need.Have a look how big your current 328P project is compiling down to.The smaller ATTinys don't have much flash or SRAM. The arduino libraries do add some annoying overhead.The ATTiny24 only has 2K flash and 128bytes SRAM which is not much.I would look at 4K of flash unless your sure 2K will be enough. I tend to go for the 8K ones myself, just because i don't want to deal with out of mem issues.The Arduino bootloader takes like 512 Bytes of flash. so on 2k you've lost 1/4 already, without any code at all.I think many people program the ATTiny's without the serial bootloader to save space.