By designating different frequencies to different mark positions of the modified prime code, a frequency-time spreading code is proposed. The side lobe of auto-correlation and cross-correlation of the proposed code have relatively lower values. The scheme greatly improves the total number of the available codes in asynchronous optical code division multiple access (OCDMA) system. Numerical results show that the asynchronous OCDMA system using the proposed code has excellent performance in the presence of double hard limiters. We also introduce an encoding/decoding device which is based on the frequency-time spreading modified prime code.