Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: 74HC165 serial register reading with perl

by stevieb (Canon)
on Jun 18, 2018 at 19:15 UTC ( [id://1216880]=note: print w/replies, xml ) Need Help??


in reply to 74HC165 serial register reading with perl

Is this for a Raspberry Pi? My RPi::WiringPi handles this shift register if on a Pi. See that linked documentation and associated FAQ for full details:

use RPi::WiringPi; use RPi::Const qw(:all); my $pi = RPi::WiringPi->new; my ($base, $num_pins, $data, $clk, $latch) = (100, 8, 5, 6, 13); $pi->shift_register( $base, $num_pins, $data, $clk, $latch ); # now we can access the new 8 pins of the # register commencing at new pin 100-107 for (100..107){ my $pin = $pi->pin($_); $pin->write(HIGH); }

Update: Whoops, I misread the IC device number. My code is for a 74HC595 (output) not a 74HC165 (input). Sorry for the noise.

Replies are listed 'Best First'.
Re^2: 74HC165 serial register reading with perl
by rkrasowski (Sexton) on Jun 19, 2018 at 02:36 UTC
    Thanks, will check module tomorrow and let you know how things are. Now I know where to start. I ordered PCB and 74HC165, expect to get it on few days. Will try real example at that time. Thanks Robert

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1216880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-24 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found