74HC165 problem
Archiver
Posts: 46,084
I followed the instructions in the Parallax "StampWorks Lesson 24"
for hooking up a basic dip switch reader based on a 74HC165 Parallel
to Serial IC.
The problem I having is two fold.
1.) The inputs on the 165 (as read in the debugger) are all going
back and forth between 1 and 0. I thought this was becuase they
needed a step-up resistor, so on the inputs I installed a 10K step-
up. No luck..
2.) Also, none of the inputs seem to change when I flip the switch.
I checked 20 times to make sure it was the exact same as the circuit
in the book and I cannot get it to work.
My setup: 6 position DIP switch where #'s 1 and 2 are connected to
pins 1 and 2 of the 74HC165. The other 6 inputs on the IC are
nothing and connected to nothing. There is a 10K resistor between
each of the two 5V VDD sources going to the switches and to the IC
pin.
I just cant seem to get it to work.
Any help is greatly appreciated. Thank you.
Josh
for hooking up a basic dip switch reader based on a 74HC165 Parallel
to Serial IC.
The problem I having is two fold.
1.) The inputs on the 165 (as read in the debugger) are all going
back and forth between 1 and 0. I thought this was becuase they
needed a step-up resistor, so on the inputs I installed a 10K step-
up. No luck..
2.) Also, none of the inputs seem to change when I flip the switch.
I checked 20 times to make sure it was the exact same as the circuit
in the book and I cannot get it to work.
My setup: 6 position DIP switch where #'s 1 and 2 are connected to
pins 1 and 2 of the 74HC165. The other 6 inputs on the IC are
nothing and connected to nothing. There is a 10K resistor between
each of the two 5V VDD sources going to the switches and to the IC
pin.
I just cant seem to get it to work.
Any help is greatly appreciated. Thank you.
Josh
Comments
the '165 too. You stated that you have switches 1 & 2 connected to
pins 1 and 2 of the 165. I think you want them conected to D0 and D1,
which are actually pins 11 and 12 on the 165.
I've come to find out the hard way that unused input pins
left "floating" can be a problem - you should ground D2 thru D7 if
you not going to use them.
Another thing to watch, is the size of the variable you define versus
the amount of data being monitored and shifted. If you used the
example software as written, you are going to transfer 8 bits of data
into the variable "switches" - Even though you don't have them hooked
to switches.
PG
that fixed the 1's and 0's going back and forth problem. Good idea!
As for the switch problem, I found the problem was in the stamp
works example circuit (experiment #24). The circuit diagram has pins
2 and 7 reversed. I downloaded specs for the 165 and discovered
this. After I reversed them - I had no problems at all! And I even
daisy chained 4 of them without any difficulty. Thanks a lot for
your help!
Josh
--- In basicstamps@y..., "md10bldr" <Paul.h.garcia@B...> wrote:
> I'm still a beginner, so I had problems the first time I used
> the '165 too. You stated that you have switches 1 & 2 connected to
> pins 1 and 2 of the 165. I think you want them conected to D0 and
D1,
> which are actually pins 11 and 12 on the 165.
>
> I've come to find out the hard way that unused input pins
> left "floating" can be a problem - you should ground D2 thru D7 if
> you not going to use them.
>
> Another thing to watch, is the size of the variable you define
versus
> the amount of data being monitored and shifted. If you used the
> example software as written, you are going to transfer 8 bits of
data
> into the variable "switches" - Even though you don't have them
hooked
> to switches.
>
> PG