The basic idea of a flip flop is you put data onto the input lines, then toggle the clock line and the flip flop stores the value on the input line and puts it onto the output line, then you're free to change the input and it will still retain the same value on the output. So because of this, you can connect a microcontroller pin to multiple flip flops (so long as they have separate clocks, so usually that means separate chips), and that same pin can drive as many outputs as you have flip-flops. So in this case, with an octal flip flop IC, you'd use 8 microcontroller pins to drive 16 address lines (well, 10 microcontroller pins because of the clock on each flip flop IC).
For the sake of simpler code, use a single port on the microcontroller (I'll use PORTA as a completely arbitrary example). Both flip-flops will connect their inputs to that port (only the flip-flop inputs, each clock goes on a separate I/O pin). So, using the standard nomenclature of D = input, Q = output, PORTA0->D0, PORTA1->D1 . . . PORTA7->D7.Now, if you want to connect it the way I suggested (A8-15/A16-23), the outputs for the first FF IC would be Q0->A8, Q1->A8 . . . Q7->A15, and the outputs for the second FF IC would be Q0->A16 . . . Q7->A23. Now, to go about using them, we'll start with my pseudocode example
here and modify it to utilize the flip-flops on the upper address lines. Some flip-flops are positive-edge triggered, some are negative-edge triggered. This refers to whether the data is latched when the clock goes low-to-high (positive edge) or high-to-low (negative edge). Check your data sheet and if necessary, swap the high/low commands on the clock lines. I'll assume positive edge:
Code:
char ReadByte(int address)
-Pull all control lines (OE, WE, CE) high
-Set up A0..A7
-Pull FF1 Clock low
-Set up A8..15
-Pull FF1 Clock high
-Pull FF2 Clock low
-Set up A16..23
-Pull FF2 Clock high
-Pull CE and OE low
--[DELAY]--
-Read data lines
-Pull CE and OE high
-Return data
Notice that even though A8-15 and A16-23 are using the same I/O pins on the microcontroller, the flip-flops are storing the values for you, so once you store A8-15 in FF1, you can change the microcontroller I/O pins to the value of A16-23 and latch that. In fact, you could do it with a single flip flop, toggle the clock line, then switch to the other value and not use a second flip flop at all. So PORTA0->D0, Q0->A8 and also PORTA0->15, etc.
I hope this makes sense, I'm pretty wiped out from a long weekend and if anything I said here doesn't make sense, I blame lack of sleep