Go Down

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

lkrasner

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.

floresta

Are you using the other six pins?

Don

lkrasner

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?

retrolefty

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

http://www.ebay.com/itm/1602-LCD-Display-with-Integrated-Simple-Serial-Interface-YG-BL-5V-For-Arduino-/230757571896?pt=LH_DefaultDomain_0&hash=item35ba391d38

or
http://www.sparkfun.com/products/9395


Lefty

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

fast 14 Mhz shifter MCU onboard
I also have PIC related web domain.

lkrasner

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

-luke

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.
I also have PIC related web domain.

bperrybap

If you want to build your own serial shift register backpack  board see these projects:
http://www.3guys1laser.com/blog-cheap-arduino-2-wire-lcd-display-0
http://code.google.com/p/arduinoshiftreglcd/
http://code.google.com/p/shiftreglcd123/

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:
https://www.adafruit.com/products/292
http://www.ladyada.net/products/i2cspilcdbackpack/#download

--- bill

justone

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.

floresta

Quote
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.

Don

bperrybap

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

Colaboy

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

http://www.hobbytronics.co.uk/i2clcd-backpack

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.

Paul

Grumpy_Mike

#12
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.

floresta

Quote
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?

Don


Grumpy_Mike

Yes Don your right, just corrected it thanks.

Go Up