In this work we study the relation between investment in R&D, the technological innovation, diffusion, fluctuations and growth of output. Technological innovation is the result of a process (investment in R&D) whose final outcome is fundamentally uncertain. We model innovation as a Polya urn scheme, where the probabilityof an individual success increaseas with the number of (previous) successes. We also model technological diffusion as an epidemic birth-and-death stochastic process, tipically a non-linear process. The diffusion of a new technology is to a degree intrinsically stochastic: it depends on aggregate feedbacks (global environment) as well as on local feedbacks (imitation) or investiment (output demand). Firm growth and aggregate growth are related: if we measure the former in terms of firm size, the latter depends both on firm growth and on growth in the number of innovators. Firm growth is due to productivity growth (technological change), whose incentive, from the firm point of view, is profit. Higher cash flow (profits) implies higher funds for investment, higher research effort, and thus potentially faster technological change. However, if innovationsspread out, monopoly rents will be temporary, and when someone innovates sooner or later everybody will innovate (unless exiting the market). In Part I of the paper we describe the mechanics of technological innovation and diffusion and a model for an innovating firms. In Part II the deterministic and stochastic laws of motion which arise are analyzed in detail.