In this paper we present a theoretical simulation that evaluate the performance of directsequence optical code-division multiple-access (DS-OCDMA) system, using a novel periodic optical encoder applied to fiber-to-the-X (FTTX) passive optical network (PONs). We investigate the performances in terms of signal to noise ratio (SNR) and bit error rate (BER) in the presence of multiple access interference (MAI) and an additive white Gaussian noise (AWGN). Three groups of parameters were considered in this work: the number of users, the parameters related to the encoder and the parameters of the receiver.Keywords: direct-sequence optical code-division multiple-access (DS-OCDMA), fiber-to-the-X (FTTX), passive optical network (PONs), periodic optical encoder.