资源简介
51单片机蜂鸣器音乐实验(致爱丽丝)
需要蜂鸣器即可,运行前请检查IO口的设置
代码片段和文件信息
/*
* File : led.c
* Description : This file is KingsT51 led driver.
* Copyright : www.kingst.org
*
* History
* -------------------
* Rev : 0.00
* Date : 08/13/2009
*
* create.
* -------------------
*/
//-----------------Include files-------------------------//
#include “..\include\hardware.h“
#include “..\include\music.h“
//-----------------Define--------------------------------//
//-----------------Function Prototype--------------------//
void initialize_music(void);
//-----------------Variable------------------------------//
code FREQ_T LDO = {0xf20x4b};
code FREQ_T LDOR= {0xf30x09};
code FREQ_T LRE = {0xf30xca};
code FREQ_T LRER= {0xf40x75};
code FREQ_T LMI = {0xf50x20};
code FREQ_T LFA = {0xf50xb8};
code FREQ_T LFAR= {0xf60x4e};
code FREQ_T LSO = {0xf60xd9};
code FREQ_T LSOR= {0xf70x5c};
code FREQ_T LLA = {0xf70xda};
code FREQ_T LLAR= {0xf80x4f};
code FREQ_T LSI = {0xf80xbf};
code FREQ_T DO = {0xf90x26};
code FREQ_T DOR= {0xf90x89};
code FREQ_T RE = {0xf90xce};
code FREQ_T RER= {0xfa0x3f};
code FREQ_T MI = {0xfa0x92};
code FREQ_T FA = {0xfa0xe0};
code FREQ_T FAR= {0xfb0x2b};
code FREQ_T SO = {0xfb0x71};
code FREQ_T SOR= {0xfb0xb3};
code FREQ_T LA = {0xfb0xf1};
code FREQ_T LAR= {0xfc0x2c};
code FREQ_T SI = {0xfc0x64};
code FREQ_T HDO = {0xfc0x97};
code FREQ_T HDOR= {0xfc0xc9};
code FREQ_T HRE = {0xfc0xf8};
code FREQ_T HRER= {0xfd0x24};
code FREQ_T HMI = {0xfd0x4d};
code FREQ_T HFA = {0xfd0x75};
code FREQ_T HFAR= {0xfd0x9a};
code FREQ_T HSO = {0xfd0xbd};
code FREQ_T HSOR= {0xfd0xde};
code FREQ_T HLA = {0xfd0xfd};
code FREQ_T HLAR= {0xfe0x1a};
code FREQ_T HSI = {0xfe0x36};
code FREQ_T PAUSE={00};
FREQ_T freq;
// music alice
code NOTE_T alice[]={
{&HMITIME_1_16}
{&HRERTIME_1_16}
{&HMITIME_1_16}
{&HRERTIME_1_16}
{&HMITIME_1_16}
{&SITIME_1_16}
{&HRETIME_1_16}
{&HDOTIME_1_16}
{&LATIME_1_8}
{&PAUSETIME_1_16}
{&DOTIME_1_16}
{&MITIME_1_16}
{&LATIME_1_16}
{&SITIME_1_8}
{&PAUSETIME_1_16}
{&MITIME_1_16}
{&SORTIME_1_16}
{&SITIME_1_16}
{&HDOTIME_1_8}
{&PAUSETIME_1_16}
{&MITIME_1_16}
{&HMITIME_1_16}
{&HRERTIME_1_16}
{&HMITIME_1_16}
{&HRERTIME_1_16}
{&HMITIME_1_16}
{&SITIME_1_16}
{&HRETIME_1_16}
{&HDOTIME_1_16}
{&LATIME_1_8}
{&PAUSETIME_1_16}
{&DOTIME_1_16}
{&MITIME_1_16}
{&LATIME_1_16}
{&SITIME_1_8}
{&PAUSETIME_1_16}
{&MITIME_1_16}
{&HDOTIME_1_16}
{&SITIME_1_16}
{&LATIME_1_8}
{&PAUSETIME_1_16}
{&SITIME_1_16}
{&HDOTIME_1_16}
{&HRETIME_1_16}
{&HMITIME_1_16}
{&HMITIME_1_8}
{&SOTIME_1_16}
{&HFATIME_1_16}
{&HMITIME_1_16}
{&HRETIME_1_16}
{&HRETIME_1_8}
{&FATIME_1_16}
{&HMITIME_1_16}
{&HRETIME_1_16}
{&HDOTIME_1_16}
{&HDOTIME_1_8}
{&MITIME_1_16}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4993 2011-05-30 09:20 music\driver\music.c
文件 893 2010-07-13 20:15 music\include\hardware.h
文件 839 2009-09-05 19:43 music\include\music.h
文件 863 2011-05-30 09:20 music\main\main.c
文件 2450 2011-05-30 09:20 music\main.lst
文件 2313 2011-05-30 09:20 music\main.obj
文件 14220 2011-05-30 09:20 music\music
文件 2521 2011-05-30 09:20 music\music.hex
文件 71 2011-05-30 09:20 music\music.lnp
文件 10499 2011-05-30 09:20 music\music.lst
文件 9797 2011-05-30 09:20 music\music.M51
文件 12858 2011-05-30 09:20 music\music.obj
文件 1708 2011-05-30 09:20 music\music.Opt
文件 421 2011-05-30 09:20 music\music.plg
文件 2262 2009-11-11 23:06 music\music.Uv2
文件 1706 2011-05-24 09:43 music\music_Opt.Bak
文件 2144 2009-10-08 09:59 music\music_Uv2.Bak
文件 6376 2008-04-03 10:51 music\STARTUP.A51
文件 14048 2011-05-30 09:20 music\STARTUP.LST
文件 749 2011-05-30 09:20 music\STARTUP.OBJ
目录 0 2011-05-30 09:20 music\driver
目录 0 2011-05-30 09:20 music\include
目录 0 2011-05-30 09:20 music\main
目录 0 2011-05-30 09:20 music
----------- --------- ---------- ----- ----
91731 24
相关资源
- 大气压强传感器BMP280单片机程序
- 松翰单片机程序
- 单片机程序DS18B20-液晶1602显示温度和
- 51单片机程序1602LCD液晶秒表
- 血压计单片机程序C51
- 光电编码器-单片机程序(ATmega16).
- hmc5883l 电子罗盘430单片机程序
- DAC 单片机程序
- DS3231+12864 0.96oled 51单片机程序
- 51单片机程序.zip
- ISD1700语音芯片 51单片机程序
- modbus RTU单片机程序编写
- NRF905无线PC控制台操作界面及单片机程
- USB转串口驱动源代码及单片机程序
- 单片机程序加密的几种实用方法
- ds2781单总线avr单片机程序
- 时间片轮转算法在单片机程序设计中
- SPIFlash W25Q64 新唐单片机程序
- STC 89C51/52单片机程序150例程
- 基于51单片机的VL53L0X激光测距传感器
- ESP8266控制51单片机程序
- GPRS模块 AT指令配置连接服务器 单片机
- PIC单片机程序全集
- 单片机程序生成器 软件
- 单片机程序999倒计时,键盘控制数码
- att7022 51单片机程序设计资料
评论
共有 条评论