The usual (not always the best for large $\lambda$) way of generating Poisson distributes psuedo random numbers is to use Knuth's algorithm.
Psuedo-code for this is shwn below:
Code:
function PRN(lambda)
% -------------------------------------------------------------
% Generate a random value from the (discrete) Poisson
% distribution with parameter lambda, using Knuth's Algorithm.
%
% See pages 132-3 of v2 TAOCP, Semi-Numerical Algorithms 2nd Ed. Don Knuth 1981.
%
%--------------------------------------------------------------
k=0;prod=UniformRand;
repeat
if prod<=exp(-lambda)
break
endif
prod=prod*UniformRand;
k=k+1;
end
return k
endfunction