In this paper a family of novel spreading code called Latin square code (LSC) is proposed for spectral amplitude coding-optical code division multiple access (SAC-OCDMA) system. The main feature of the proposed code is the zero cross-correlation which eliminates both multiple access interference (MAI) and phase induced intensity noise (PIIN). The code construction can be easily accomplished using Latin square matrix (LSM) for any weight and number of users. The simplicity in the construction code has made it a compelling candidate for future OCDMA applications. SAC-OCDMA system employing direct decoding is mathematically analyzed and then numerically simulated using Matlab and OptiSystem respectively. The results show the improvement given by the LSC code to the SAC-OCDMA system compared to the other codes such as: ZCC (zero cross-correlation) and MMS (modified multiservice) by allowing high cardinality and improving BER. Furthermore, the transmission quality, so that the BER does not exceed the value of $10^{-9}$, is ensured by the LSC code with a lower effective source power of -14.5 dBm, a bit rate of 4.6 Gb/s and a cardinality exceeding ZCC and MMS by 1.7 and 1.22 times respectively. The simulation results validate the mathematical analysis and show that the system makes it possible to increase the transmission distance without affecting QoS (quality of service)