디지털시계
- 최초 등록일
- 2009.12.27
- 최종 저작일
- 2009.07
- 8페이지/ 한컴오피스
- 가격 1,000원
소개글
1.stop-watch
2.watch
두개의 verilog 소스 포함, 결과화면
목차
Stop_watch소스
Digital Watch 소스
본문내용
입력
1) Clock 신호 (100 Hz)
2) Reset 신호 (push button 이용)
3) Enable 신호 (push button 이용)
⇨ mode 신호 추가
출력
1/100초 단위로 출력되는 2자리숫자와 초단위의 2자리 숫자
4개(4-digit7segmentdisplay1모듈) 이용하여 구현
⇨ 분단위와 시단위 각각 2자리 추가
Stop_watch소스
library ieee;
use ieee.std_logic_1164.all;
entity st_watch is
port (clk : in std_logic; --1kHz 클럭주파수
mode : in integer range 4 downto 0; --시계의 동작모드가 1일 때 stop_watch 표시
sw_f1 : in std_logic; --stop_watch의 시작, 정지버튼
sw_f2 : in std_logic; --stop_watch의 초기화 버튼
hour : out integer range 23 downto 0; --시간 출력
minute : out integer range 59 downto 0; --분의 출력
second : out integer range 59 downto 0; --초의 출력
sec_hun : out integer range 99 downto 0); --1/100초의 출력
end st_watch;
architecture a of st_watch is
signal hur : integer range 23 downto 0;
signal min : integer range 59 downto 0;
signal sec : integer range 59 downto 0;
signal sec_100 : integer range 99 downto 0;
signal cnt : integer range 9 downto 0;
signal clk_hun, clk_sec, clk_min, clk_hur : std_logic;
signal start : std_logic;
참고 자료
없음