In this paper the basic requirements for the automatic railways crossing devices are formulated. A block diagram, which consists of elements that make the automatic railways crossing systems are presented and their working principles are discussed. Based on the hardware description language - Verilog, a digital railway crossing control system is designed and is implemented with complex programmable logic device, taking into account the requirements. As an opportunity for practical application the controller CoolRunner II could be used. Simulation results with set input parameters are shown to represent the functionality of the designed system. The results obtained can be used for design, implementation, simulation and development of such types of systems in railway crossing automatics.