fezder
Well-Known Member
Right,at first I thought this chip is easy to use. Turns out, something odd is going on here.
I had it correcly hooked in my understandig, but wrong wiring gives me right results! I know....but read on.
first off code, It's small, and used only 3 pins (which is one confusion, I should use clock_inhibit, but I have it hooked on GND)
Now then, the confusion. IF it short serial-in (pin 10) from '165 to gnd, not using it, no matter what I do, I always lose one bit of data.
Then, I figured to start laying "button" signals from lm3914 (used it as knob-controlled button-array of sorts) starting from SERIAL-input pin of '165, and guess what? Now I get all data I want! . But any clues, why not when It was hooked correctly?
datasheed for you:
**broken link removed**
Anyone willing to test this?
I had it correcly hooked in my understandig, but wrong wiring gives me right results! I know....but read on.
first off code, It's small, and used only 3 pins (which is one confusion, I should use clock_inhibit, but I have it hooked on GND)
C:
byte PISOdata = 3; //input from SiPo
byte PISOlatch = 4; //latch for SiPo, LOW=load
byte PISOclk = 5; //SiPo clock
byte PISOreceivedData;
void setup()
{
pinMode(PISOdata, INPUT);
pinMode(PISOlatch, OUTPUT);
pinMode(PISOclk, OUTPUT);
Serial.begin(9600);
}
void loop()
{
digitalWrite(PISOlatch, LOW); //load register
digitalWrite(PISOlatch, HIGH); //register at high, to allow reading
for (byte i = 0; i < 8; i++)
{
digitalWrite(PISOclk, LOW);
digitalWrite(PISOclk, HIGH);
Serial.print(digitalRead(PISOdata));
}
Serial.println();
}
Then, I figured to start laying "button" signals from lm3914 (used it as knob-controlled button-array of sorts) starting from SERIAL-input pin of '165, and guess what? Now I get all data I want! . But any clues, why not when It was hooked correctly?
datasheed for you:
**broken link removed**
Anyone willing to test this?