We have proposed a new modified quadratic congruence (MQC) code for spectral amplitude-coding optical code division multiple access (CDMA) systems. Although this new MQC code has many advantages, however, it only exists for each prime number p. In this letter, we have proposed a family of new codes which can be constructed by an algebraic technique over each GF(Q) field for each prime power Q=p/sup n/ (where n is a positive integer). Therefore, compared with MQC, this new code exits for a much wider number of integers, and hence, we can choose a code with the desired length more freely. Moreover, with the same properties as the former MQC code, this new code possesses all the advantages of MQC code, such as suppression of the intensity noise, easy implementation by using fiber gratings, and convenience to realize flexible encoder reconfiguration.