数电研讨---医用生产线设计报告.docxVIP

  • 1
  • 0
  • 约8.55千字
  • 约 18页
  • 2017-08-19 发布于重庆
  • 举报
数电研讨---医用生产线设计报告

PROJECT REPORT实验课程:数字电路EDA实验实验名称:医用生产线【Requirement】?Be able to preset the number of tablets per bottle,for example ,fifty tablets each bottle. ??Every box contains twenty-four bottles, stop count until 18 ??Use software to design the simulation,Quartus II will be better. 【Principle and framework given by teacher】【Our system framework】【1.0】【2.0】【Modular design and simulation】Keyboard prcessor【Function introduction】As project requirement, we can optional set keyboard size and what is the key arrangement. However , inconsideration of engineering application, we chose 4*4 keyboard , as indicated below.Just as the picture illustrated above, We define “A” are the first counter enable pin .When the A pin is high ,corresponding counter accept 8-bit number as its period. So as B and C.D is the reset put which clear the number of register. ‘*’and ’#’ are use as back-up.Basic on this keyboard framework we can easily achieve our program use VHDL.At first ,wedivide the keyboard into a 4 row and 4 column and then judge its value using case sentence.【Programming】LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;ENTITY KEYBOARD IS PORT(CLK: IN STD_LOGIC;ROW: IN STD_LOGIC_VECTOR(3 DOWNTO 0); //行向量COL: IN STD_LOGIC_VECTOR(3 DOWNTO 0); //列向量DATA: OUT STD_LOGIC_VECTOR(3 DOWNTO 0);F:OUT STD_LOGIC; //给寄存器判断是否有输入EN1: OUT STD_LOGIC;EN2: OUT STD_LOGIC;EN3: OUT STD_LOGIC);END ENTITY KEYBOARD;ARCHITECTURE RTL OF KEYBOARD ISSIGNAL MID: STD_LOGIC_VECTOR(7 DOWNTO 0);SIGNAL NUM: STD_LOGIC_VECTOR(3 DOWNTO 0);BEGINPROCESS(CLK,ROW,COL)BEGINMID=(ROWCOL);IF (CLKEVENT AND CLK=1) THENCASE MID IS //使用的是4*4标准矩阵键盘WHEN NUM=0001;WHEN NUM=0010;WHEN NUM=0011;WHEN NUM=0100;WHEN NUM=0101;WHEN NUM=0110;WHEN NUM=0111;WHEN NUM=1000;WHEN NUM=1001;WHEN NUM=0000;WHEN NUM=1010;EN1=0;EN2=0;EN3=0;//清零WHEN NUM=1111;EN1=1;EN2=0;EN3=0;//第一个计数器计数值WHEN NUM=1111;EN1=0;EN2=1;EN3=0;//第二个计数器计数值WHEN 0100100

文档评论(0)

1亿VIP精品文档

相关文档