In this paper, we first present a new mathematical approach, based on large deviation techniques, for the study of a large random recurrent neural network with discrete time dynamics. In particular, we state a mean field property and a law of large numbers, in the most general case of random models with sparse connections and several populations. Our results are supported by rigorous proofs. Then, we focus our interest on large size dynamics, in the case of a model with excitatory and inhibitory populations. The study of the mean field system and of the divergence of individual trajectories allows to define different dynamical regimes in the macroscopic parameters space, which include chaos and collective synchronization phenomenons. At last, we look at the behavior of a particular finite-size system submitted to gaussian static inputs. The system adapts its dynamics to the input signal, and spontaneously produces dynamical transitions from asynchronous to synchronous behaviors, which correspond to the crossing of a bifurcation line in the macroscopic parameters space.