I'm starting an LED array build and I'm wondering how many pins of the ATmega I can actually address to control said LED's in the arduino environment.
i was looking at this atmel data sheet for the atmega328P, along with the pin out provided by arduino. But i do really enjoy pighixxx's pin out comparisons.
The atmel data sheet says there's 23 I/O pins, but how many can we use while keeping the chip easily programmable?
As I see it, there are 28 pins on the chip, 2 GND, 2 VCC, AREF leaving 23 pins to play with...
Well I intend to keep program-ability so TX/RX will not be used in the build.(unless there's a work around?) there's another 2 I/O pins lost, bringing the max count down to 21.(the exact number i need)
Arduino pins 2-13 are all good = atmega pins 4, ~5, 6, ~11, ~12, 13, 14, ~15, ~16, 17, 18, 19) with some PWM (~) always nice. pin count = 12
I can also use arduino pins A0-A5 = atmega pins 23-28, adding 6 to the pin count now 18,
so those are all easy enough.
And now for the real questions:
This project will become a stand alone project what will use the internal oscillator,
so how do i address the oscillator pins = atmega pins 9 and 10 in code? (hopeful gain of 2 total now 20)
and lastly the reset button/pin ... how do i disable the reset fuse and use the "reset" pin = atmega pin 1, in code?
thanks for the help
For reference i have 100 led's and i would like to use one analog input to control them (that's 21 pins with only transistors, resistors, and an external power source needed).