Recently, it’s proposed that spin torque oscillators and spin torque diodes can be used as artificial neurons and synapses to directly process the microwave signal, which can lower latency and power consumption greatly. However, one critical challenge is to make the microwave emission frequency of the STO stay constant with the varying input current. In this work, we study the microwave emission characteristics of STO based on magnetic tunnel junction with MgO cap layer. By applying a small magnetic field, we realize invariability of the microwave emission frequency of STO, making it qualified to act as artificial neuron. Furthermore, we have simulated an artificial neural network using the STO neuron to recognize the handwritten digits in Mixed National Institute of Standards and Technology (MNIST) database and obtained a high accuracy of 92.28%. Our work paves the way for the development of RF-oriented neuromorphic computing system.