附录
附录1:元器件清单 元件 数量 U1 1 U2 1 U3 1 U4 1 U5 1 Y1 1 Y2 1 S1 、S2、 S3、 5 S4 、S5 S6 1 D1 1 D2 、D3 2 D4 1 C1 、C2、 C13 3 C3、C16、 C19 3 C4、 C8 2 C5 、C6 、C15 3 C7 1 C9、C10 2 C11、C17 2 C12 1 C14 1 C18 1 C20 1 C21 1 R1、R9、R12 3 R2、R11 2 R3 1 R4 1 R5 1 R6 1 R7 1 R8 1
型号与数值 89C51 MC145152 MC12022 MC1648 ML358 12MHz 10.24MHz IN4148 MV209 1000pF 0.1uF 12pF 30pF 22nF 10uF 100uF 10uF 300uF 0.01uF 30pF 30pF 10K 1K 2.2K 3.3K 47K 18K 22K 12K 备注 单片机 频率合成器 前置分频 压控振荡器 集成运放 晶振 晶振 按键开关 波段开关 二极管 变容二极管 发光二极管 瓷片电容 瓷片电容 瓷片电容 瓷片电容 瓷片电容 电解电容 瓷片电容 瓷片电容 瓷片电容 瓷片电容 电解电容 可调电容 电阻 电阻 电阻 电阻 电阻 电阻 电阻 电阻
附录2:电路原理图
附录3:程序
Library IEEE;
use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity ssend is
Port(clk,reset:in std_logic;
add:in std_logic;--频率增加键 sub:in std_logic;--频率减少键
convert:in std_logic_vector(1 downto 0);
A:out std_logic_vector(5 downto 0);--分频预置数输出 N:out std_logic_vector(9 downto 0); --分频预置数输出) end ssend ;
architecture Behavioral of ssend is type state is(st0,st1,st11,st2,st22); signal s:state;
type states is(sst0,sst1,sst2); signal sst:state;
type statess is(million,ten_thousand,thousand,hundred,ten,gewei,zhen,wait_s) ;
signal current:statess;
signal keyclk,flag,cclk0:std_logic;
signal frequence:integer range 0 to 109000; signal fm:integer range 0 to 500; signal fa:integer range 0 to 50; signal FN:integer range 0 to 2; begin
pulse:process(reset,clk)
variable cclk:std_logic;
variable nn:integer range 0 to 25000; begin
if reset='0' then nn:='0'; cclk:='0';
else if rising_edge(clk) then
if nn=24999 then cclk:=not cclk; nn:=0;---24999 else nn:=nn+1; end if; end if;
cclk0<=cclk; end process;
process(reset,cclk0)
variable aa:integer range 0 to 10; variable clkkey:std_logic;
begin
if reset='0' then aa:='0';clkkey:='0'; else if rising_edge(cclk) then if aa=4 then aa:=0;clkkey:--4 else aa:=aa+1; end if; ind if;
keyclk<=clkkey; end process;
process(reset,convert) begin
if reset='0' then fm<=25;FA<=2;FN<=0;
else if convert=\频率增加25KHz else if convert=\频率减小50KHz else if convert=\频率减小500KHz else null; end if ;
end process;
process(reset,add,sub,keyclk,fm,fa,fn)--按键进程 variable fre:integer range 0 to 109000; variable AA:integer range -100 to 200; variable NN:integer range 0 to 400; begin
if reset='0' then
s<=st0;fre:=32000;flag<='0';AA:=56;NN:=46; else if keyclk'event and keyclk='1' then case s is
when st0>=flag<='1';A<=conv_std_logic_vector(AA,6); N<=conv_std_logic_vector(NN,10); if add='0' then s<=st1;flag<='0'; else if sub='0' then s<=st2;flag<='0'; end if; when st1>=
if add='1'then
fre:=fre+fm;AA:=AA+fa;NN:=NN+fn;s<=st11; end if;
when st11>=if AA>=64 then AA:=AA-64;NN:=NN+1;s<=st0; else s<=st0; end if;
when st2>=if sub='1' then
fre:=fre-fm; AA:=AA-fa;NN:=NN-fn;s<=st22;
end if;
when st22>=
if(AA>0 or AA=0) then s<=st0; else
AA:=64+AA;NN:=NN-1;s<=st0; end if; end case; end if;
frequence<=fre; end process;
end Behavioral;--程序结束