A new method for determining the separate temperature factors (STF) for different atoms in two-atom compound crystals is put forward. Using the characteristics of resonant X-ray dynamical diffraction by perfect crystals near the atomic absorption edge,two equations of STF are derived. As the parameters in the equations can be obtained from experimental measurement and theoretical calculation, STF can be determined by solving the equations. We applied this method to a perfect crystal GaAs at 300K, and obtained BGa=0.4573×10-20m2,BAs=0.7339×10-20m2. This method may be extended to the cases of multi-atom compound crystals.