Kronos Robotics and Electronics
Site Map
 
Home Zeus Projects App Notes Downloads Dios Athena Forums
 

DAN140

Interface to a 74HC165 Shift Register

and gain some input ports

  By Michael Simpson

Using the 74HC595 we were able to add some output ports.   Now lets add a few input ports.  we will use the 74HC165 shift register.

The process is very easy.

  1. pulse the load pin

  2. shiftin the data

If you cascade more than 1 74HC165 you can shift 8 ioports for each 74HC165 you cascade.

Schematics

Single 74HC165

 

Cascaded 74HC165

In the program calls the ini165 routine to setup the ioports.  You then make calls to read165 or read165x2 to read the input ports on the 74HC165.   You can then access the individual bits as needed.

Program 1 Download it here


func main()
  dim datin

  HC165init(0,1,2)

loop:
  datin = HC165read()
  print datin
goto loop

endfunc

include \lib\Dios165.lib

 

 

Parts list

74HC165

 

DiosPro 40 Pin Chip

Dios Workboard Deluxe

 

Easy RS232 Driver  

DiosPro 28 Pin Chip

Dios 32 Pin Carrier (Carrier #1)

 

9 Pin Cable

Breadboard Regulator

 

Copyright © 2001 - 2007 Kronos Robotics