I must say that in some way I disappointed because the low flash memory of this chip, I really don't check the amount of memory before to buy it (my bad), I just count the 18 pins and all the ports and the 4 pmw pins that it has.
but I have learned some stuff about the memory and how to keep it low, I could reduce a 2202 bytes sketch to 2000 bytes just below the 2048 of the attiny2313.
after a rest and go to hear the message, thinking about other tings....
I couldn't understand how a micro with a "lot of pins" just has 2k of flash or at last 2k must be enough to handle all the pins , the ting is that I'm believe that the arduino's IDE is keeping more memory that it must in other way for example the simplest sketch keeps 310 bytes, and adding one pinMode(); isntruction it reaches 508 bytes.
please some advice in front of this matter
I come a bit late to this...
But the part numbers tell you how much flash and ram you have to work with. The memory avail is not a function of the number of pins, but rather the size of the die inside the chip. 32K in an arduino is a bit absurd, in my opinion, but cost wise it makes sense, as the chips with less ram aren't much cheaper. Like someone else said, if you need more memory, go for the 4313. twice the flash, same pinout.
Using your logic I should be complaining that the 2313 has too much memory. I programmed a 2131 as a stepper controller. 1200 bytes in Arduino. Wanted it faster, 88 bytes in assembler. No RAM usage as everything is in registers.
Waht you need to aks is this - Is your code as efficient as possible? Not sure what your programming experience is, but folks with PC programming experience can sometimes write some rather bloated code because there is so much memory and so much storage that it doesn't really matter. As you code the Tiny series of chips you really need to think about the memory cost of every bit of code you write. Is it necessary, and could it be coded cleaner?