Pages: [1] 2   Go Down
Author Topic: display with few free digital pins  (Read 2449 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you using the other six pins?

Don
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17301
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

fast 14 Mhz shifter MCU onboard
Logged

I also have PIC related web domain.

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

-luke
Logged

IRL
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I also have PIC related web domain.

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2738
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Full Member
***
Karma: 2
Posts: 209
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Dallas, TX USA
Offline Offline
Faraday Member
**
Karma: 70
Posts: 2738
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Leeds, UK
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: March 17, 2012, 08:17:20 am by Colaboy » Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34519
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just connect a regular LCD to a PCF8574 and then that connects to A5 & A4 on the I2C bus.
« Last Edit: March 17, 2012, 08:47:23 am by Grumpy_Mike » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 39
Posts: 4389
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34519
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes Don your right, just corrected it thanks.
Logged

Pages: [1] 2   Go Up
Jump to: