74HC165

With the use of 74HC165, I can have 8 extra digital input pins, but how to configure it? It doesn't have a latch pin like the 74HC595, instead it has a load pin, whats the use of it? How to configure that pin? Do I put it LOW before every data transmission and HIGH again after every data transmission? Q7is the output data, not Q7 with - on top , right? CE to low or high?

Datasheet: http://www.cytron.com.my/datasheet/IC/74/74HC165.pdf

Load is like latch, it loads the shift register with your data. Then clock it in:- http://www.arduino.cc/en/Tutorial/ShiftIn

But how is it programmed? In the sketch given in the ShiftIn tutorial page, it is programmed like this:

void loop() {
  //Pulse the latch pin:
  //set it to 1 to collect parallel data
  digitalWrite(latchPin,1);
  //set it to 1 to collect parallel data, wait
  delayMicroseconds(20);
  //set it to 0 to transmit data serially  
  digitalWrite(latchPin,0);

  //while the shift register is in serial mode
  //collect each shift register into a byte
  //the register attached to the chip comes in first 
  switchVar1 = shiftIn(dataPin, clockPin);

But is it necessary to put the load (latch) pin HIGH, delay 20microsec and put it in LOW? Can I just put it in LOW immediately? One more thing, do I need to put the load(latch) pin back to HIGH? The sample sketch given doesn't have one.

Can I just put it in LOW immediately?

Yes.

One more thing, do I need to put the load(latch) pin back to HIGH? The sample sketch given doesn't have one.

Yes it does. It sends it high then low. Next time round the loop it does the same. Not sure what you are asking here.

What I mean is like when I program a 74HC595 to work, I'd do it like this:

int data=11;
int clock=12;
int latch=8;
int no=0;
int time;
int alp;

int a=B01111110;
int b=B00010010;
int c=B10111100;
int d=B10110110;
int e=B11010010;
int f=B11100110;
int g=B11101110;
int h=B00110010;
int i=B11111110;
int j=B11110110;

void setup(){
  pinMode(data,OUTPUT);
  pinMode(clock,OUTPUT);
  pinMode(latch,OUTPUT);
}

void loop(){
  time=millis()/1000;
  if(time++){
    no++;
  }
  if(no==10){
    no=0;
  }
  if(no==0){
    alp=a;
  }
  if(no==1){
    alp=b;
  }
  if(no==2){
    alp=c;
  }
  if(no==3){
    alp=d;
  }
  if(no==4){
    alp=e;
  }
  if(no==5){
    alp=f;
  }
  if(no==6){
    alp=g;
  }
  if(no==7){
    alp=h;
  }
  if(no==8){
    alp=i;
  }
  if(no==9){
    alp=j;
  }
  digitalWrite(latch,LOW);
  shiftOut(data,clock,LSBFIRST,alp);
  digitalWrite(latch,HIGH);
  delay(900);
}

digitalWrite(latch,LOW); shiftOut(data,clock,LSBFIRST,alp); digitalWrite(latch,HIGH); delay(900);

In the quoted code above, I've put it to LOW before every shift and HIGH after every shift. Do I do it the same to the load (latch) pin when programming the 74HC165?

Well I have just looked at the data sheet and it says that pin 1 is low to load. Therefore I would have that sketch as:-

int readShift() {
  //Pulse the latch pin
  //set it to 0 to collect parallel data
  digitalWrite(latchPin,0);
  //wait
  delayMicroseconds(1);
  //set it to 1 to transmit data serially  
  digitalWrite(latchPin,1);

  //while the shift register is in serial mode
  //collect each shift register into a byte
  //the register attached to the chip comes in first 
  return = shiftIn(dataPin, clockPin);
}

Do I need to put it back to LOW in order to state that it has finished transmitting? One more thing, Is the Q7 output data or the Q7 with - on top? Is CE connected to LOW or HIGH?

Datasheet: http://www.cytron.com.my/datasheet/IC/74/74HC165.pdf

Do I need to put it back to LOW in order to state that it has finished transmitting?

No.

CE is wired low.

Is the Q7 output data

Yes

Do I need to put it back to LOW in order to state that it has finished transmitting? No.

CE is wired low.

I mean the load(latch) pin. So?

I mean the load(latch) pin. So?

What dos this mean?

My last question is

Do I need to put it back to LOW in order to state that it has finished transmitting?

You said

No.

CE is wired low.

What I meant for my question is referring to the load (latch) pin. Is yours referring to it too?

Is yours referring to it too?

Yes you had three questions, I gave three answers.

Thanks. One more thing, does that mean that the Arduino is collecting binary data every 1 microseconds?

int readShift() {
  //Pulse the latch pin
  //set it to 0 to collect parallel data
  digitalWrite(latchPin,0);
  //wait
  delayMicroseconds(1);
  //set it to 1 to transmit data serially  
  digitalWrite(latchPin,1);

 //while the shift register is in serial mode  //collect each shift register into a byte  //the register attached to the chip comes in first  return = shiftIn(dataPin, clockPin); }

If that what's it mean, can I make the sketch:

void loop(){
  digitalWrite(loadpin,HIGH);
  shiftIn(datapin,clockpin);
  digitalWrite(loadpin,LOW);
  delayMicroseconds(1);
}

it's the same, right?

does that mean that the Arduino is collecting binary data every 1 microseconds?

No it means I am leaving the signal at the low state for 1 microsecond. Just to give it extra time. If you want you could just miss that delay out it will probably work just the same. The transfer occurs on the falling edge of that signal.

How can a 74HC165 encode 8 inputs and transfer the data through a RF module and decoded by a 74HC595 and finally to the output ? Both IC's have latch/load and clock pins, it's quite complex to just transfer a byte. You need to put the 165's load pin to LOW, trigger the 165's clock pin, put the 595's latch pin to HIGH, trigger the 595's clock pin, then put the 595's latch pin back to LOW in order to read the 8-bit binary data.

Or any paired 74 series IC that can do the job?

What you need is a UART at each end of the radio link. That would allow you to send 8 bits of data.
The AY-3-1015D was one such chip. Unfortunately this and other stand alone UARTS are obsolete now, they are all meant to be driven by a micro controller at the least. While you could make such a device using TTL logic it is a bit of a design job involving two shift registers (10 bits per byte), an oscillator, parity generator and sundry logic. You would be better off bit banging one from a small micro.

There were some chips that were specifically designed to send bits through a radio link but I never used them and I can’t seem to find them now.