多功能信号发生器的设计_毕业设计(编辑修改稿)内容摘要:
:std_logic。 begin if full39。 event and full=39。 139。 then t2:=not t2。 if t2=39。 139。 then d_out=39。 139。 else d_out=39。 039。 end if。 end if。 end process p_div。 end behav。 频率为 1MHz 的分频波形图: 9 其生成元器件如图 2所示: 图 2 数控分频器器件生成图 产生方波,是通过交替送出全 0和全 1实现,每 32 个时钟翻转一次。 其 VHDL代码如下: library ieee。 use。 entity square is port(clk,clr:in std_logic。 q:out integer range 0 to 255)。 end square。 architecture one of square is signal a:bit:=39。 039。 begin process(clk,clr) variable t:integer range 0 to 31。 begin if clr=39。 039。 then a=39。 039。 elsif clk39。 event and clk=39。 139。 then if t31 then t:=t+1。 else t:=0。 a=not a。 end if。 end if。 end process。 process(clk,a) begin if clk39。 event and clk=39。 139。 then 10 if a=39。 139。 then q=255。 else q=0。 end if。 end if。 end process。 end one。 其仿真波形如图 3所示: 图 3 方波仿真图 其生成元器件如图 4所示: 图 4 方波元器件生成图 该模块产生的三角波以 64个时钟为一个周期,输出 q每次加减 8。 其 VHDL代码如下: library ieee。 use。 use。 entity delta is port(clk,reset:in std_logic。 q:out std_logic_vector(7 downto 0))。 end delta。 architecture delta_arc of delta is begin 11 process(clk,reset) variable tmp:std_logic_vector(7 downto 0)。 variable a:std_logic。 begin if reset=39。 039。 then tmp:=00000000。 elsif clk39。 event and clk=39。 139。 then if a=39。 039。 then if tmp=11111110 then tmp:=11111111。 a:=39。 139。 else tmp:=tmp+39。 139。 end if。 else if tmp=00000001 then tmp:=00000000。 a:=39。 039。 else tmp:=tmp39。 139。 end if。 end if。 end if。 q=tmp。 end process。 end delta_arc。 其仿真波形如图 5所示: 图 5 三角波仿真图 其生成元器件如图 6所示: 12 图 6 三角波元器件生成图 该模块产生以 64个时钟为一个周期的正弦波。 其 VHDL代码如下: library ieee。 use。 use。 entity sin is port(clk,clr:in std_logic。 d:out integer range 0 to 255)。 end sin。 architecture sin_arc of sin is begin process(clk,clr) variable tmp:integer range 0 to 63。 begin if clr=39。 039。 then d=0。 elsif clk39。 event and clk=39。 139。 then if tmp=63 then tmp:=0。 else tmp:=tmp+1。 end if。 case tmp is when 00=d=255。 when 01=d=254。 when 02=d=252。 when 03=d=249。 when 04=d=24。多功能信号发生器的设计_毕业设计(编辑修改稿)
相关推荐
,其工作原理如图 21 所示: 图 21 称重传感器原理图 华中科技大学文华学院毕业设计(论文) 5 表 21 传感器主要技术指标 准确度等级 C3 额定载荷 kg 、 、 15 灵敏度 mV/V 177。 非线性 %. 177。 滞后 重复性 蠕变 %./30min 177。 蠕变恢复 零点输出 %. 177。 1 零点温度系数 %./10℃ 177。 额定输出温度系数 输入电阻 Ω 415~
1KR61KVCC +12V+12V +12V +12V +12V12J14CON212J15CON2R111RR121RR131RR141R12345678J9CON6VCCD9DIODED13DIODED15DIODED17DIODED10DIODED14DIODED16DIODED18DIODER71KR81KU9TLP5211VCCU10TLP5211VCCR110KR210KR1510K
edpNCD S 21 2 3 4 5 6 7a b c d e f g8dp9GNDabfcgdedpNCD S 31 2 3 4 5 6 7a b c d e f g8dp9GNDabfcgdedpNCD S 41 2 3 4 5 6 7a b c d e f g8dp9GNDabfcgdedpNCD S 51 2 3 4 5 6 7a b c d e f
数据复用。 在这种模式下, P0具有内部上拉电阻。 在 flash编程时, P0口也用来接收指令字节;在程序校验时,输出指令字节。 程序校验时,需要外部上拉电阻。 P1口: P1口是一个具有内部上拉电阻的 8位双向 I/O 口, P1 输出缓冲器能驱动 4个 TTL 逻辑电平。 对 P1 端口写 “1”时,内部上拉电阻把端口拉高,此时可以作为 输入口使用。 作 摘要 7 为输入使用时
地址 /数据复用。 在这种模式下, P0具有内部上拉电阻。 在 flash编程时, P0口也用来接收指令字节;在程序校验时,输出指令字节。 程序校验时,需要外部上拉电阻。 P1口: P1口是一个具有内部上拉电阻的 8位双向 I/O 口, P1 输出缓冲器能驱动 4个 TTL 逻辑电平。 对 P1 端口写 “1”时,内部上拉电阻把端口拉高,此时可以作为 输入口使用。 作 摘要 7 为输入使用时
te_(0x80+9)。 } if(keynum==6) { month++。 if(month==13) month=1。 write_nyr(5,month)。 write_(0x80+6)。 } if(keynum==7) { year++。 if(year==99) year=0。 write_nyr(2,year)。 write_(0x80+3)。 } } } /*按键减 */