how to create more digital pins

hi. as you know, arduino has 13 digital pins and they can be used as in/out pins and digital pins can give and take 5V, 40mA and each pins have internal pull up resistors. how can i create more digital pins(exactly the same ones just like the existing digital pins) of arduino board and how can i use those created pins to be 14th, 15th, 16th digital pin....... etc.? how can i designate them for each pin to be 14th, 15th for example?

You can use a shift register to allow you to make more outputs.
One will give you 8 more outputs while only using 3 pins on the Arduino.
They stack so you can connect another one to the first one without needing another 3 pins.

I/O port expanders are more complex and slightly pricier but they do exist.

You cant use the standard digitalwrite commands with either of them.
Not without some hacking anyway.

If you want a lot more I/O you’ll be wanting to use a different AVR chip…
The ATmega128 chip has 40 odd I/O. :slight_smile:

If you are not using the analog inputs, you can designate them as digit pins 14 - 19

how many pwm's outputs are supported on the 128?

Thanks for your replies. then, can i designate analog input pins as digital pins regardless of their own numbers(0, 1, 2, 3, 4, 5)? are those analog pins have internal pull up resistors just like digital pins?

Yes, you can use analog input 0 as digital pin 14, analog input 1 as digital pin 15, etc. On the Mini and BT, however, analog inputs 6 and 7 don't work as digital pins.

They do have internal pull-ups like the digital pins.

how many pwm's outputs are supported on the 128?

It has 8. Would be cool if it had more. :( The AT90PWM3 has 12.

nice, thats 2 more then the arduino, but how many pwm inputs does it have? 8 also i'm guessin...

and that other chip that had 12, how many pins does it have all together? and what kind of chip is it?

Yes, you can use analog input 0 as digital pin 14, analog input 1 as digital pin 15, etc. On the Mini and BT, however, analog inputs 6 and 7 don't work as digital pins.

They do have internal pull-ups like the digital pins.

can i use them with standard digitalRead, digitalWrite commend?

nice, thats 2 more then the arduino, but how many pwm inputs does it have? 8 also i'm guessin...

and that other chip that had 12, how many pins does it have all together? and what kind of chip is it?

PWM in? You mean Analog in? Most AVRs have 8. PWM can be detected with digital inputs. :)

The AT90PWM3 has 32 pins, 12 PWM and 11 ADC. Its designed specifically for lighting and motor applications.

Yes, you can use analog input 0 as digital pin 14, analog input 1 as digital pin 15, etc. On the Mini and BT, however, analog inputs 6 and 7 don't work as digital pins.

They do have internal pull-ups like the digital pins.

can i use them with standard digitalRead, digitalWrite commend?

Yes.