Go Down

Topic: display with few free digital pins (Read 4845 times) previous topic - next topic


I have a servo base robot arm driven by an arduino uno.  between my inputs from an remote control and outputs to the servos, i am using 12 of the 14 digital pins.  I would like some sort of display for some basic information such as current battery voltage and maybe servo position.  The problem of course is that i only have 2 free digital pins.  is there any kind of display that will use this few, or are there other options for multiplexing?  I probably should have used an arduino mega for this, but do I have any options or am I just out of luck.


Are you using the other six pins?



what other six pins? as far as I know the uno has 14 digital and 6 or 7 analog input pins.  i am not using the analog ins, but i am reading pwm from the receiver so i need digital for that.  are there other pins I don't know about?


You could use a serial lcd display and use the software serial library that only utilizes two I/O pins.





I have $6 serial displays that need 2 wire + 1 input

fast 14 Mhz shifter MCU onboard


serial would be perfect.  thanks.  where did you get the $6 one?



they are based on a flash controller.

The serial protocol depends on additional external parts:

1 diode + 1 resistor - RDY input

1 resistor - MCLR

probably one more resistor for a data line.

I don't have Arduino code yet, but it's scheduled.

All I have is a flowchart for the bus timing.

So what I mean is they are more difficult to use than serial DIsplay with hardware serial port (9600 baud).

My protocol is faster but needs synchronization:

Test for 1, wait for 0 transition, Test for 1, start data transfer + pull data line to 1. This line needs resistor because tristate is used to signalize the display to read in data.


If you want to build your own serial shift register backpack  board see these projects:

Parts to build one can be pretty cheap as the resistors and diodes are just pennies
and the shift register (hc595) can be had for about $0.25 USD.
You can see my version of the circuit on the arduinoshiftreglcd project page (bills version)
that only uses 2 wires.

If you want to buy a board that is already made and ready to go, have a look
at the adafruit board:

--- bill


Just so you know, the six (6) analog pins can also be used as six(6) digital pins which the lcd library can use for the display. If I'm not mistaken they would be labled as 14-19.


Just so you know, the six (6) analog pins can also be used as six(6) digital pins which the lcd library can use for the display. If I'm not mistaken they would be labled as 14-19.

They can also be labeled as A0 - A5.  There is no difference as far as basic I/O is concerned between the pins that are labeled 'digital' and those that are labeled 'analog'.  This labeling is strictly Arduino nomenclature and is based on the auxiliary functions of the various pins.



The key piece of information is that the Arduino "analog pins" can be used as digital pins.
And that Arduino analog pin 0 is the same as Arduino digital pin 14, analog 1 is digital pin 15, etc...
up to analog pin 5 is digital pin 19.

--- bill


Mar 17, 2012, 02:12 pm Last Edit: Mar 17, 2012, 02:17 pm by Colaboy Reason: 1
I use this little fella:


It uses the I2C bus, just analog pins 4 and 5 plus a ground and 5volts.
It's really easy to use and comes with it's own library.
Instead of the pins that came with it, I soldered a 16 pin socket to the board.
That way I can just clip any display to it.
I'm quite the novice but it's very easy to use.



Mar 17, 2012, 02:35 pm Last Edit: Mar 17, 2012, 02:47 pm by Grumpy_Mike Reason: 1
Just connect a regular LCD to a PCF8574 and then that connects to A5 & A4 on the I2C bus.


Just connect a regular LCD to a PCF8591 and then that connects to A5 & A4 on the I2C bus.

Are you sure about that part number Mike?



Yes Don your right, just corrected it thanks.

Go Up