Lots of difficulty with shift register

Hey, trying to get a shift register working with my Pro Micro so I can eventually daisy chain three.

I followed this tutorial like so many others have, and it does not act as I would expect.

I mainly wonder if my using the Micro rather than an Arduino brand board is causing the problems. That's probably not it, so I'm also wondering if the pins I use for clock, data and latch need to have specific capabilities, eg. PWM, SCK etc. Does the tutorial use pins 8, 11 and 12 for any reason? Here is the graphical datasheet for the Pro Micro, and here's the datasheet for the 74HC595.

My circuit is as follows:

74HC595 Pro Micro
SER 10
RCLK 16
SRCLK 14
OE GND
SRCLR VCC

VCC VCC
GND GND

I also have pin 15 on an led to signal transmission states. Here is my code:

#define LATCH_PIN 16
#define CLOCK_PIN 14
#define DATA_PIN 10
#define LED_PIN 15

void setup() {
  pinMode(LATCH_PIN, OUTPUT);
  pinMode(LED_PIN, OUTPUT);
}

void loop() {
  transmitByte(B00010000);
  digitalWrite(LED_PIN, LOW);
  delay(1000);
  transmitByte(B01010000);
  digitalWrite(LED_PIN, HIGH);
  delay(1000);
}

void transmitByte (byte msgIn) {
  digitalWrite(LATCH_PIN, LOW);
  shiftOut(DATA_PIN, CLOCK_PIN, MSBFIRST, msgIn);
  digitalWrite(LATCH_PIN, HIGH);
}

As you can see, I'm trying to get the numbers 1 and 5 on the second half byte, QE-H. Currently with this sketch running QB, QD, QE and QH are HIGH. I really don't know what's wrong.

Also, as recommended in other posts I took the 0.1uf cap off the latch pin and added it between VCC and GND as a decoupling capacitor.

Any help would be greatly appreciated, thanks!

Is the capacitor of the ceramic type? It has to be.
Each shift register needs its own capacitor.Hence on the MUX side of the 0.1u capacitor the voltage is 0V however, on the RESET pin side it remains at 5V.

The code is wrong, you need to output all the bytes before you trigger the latch pin.

And, I think, CLOCK_PIN and DATA_PIN also need to be set to OUTPUT.

The cap is ceramic, but should I use it between VCC and GND or between Latch and GND?

Thanks for the corrections, I will try and report back

Between Vcc and ground. If it is on the latch pin it will mess up the pulse shape.

You said it doesn't behave as you expect.

You have not explained what it does that is different from what you expect - this will contain clues to the issue.

groundfungus:
Between Vcc and ground. If it is on the latch pin it will mess up the pulse shape.

They actually do put a cap on that pin in the tutorial... AND THEY NEGLECT THE DECOUPLING CAP. The arduino playground/tutorial pages are not exactly a museum of good electronic design. Frankly, neither are the Arduino boards.

Thanks for all the advice! The problem did appear to be the order of the latch trigger. I also set the pinMode for the other two pins. It's working just as it should now!