Go Down

Topic: DaisyChained 74HC165, only gettin data from 2 last (Read 1 time) previous topic - next topic

2stl

Hello there.

I've successfully daisy-chaned 2 of these ICs together, i'm using this example to get the data from them.
Everything was working very well, then I added 2 more ICs on the chain, however, now i can't get the data from the first two... i didn't forgot to change the int into long, and if i setup 3 of them, i can't get data from the first. So only the last 2 are actually working.

The setup is very basic, as i'm trying to assemble a musical keyboard, i simply linked every Clock, Clock Enable and Parallel Load pin together, connected to the respective arduino pin, and the Q7 from the last IC on the chain to arduino, and chained the Q7 to the DS of the next IC. I can make a schematic if it's hard to understand.

I'm totally noob and couldn't figure out what's wrong.

Thanks in advance.

retrolefty

Quote
Of course we wouldn't have to ask (and you wouldn't have to answer) ANY of these questions if you had provided a circuit diagram.




Yes asking for circuit diagrams and code listings is a never ending chore around here.  ;D

Lefty

2stl

Thanks guys.

I just figured out that by printing bit-by-bit it's possible to get the entire data  :-[.

So it's a software problem. Another thing that i figured out is that you can simply connect that silly ClockEnable Pin to the ground.

The problem probably is that I don't understand the bitwise operations very well. I wanted to send a long binary string to the computer, but it's hard to do this using my very limited knowledge, so i am sending an array.

Now i have another problem... i plan to connect more than 200 inputs using daisychained 74HC165's, however, i don't know if massive printing is heavy, but it can't detect quicker presses... i knew it was going to be slow, but the guys on the other thread said it was going to be alright to make a musical keyboard (>3us of rate) however, even with 32 inputs the thing is very slow :(.

Thank you.

Graynomad

Rob Gray aka the GRAYnomad www.robgray.com

2stl

Quote
Huh?  What does "i don't know if massive printing is heavy" mean here?  I have no clue what you are talking about.  Take a deep breath and describe what you are trying to do. If you start at the beginning, maybe we can follow along.


It's because the program is summing the bits and sending (printing) to the serial with no delay. I don't want to bore you with coding, etc. I just want to be sure that it's possible to get good reading speed.

Quote
That is probably an issue with your software. So far, you have shown us no software and no hardware diagrams, so we're pretty much shooting in the dark here. Hope its fun for you.


I hope it's a software problem.

Quote
There was a thread about almost this exact problem (218 inputs) the other day.


Yes. On this thread AWOL said:
Quote
digital loop 2856

that the full reading loop would take 2856us. This is 0.003 seconds, so, we could say that the keys detection would run at 333Hz, what is very acceptable. However, the practical tests that i ran with only 32 inputs were much slower than this.

If it's a software problem, I'm gonna figure out for myself .I just want to be sure that it's possible to "achieve" 333Hz of "reading rate" for my 218-key Musical Keyboard. :)

Thanks guys.

Go Up