I tried the circuit with a D flip-flop and a 555 as oscillator, it works fine.Like you all said, I coud save some parts and use an IC instead.Anyway, since I will use a CPLD to embed all the logics, I want to do an oscillator with gates instead of using a 555.Which could be a good design to achieve it?With NAND or inverter gates?