I have a number that needs to be shifted out
I have 3 pins remaining(pins 1,2 & 13) in arduino uno.
can i use this TX and RX pins to drive a shift register like 74HC595 ?
how can i convert my decimal no to binary and shift it out through a pin like say pin 1 ?
Yes, if you are not planning on any serial comm's.
Use shiftout and define the pins you want to use.
If you use
shiftout(dataPin, clockPin, MSBFIRST, data_to_send);
it will go out as binary. 128D = 0x80, 255D = 0xFF, etc. No conversion needed.
pranoy:
i want to display two digit numbers like 99
can i do this with a single shift register?
To answer that you need to know the number of inputs needed to drive your display (probably at least seven per character, meaning at least fourteen in total) and the number of outputs provided by the shift register you're using. Obviously the number of outputs available from the shift register must be greater than or equal to the number of inputs needed by the display.
Yes, but you will need 2 transistors to enable one digit or the other.
Switch back & forth between them, persistance of vision will make them both appear on.
That is how 4-digit display work also. All the segments are wire in parallel, each digit having a unique common anode or common cathode pin; only one common pin is enabled at a time to turn on 1 digit (set of segments) at a time.