i wanna connect 2x16 lcd display to arduino mini, and i'm stuck at only 4 pins 10->13 and 1 analog A3 and 2 RST pins...can i use A3 and RST as digital while i'm still able to use lcd library ???
can i declare it as:
LiquidCrystal lcd(10,11,12,13,RST,A3); ....???
No. The reset pin has a particular purpose on the microcontroller chip. Same with the power & ground pins, and clock/oscillator pins, etc.
The Reset pin can be used as a digital pin with a fuse change.
From the 328P datasheet:
1.1.5 PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. The minimum pulse length is given in Table 29-16 on page 312. Shorter pulses are not guaranteed to generate a Reset.
Do some reading, see if those characteristics work for you.
If you do not have Reset tho, you will not be able to download programs via the serial port.
I think programming can only be done via ICSP at that point. Under Memory Programming, no mention is made of whether programming still works if Reset Disable fuse is changed. Maybe being held low is recognized differently than just a low pulse.
"28.8 Serial Downloading
Both the Flash and EEPROM memory arrays can be programmed using the serial SPI bus while RESET is pulled to GND. The serial interface consists of pins SCK, MOSI (input) and MISO (output). After RESET is set low, the Programming Enable instruction needs to be executed first before program/erase operations can be executed.
NOTE, in Table 28-17 on page 299, the pin mapping for SPI programming is listed. Not all parts use the SPI pins dedicated for the internal SPI interface."
Similarly, the clock pins can be used as IO pins with appropriate fuse changes; the clock source will be required to be internal or elsewhere.
Both Reset and Clock pins as IO need the Atmega328P to be in a standalone design, or the Uno board hacked up pretty good to cut existing traces and wires added to the newly-disconnected pins. Very messy. If you're planning to use an existing Arduino for this, I'd go with DVDdoug's original answer: No.
There are other Arduino derivative with more IO - the Atmega1284P has 32 IO. I offer a Duemilanove style board (FTDI chip vs Uno's 16U2 for Serial/USB). Kit or fully assembled, on-board FTDI or offboard; this pic shows onboard FTDI module:
http://www.crossroadsfencing.com/BobuinoRev17/
We can have a kit or an assembled board in the mail Monday.
1284P offers 32 IO, dual hardware serial, 16K SRAM, 128K flash, 4K EEPROM, and the usual stuff found in a '328P.