Hi I am just beginner with raspberry pi. I am trying to use shift resistor with pi and anyone has a good resource for same please help me
Thanks & Regards Gourav
Hi I am just beginner with raspberry pi. I am trying to use shift resistor with pi and anyone has a good resource for same please help me
Thanks & Regards Gourav
On Thu, 28 Mar 2019 09:43:03 -0700 (PDT), gourav madhan declaimed the following:
Pardon? A Google search does not initially find anything for "shift resistor" -- and the expanded search only found a Wikipedia page offering links to "level shifter" and "pull-up resistor".
Lots of "shift REGISTER" stuff, but if that is what you mean you'll have to provide information as to the type: serial-in/parallel-out (SPI, I2C, or bit-banged?), or parallel-in/serial-out (which is basically a UART) (where xxx/yyy maps xxx to the side with the R-Pi, and yyy maps to the external world; there may be some chips that support serial-out to R-Pi with parallel input from the world).
-- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
Variable resistor as analogue input device?
I guess he meant shift register. It looks like he would like to have some tutorial on working with raspberry Pi with shift register and buttons.
Smells of homework of an Indian university.
-- -TV
Indian Universities giving this sort of homework, I don't think is possible. He might be working on a project or might be practicing on his own.
I am working on a project so I am thinking to use shift register as I have hundreds of inputs coming from user
Pi is not so easy to work with at hardware level. Linux in the way. Possibly arduino instead?
-- Future generations will wonder in bemused amazement that the early twenty-first century?s developed world went into hysterical panic over a
The Natural Philosopher wrote, on 29-03-2019 10:17:
Yes. Although one 8-bit shift register that's not super super fussy about timings can even be bitbanged in Python, e.g. almost top google hit
Obviously you can cascade shift registers to handle hundreds of inputs but depending on the nature of your inputs that might be rather cumbersome.
Suppose if we want to take inputs from buttons, is there any source that demonstrates the same using shift registers ?
Reads the 8 buttons on a classic NES pad thing.
My article on it here:
Gordon
The OP wanted to read hundreds of inputs, so an output example is of little value.
He should be a bit more specific: - how many inputs really, - are the inputs already in clean logic level, - how fast is the data needed.
Hundreds of inputs may mean that Pi is simply too small alone to get them in. The data may be coming farther than a couple of inches from the processor, and it needs precautions in order not to blow up the whole thing on electrical transients.
-- -TV
Use sacrificial Arduinos to handle the inputs and deliver nice clean logic to the Pi. :-)
An arduino mega can give you over 50 inputs, each requiring nothing more than a series 4k7 resistor and a shunt 10n cap to be pretty much bomb proof. Pack it together and spit it out as serial @ 115200 baud.
-- W J G
On Thu, 28 Mar 2019 23:52:08 -0700 (PDT), gourav madhan declaimed the following:
"Hundreds" You're going to be spending most of your life just processing the parallel to serial operation.
You would need one of these
Operationally: you would have to lower the Parallel Enable (PE) bit using one GPIO (and a driver circuit due to the number of chips you are feeding), THEN trigger the clock line (a second GPIO and driver as it also goes to all chips -- low to high transition is the signal to shift/load) to have all the chips load the current state of the inputs. Raise the PE to lock the parallel input data. THEN toggle the clock line once for each input bit, reading the final serial out (using another GPIO set to input). For 100 inputs, you would have to do this clock low->high, read serial bit, clock high->low, repeat.. This assumes you've hard-wired the clock enable and master reset lines -- otherwise you need two more GPIOs with drivers for them.
Are you going to reading each input bit into a separate byte, or will you be adding logic to load 8 bits to a byte, then move to another byte? A TIVA C would be more useful for that as it has a block of memory that is mapped to another address range where each address only affects one bit at a time -- instead of 100s of bytes each being a 1 bit value, one would use the bit-mapped addresses, and only use 10s of bytes for actual storage.
You might also need level shifters if the 74HC166 requires 5V signals (one upshift for the control lines, one downshift for the serial data being read).
-- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
On Fri, 29 Mar 2019 07:56:05 -0700 (PDT), Vaibhav Kumar declaimed the following:
First... how many buttons at a time can be pressed. If you are trying to produce some form of keyboard with only one button at a time, you do NOT need "hundreds of inputs". You need a matrix of outputs and inputs (8 outputs and 8 inputs handle 64 buttons). You set one of the outputs, then scan the inputs to see if a button is down.
Typically these suffice until you get to maybe 3 buttons pressed at once -- if two buttons are on the same row and two are on the same column, you get a phantom button press for the other row/column intersection.
I suppose you could use a serial-in/parallel out shift register to send one bit to the 8 output lines, in sequence... and maybe a parallel-in/serial-out to read the 8 sense lines... but you still need separate clock lines for the two, output and input GPIOs, and a parallel enable (at least, I'd add a reset line) -- so 5 (6) GPIOs and a lot of looping to scan 64 buttons.
Toggle reset Set output GPIO High (or low depending on logic states for matrix and SIPO) Toggle SIPO clock Clear output GPIO so only the one bit is in the register Loop 8 times Set parallel enable of PISO chip Toggle PISO clock Clear parallel enable of PISO chip loop 8 times Read serial from PISO chip If active, button pressed Toggle clock (next column of buttons) Toggle SIPO clock (next row of buttons)
read PISO output for first scan
-- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
at
known as ghosting and can be prevented by the use of a diode for each switch.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.