Any ways that I can generate a 30s delay for my traffic light vhdl code? the red light will stay for 30s, yellow light for 2s. How to generate these delay? Pls help.
DESIGN A COUNTER AND BE CAREFUL WITH YOU SYSTEM CLOCK FOR EXAMPLE YOU HAVE A CLOCK FO 40M ,25ns FOR ONE CYCLE.YOU WILL DESIGN A COUNTER OF (30S+2S)/25NS
you need a set of counter to implement the timers...
First up all u need to find the 1micro-second tick..the generation of this depends on the clock operating frequency of your circuit..for example if u r operation @ 200Mhz.. then u need to design a counter to increment for every clock and once the counter reaches 200.. a pulse is generated, which indicates 1micro-second tick..use this tick to generate millisecond.. and the millisecond count to sec counter and second count tick to generate the required timers...