Forum Discussion
Altera_Forum
Honored Contributor
16 years agoTV Decoder
hello, i am trying to blink the ledg[3] on the de2 Board with the following code but i don't have succes, i think that Problem is on (posedge iTD_VS) the V Sync output of the TV Decoder....how could i resolve it
assign oLEDG[3] = SW_RST; reg SW_RST; reg [1:0]SA; reg [1:0]PRE_SA; always @( posedge iTD_VS ) begin if ( SA != PRE_SA ) begin SW_RST = 0; PRE_SA = SA; end else begin SA = iSW[17:16] ; SW_RST = 1; end end1 Reply
- Altera_Forum
Honored Contributor
--- Quote Start --- hello, i am trying to blink the ledg[3] on the de2 Board with the following code but i don't have succes, i think that Problem is on (posedge iTD_VS) the V Sync output of the TV Decoder....how could i resolve it assign oLEDG[3] = SW_RST; reg SW_RST; reg [1:0]SA; reg [1:0]PRE_SA; always @( posedge iTD_VS ) begin if ( SA != PRE_SA ) begin SW_RST = 0; PRE_SA = SA; end else begin SA = iSW[17:16] ; SW_RST = 1; end end --- Quote End ---reg cnt;//6 bit for 50hz Vframe LED will blink with 50/64=0.8HZ. for 60 hz vframe LED will blink 0.94hz. assign oLEDG = cnt; always @( posedge iTD_VS ) begin cnt <= cnt+1'b1; end