K
kd
Guest
Hi there guys,
I have a absolute shaft encoder for position sensing.
It's the EAW version:
http://www.farnell.com/datasheets/110.pdf
I'm fast running out of I/O on my micro and can't spare 8 pins - so this
means I need to do something smart to lower my pin counts.
Been looking at the 74HC165 and 74HC166 which are 8 bit
parallel-in/serial-out shift register.
The difference between them is that:
165 is asynchronous
166 is synchronous
What I want to do is:
1. get the 8 bit data from the encoder
2. send it to the micro
3. during the sending, the encoder data could change, but I want it ignored
until all the data is sent.
4. when sending has completed, new data is then latched into the register
again and the process is repeated.
So my question is, what's the difference between the 165 and 166 and more
importantly, which one will do what I described above?
My program algorithm would read:
1. latch the register to get the 8 bit data from the encoder
2. enable serial reading on the 74HC16X
3. pulse clock (rising edge)
4. read serial data
5. goto step 3 until all 8 bit has been read
6. disable serial reading 74HC16X
7. convert serial data to something useful for my application
8. repeat the process again.
Hope that make sense guys. Appreciate any help on deciding which register I
should use (165 or 166)??!!
Cheers
I have a absolute shaft encoder for position sensing.
It's the EAW version:
http://www.farnell.com/datasheets/110.pdf
I'm fast running out of I/O on my micro and can't spare 8 pins - so this
means I need to do something smart to lower my pin counts.
Been looking at the 74HC165 and 74HC166 which are 8 bit
parallel-in/serial-out shift register.
The difference between them is that:
165 is asynchronous
166 is synchronous
What I want to do is:
1. get the 8 bit data from the encoder
2. send it to the micro
3. during the sending, the encoder data could change, but I want it ignored
until all the data is sent.
4. when sending has completed, new data is then latched into the register
again and the process is repeated.
So my question is, what's the difference between the 165 and 166 and more
importantly, which one will do what I described above?
My program algorithm would read:
1. latch the register to get the 8 bit data from the encoder
2. enable serial reading on the 74HC16X
3. pulse clock (rising edge)
4. read serial data
5. goto step 3 until all 8 bit has been read
6. disable serial reading 74HC16X
7. convert serial data to something useful for my application
8. repeat the process again.
Hope that make sense guys. Appreciate any help on deciding which register I
should use (165 or 166)??!!
Cheers