Rapid thermal diffusion (RTD) of P and/or B into silicon wafer from spin-on sources using tungsten halogen lamps was successfully used to fabricate very shallow n+-p and/or p+-n junctions. RTD was performed in the temperature range of 600-1080-degrees-C for 5-60 s, and the heating rates were varied in the range 10-83-degrees-C/s. Effects of the two-step RTD, high temperature for several seconds, and subsequently low temperature for 60 s, were also examined. The RTD of P was carried out from P-doped oxide films and of B was carried out from polymeric boron-doped films. Using RTD we can obtain a very shallow junction thinner than 20 nm in depth. The impurities diffusion bv RTD are similar to the conventional furnace processing. However, the RTD of P and/or B was enhanced with the heating rate, especially at 83-degrees-C/s. This was ascribed to the stress field induced in the heating stage. The junction depth, the I-V characteristics, spectral response, and the cell parameters of fabricated photodiodes are presented.