Author Topic: Smaller Alternative to 328P  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

Offline paul_g_787Topic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: gb
Smaller Alternative to 328P
« on: October 30, 2019, 12:25:03 am »
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 a minimum 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  :-+
 

Offline jhpadjustable

  • Frequent Contributor
  • **
  • Posts: 295
  • Country: us
  • Salt 'n' pepper beard
Re: Smaller Alternative to 328P
« Reply #1 on: October 30, 2019, 01:35:05 am »
A quick google implies that the ATtiny84 has a support package. Will that do? https://github.com/damellis/attiny
"There are more things in heaven and earth, Arduino, than are dreamt of in your philosophy."
 

Offline Mr. Scram

  • Super Contributor
  • ***
  • Posts: 9823
  • Country: 00
  • Display aficionado
Re: Smaller Alternative to 328P
« Reply #2 on: October 30, 2019, 01:46:29 am »
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?
 

Offline Brutte

  • Frequent Contributor
  • **
  • Posts: 614
Re: Smaller Alternative to 328P
« Reply #3 on: October 30, 2019, 09:16:04 am »
This is the tool you need.
 
The following users thanked this post: artag

Offline Psi

  • Super Contributor
  • ***
  • Posts: 11403
  • Country: nz
Re: Smaller Alternative to 328P
« Reply #4 on: October 30, 2019, 09:28:20 am »
ATTiny26 comes in 20pin DIP and has ADC, a lot of the ATTiny's dont have the ADC
ATTiny44 comes in 14pin DIP and has ADC too.
« Last Edit: October 30, 2019, 09:32:04 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline paul_g_787Topic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: gb
Re: Smaller Alternative to 328P
« Reply #5 on: October 30, 2019, 08:35:21 pm »
 

Offline paul_g_787Topic starter

  • Frequent Contributor
  • **
  • Posts: 494
  • Country: gb
Re: Smaller Alternative to 328P
« Reply #6 on: October 30, 2019, 08:45:56 pm »
ATTiny26 comes in 20pin DIP and has ADC, a lot of the ATTiny's dont have the ADC
ATTiny44 comes in 14pin DIP and has ADC too.

Thanks 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?
 

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3126
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Smaller Alternative to 328P
« Reply #7 on: October 30, 2019, 09:06:05 pm »
A quick google implies that the ATtiny84 has a support package. Will that do? https://github.com/damellis/attiny

Gah, 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)



~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 
The following users thanked this post: jhpadjustable

Offline sleemanj

  • Super Contributor
  • ***
  • Posts: 3126
  • Country: nz
  • Professional tightwad.
    • The electronics hobby components I sell.
Re: Smaller Alternative to 328P
« Reply #8 on: October 30, 2019, 09:07:38 pm »
If I were to use the ATTiny24 would I require an external crystal or can it be done without like with the 328P?

Internal oscillator is fine.
~~~
EEVBlog Members - get yourself 10% discount off all my electronic components for sale just use the Buy Direct links and use Coupon Code "eevblog" during checkout.  Shipping from New Zealand, international orders welcome :-)
 

Offline jackthomson41

  • Regular Contributor
  • *
  • Posts: 53
  • Country: us
Re: Smaller Alternative to 328P
« Reply #9 on: October 31, 2019, 01:31:13 am »
Hi.

I have a project that I created on an Arduino Uno which uses the 28-pin ATMega328 P-PU DIP. However I am only using a few of the pins on the 328P and was wondering if there is an alternative microcontroller 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 a minimum 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  :-+

You can use ATtiny44 or ATtiny85, both will do the job and will fulfill your requirements.
« Last Edit: April 18, 2020, 02:34:01 am by jackthomson41 »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 11403
  • Country: nz
Re: Smaller Alternative to 328P
« Reply #10 on: October 31, 2019, 08:16:08 am »
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.

« Last Edit: October 31, 2019, 08:24:21 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf