This oxygen and nitrogen generation system uses pressure swing adsorption principles at normal temperatures, along with clean, compressed air as the raw material, and a carbon molecular sieve as the adsorbent. Due to different adsorption of oxygen and nitrogen onto the carbon molecular sieve surface as well as different diffusion rates through the open or closed program control valve, separation of the two gasses is achieved, and nitrogen of required purity is produced.