Understanding how to evaluate $\lim_{x\to\frac\pi2} \frac{2^{-\cos x}-1}{x-\frac\pi2}$ 
Evaluate $$\lim_{x\to \frac\pi2} \frac{2^{-\cos x}-1}{x-\frac\pi2}$$

$$$$
My approach:
$$$$
Substituting $x-\pi/2=u$, $$\lim_{x\to \frac\pi2} \frac{2^{-\cos x}-1}{x-\frac\pi2}=\lim_{u\to 0} \frac{2^{\sin u}-1}{u}$$
$$$$
Here I noticed the similarity of the limit with the known limit $\lim_{u\to 0} \frac{a^{u}-1}{u}=\ln(a)$ $$$$In the above limit if we plugged in $u=0$ directly, we would get the following indeterminate form:
$$\lim_{u\to 0} \frac{a^{u}-1}{u}=\frac{a^{0}-1}{0}=\frac{1-1}{0}=\frac{0}{0}$$
Now if we put $u=0$ in $\lim_{u\to 0} \frac{2^{\sin u}-1}{u}$ we once again get $$\lim_{u\to 0} \frac{2^{\sin u}-1}{u}=\frac{2^{0}-1}{0}=\frac{1-1}{0}=\frac{0}{0}$$
$$$$This similarity made me wonder if I could use the result $$\lim_{u\to 0} \frac{a^{u}-1}{u}=\ln(a)$$ in the case of $$\lim_{u\to 0} \frac{2^{\sin u}-1}{u}$$
And indeed on using the result, I got the correct answer: $\ln(2)$.$$$$ However I'm not sure if and why the method is mathematically correct.  Or if this method that I have used just happens to work in this case. $$$$The reason is as follows:$$$$ In the limit $\lim_{x\to 0} \frac{a^{x}-1}{x}=\ln(a)$ the power to which $a$ is raised is the same as the term in the denominator. $$$$
Likewise if I had made the substitution $x=\sin u$, then the limit would become $\lim_{\sin u\to 0} \frac{a^{\sin u}-1}{\sin u}=\ln(a)$, and then the power to which $a$ is raised is the same as the term in the denominator. However in the limit $$\lim_{u\to 0} \frac{2^{\sin u}-1}{u}$$ the power to which $2$ is raised $isn't$ the same as the term in the denominator. Thus this limit seems to be a 'hybrid' to which I'm applying the known result for a 'pure limit' (as in one where the power to which $a$ is raised is the same as the term in the denominator).
$$$$Under these circumstances is the method I have used correct? If so, then when can we use this method where $x\to k$ implies $f(x)\to l$, thus making some formula about limits valid, in the way $\lim_{u\to 0} \frac{2^{\sin u}-1}{u}=\ln(2)$ seems to be valid as $x\to 0$ implies $f(x)=\sin x\to 0$ ? 
$$$$I would be truly grateful for any help. Many many thanks in advance!
Edit: In short, could somebody please explain $why$ the formula I've used is correct, despite, the power to which 2 is raised ($\sin u$) being different from the term in the denominator (u), and also the condition of the limit being $u\to 0$ whilst the power to which 2 is raised is $\sin u$ and not $u$.? In other words, is it correct to use the formula $$\lim_{u\to 0} \dfrac{2^{\sin u}-1}{u}=\ln(2)$$ merely because $u\to 0$ implies$$\sin u\to 0\Rightarrow 2^{\sin u}\to 1$$, which is essentially what is happening in the limit $\lim_{u\to 0} \frac{a^{u}-1}{u}=\ln(a):u\to\Rightarrow a^u\to 0$
 A: It suffices to write :
$$\frac{2^{\sin u}-1}{u} = \frac{2^{\sin u}-1}{\sin u}\frac{\sin u}{u}$$
and you know that
$$\lim_{u\to 0} \frac{2^{\sin u}-1}{\sin u} = \lim_{U\to 0} \frac{2^{U}-1}{U} = \ln(2)$$
and 
$$\lim_{u\to 0} \frac{\sin u}{u}=1.$$
Other method : posing $f(x) = 2^{\sin x}=e^{\ln(2)\sin x}$, we see that $f'(x) = \ln(2)\cos x\,e^{\ln(2)\sin x}$ hence
$$\lim_{u\to 0} \frac{2^{\sin u}-1}{u} = \lim_{u\to 0}\frac{f(u)-f(0)}{u-0} = f'(0) = \ln(2).$$
A: A quick answer I can give:
Since $f(u) = \dfrac{2^{\sin(u)} - 1}{u}$ is NOT continuous at $u = 0$, $\lim_{u \to 0}f(u) \neq f(0)$. 
You ask whether you're allowed to use $$\lim_{u \to 0}\dfrac{a^u - 1}{u} = \lim_{u \to 0} \dfrac{2^{\sin(u)} - 1}{u}\text{.}$$
As above, let $f(u) = \dfrac{2^{\sin(u)} - 1}{u}$, and let $g(a, u) = \dfrac{a^u - 1}{u}$.
First of all, the limit $\lim\limits_{u \to 0}\dfrac{a^u - 1}{u}$ works as long as $a > 0$ (do you see why?), so this validates using the $2$ in place of $a$.
For notation's sake, let $h(u) = g(2, u)$.
Notice that 
$$h(\sin(u)) = f(u)\text{.}$$
We wish to show $$\lim_{u \to 0}h(\sin(u)) = \lim_{h \to 0}f(u)$$
but
$$\lim_{u \to 0}h(\sin(u)) = \lim_{\sin(u) \to 0}h(\sin(u)) = \lim_{h \to 0}f(u)$$
which is true if and only if $h(\cdot)$ and $f(\cdot)$ are equal (I might be wrong on this statement). But they aren't (with respect to $u$).
A: Your working is correct to an extent.
Resuming from
$$\lim_{u\to 0} \frac{2^{\sin u}-1}{u}$$
$\qquad\lim_{u\to 0} \frac{2^{\sin u}-1}{u}=
\lim_{u\to 0} \frac{2^{\sin u}-1}{\sin u}\frac{\sin u}{u}$
From here the first fraction's limit is $ln(2)$ as we can substitute $r=\sin u$ for first fraction and it is in the form of $\lim_{r\to 0} \frac{2^{r}-1}{r}=\ln(2)$ and for the second fraction the limit is $1$.
So finally $\lim_{u\to 0} \frac{2^{\sin u}-1}{\sin u}\frac{\sin u}{u}=ln(2)$
A: The limit is the derivative of $f(x)=2^{-\cos x}$ at $x=\pi/2$. A simple calculation gives $f'(x)=2^{-\cos x}\sin x\log 2$, so the limit is
$$
f'(\pi/2)=\log 2
$$

If you prefer Taylor expansion, after having performed the substitution $x-\pi/2=t$, you have
$$
\lim_{t\to0}\frac{2^{\sin t}-1}{t}
$$
and
$$
2^{\sin t}=e^{\log2\cdot\sin t}=
1+(\log2\cdot\sin t)+o(\log2\cdot\sin t)
$$
Since $\sin t=t+o(t)$, we have
$$
o(\log2\cdot\sin t)=o(t\log2+o(t))=o(t)
$$
and therefore the limit is
$$
\lim_{t\to0}\frac{1+\log2\cdot\sin t+o(t)-1}{t}=\log2
$$
