Forum Discussion
Altera_Forum
Honored Contributor
9 years agodigital watch
hello every one i have design digital watch second , minute , hour after i execute the code the counter second and minute counter ok work . for 0 to 59 but hour counter form 0 to 99 ? i have quest...
Altera_Forum
Honored Contributor
9 years agoyes bro when i execution on broad show me hour counter from 00 to 99 but supposed work 00 to 24.....
IF ( H1 = 10) THEN
H1 :=0;
HR_1 <=0;
H2 := H2 +1;
IF ( H2 = 1 OR H1= 3 ) THEN
H2 :=0;
HR_2 <=0;
END IF;
i change H2= 1 counter will show me counter 00 to 19 after that he rest again
IF ( H2 = 1 ) THEN
H2 :=0;
HR_2 <=0;
END IF;
i change H2= 2 counter will show me counter 00 to 29 after that he rest again
IF ( H2 = 2 ) THEN
H2 :=0;
HR_2 <=0;
END IF;
i change H2= 3 counter will show me counter 00 to 39 after that he rest again
IF ( H2 = 3 ) THEN
H2 :=0;
HR_2 <=0;
END IF;
so how make counter to 00 to 24 or 00 to 12