设计一个以AT89C51为核心的电子钟。可以实现时间显示和设置闹钟功能。用89C51单片机设计一个电子钟,有8位数码管显示时分秒,具有时钟功能,并且带有三个闹钟功能,有一路输出控制蜂鸣器,提示设定闹钟已到。 在AT89C51单片机内部对机器周期进行计数,从而得到定时。采用单片机的内部计数器T0,并使其工作在方式1,振荡脉冲频率为12MHZ,这样一个机器周期为1μs,计满一次为65536μs
1
S5P4418裸机系列教程 之按键查询方式,按下按键,与之对应的LED灯自动点亮且蜂鸣一声,抬起按键,则自动熄灭
2021-06-20 15:59:12 494KB 裸机 s5p4418
1
将《练习》简谱数据提取出,装入寄存器(存储器),在FPGA(我用的是EP2C5Q208C8)及时钟的控制下不断提取存储器中的数据,用蜂鸣器演奏。蜂鸣器必须是无源蜂鸣器。
2021-05-25 08:46:13 874KB FPGA、蜂鸣器
1
按键 控制蜂鸣器 具有暂停与鸣叫的功能 内附有Keil程序和Proteus仿真 可以调试看效果 绝对可以运行。
2021-05-19 14:13:25 53KB 蜂鸣器
1
用STM32控制蜂鸣器唱《我和我的祖国》 用STM32控制蜂鸣器唱《我和我的祖国》 用STM32控制蜂鸣器唱《我和我的祖国》
2021-04-28 20:03:28 660KB 蜂鸣器唱歌 我和我的祖国 STM32
1
2个独立按键控制蜂鸣器发出不同声音 汇编
2021-04-15 17:35:47 22KB 单片机
1
FPGA设计控制蜂鸣器播放音乐实验的Verilog逻辑源码Quartus工程文件+文档说明,根据简谱不同简谱名频率让蜂鸣器发出不一样的响声,FPGA型号Cyclone4E系列中的EP4CE6F17C8,Quartus版本17.1。 module music_top ( input clk, input rst_n, input key1, output reg buzzer ) ; parameter CLK_FRE = 50 ; parameter music_len = 32'd78 ; wire [19:0] cycle ; reg [31:0] play_cnt ; reg [31:0] music_cnt ; reg [19:0] hz_cnt ; wire [4:0] hz_sel ; wire [7:0] rom_hz_data ; wire [7:0] rom_time_data ; reg [31:0] music_time ; wire button_negedge ; parameter IDLE = 2'd0 ; parameter PLAY = 2'd1 ; parameter PLAY_WAIT = 2'd2 ; parameter PLAY_END = 2'd3 ; reg [1:0] state ; reg [1:0] next_state ; always @(posedge clk or negedge rst_n) begin if (~rst_n) state <= IDLE ; else state <= next_state ; end always @(*) begin case(state) IDLE : begin if (button_negedge) next_state <= PLAY ; else next_state <= IDLE ; end PLAY : begin if (play_cnt == music_time) next_state <= PLAY_WAIT ; else next_state <= PLAY ; end PLAY_WAIT : begin if (music_cnt == music_len - 1) next_state <= PLAY_END ; else next_state <= PLAY ; end PLAY_END : next_state <= IDLE ; default : next_state <= IDLE ; endcase end ax_debounce ax_debounce_a0 ( .clk (clk), .rst (~rst_n), .button_in (key1), .button_posedge (), .button_negedge (button_negedge), .button_out () ); //play counter always @(posedge clk or negedge rst_n) begin if (~rst_n) music_time <= 32'hffff_ffff ; else music_time <= rom_time_data*(CLK_FRE*1000000/8) ; end //counter in every step, maximum value is cycle always @(posedge clk or negedge rst_n) begin if (~rst_n) hz_cnt <= 20'd0 ; else if (state == PLAY || state == PLAY_WAIT) begin if (hz_cnt == cycle - 1) hz_cnt <= 20'd0 ; else hz_cnt <=
单片机c语音程序keil编程
2021-03-12 16:07:18 15KB keil 单片机 c语言
单片机c语音程序keil编程
2021-03-12 16:07:17 14KB keil 单片机 c语言
51单片机AT89C52控制蜂鸣器proteus仿真
2020-03-13 03:24:44 35KB 51单片机 AT89C52 控制蜂鸣器 proteus
1