资源简介
单片机程序,单正弦波输出,幅度和频率可调节,频率表可以根据自己需求修改
代码片段和文件信息
#include //宏声明
#include
#include
#include
#define uint unsigned int //宏定义
#define uchar unsigned char
uchar code zhengxian[]={ //正弦表
0x7F0x820x850x880x8B0x8F0x920x950x980x9B0x9E0xA10xA40xA70xAA0xAD
0xB00xB30xB60xB80xBB0xBE0xC10xC30xC60xC80xCB0xCD0xD00xD20xD50xD7
0xD90xDB0xDD0xE00xE20xE40xE50xE70xE90xEB0xEC0xEE0xEF0xF10xF20xF4
0xF50xF60xF70xF80xF90xFA0xFB0xFB0xFC0xFD0xFD0xFE0xFE0xFE0xFE0xFE
0xFE0xFE0xFE0xFE0xFE0xFE0xFD0xFD0xFC0xFB0xFB0xFA0xF90xF80xF70xF6
0xF50xF40xF20xF10xEF0xEE0xEC0xEB0xE90xE70xE50xE40xE20xE00xDD0xDB
0xD90xD70xD50xD20xD00xCD0xCB0xC80xC60xC30xC10xBE0xBB0xB80xB60xB3
0xB00xAD0xAA0xA70xA40xA10x9E0x9B0x980x950x920x8F0x8B0x880x850x82
0x7F0x7C0x790x760x730x6F0x6C0x690x660x630x600x5D0x5A0x570x540x51
0x4E0x4B0x480x460x430x400x3D0x3B0x380x360x330x310x2E0x2C0x290x27
0x250x230x210x1E0x1C0x1A0x190x170x150x130x120x100x0F0x0D0x0C0x0A
0x090x080x070x060x050x040x030x030x020x010x010x000x000x000x000x00
0x000x000x000x000x000x000x010x010x020x030x030x040x050x060x070x08
0x090x0A0x0C0x0D0x0F0x100x120x130x150x170x190x1A0x1C0x1E0x210x23
0x250x270x290x2C0x2E0x310x330x360x380x3B0x3D0x400x430x460x480x4B
0x4E0x510x540x570x5A0x5D0x600x630x660x690x6C0x6F0x730x760x790x7C
0x7f
};
uint code frq[]={ //频率表
0x67690xb3b50xcd230xd9da0xe17b0xe6920xea340xeced0xef0c
0xf0be0xf85f0xfaea0xfc2f0xfcf30xfd750xfdd20xfe180xfe4e
0xfe790xfefc0xff3d0xff600xff7e0xff900xff9e0xffa90xffb2
0xffb90xffbf0xffc40xffc80xffcc0xffcf0xffd20xffd50xffd7
0xffd90xffec0xfff30xfff60xfff80x6769
};
uchar KEY_CNT=0; //按键消抖滤波计数
uchar tab_switch=0; //数据更改选择
sbit KEY1=P3^5; //定义按键
sbit KEY2=P3^6;
sbit KEY3=P3^7;
uchar frq_cnt=1; //频率选择计数
相关资源
- VHDL 的程序
- 蓝桥杯历年真题视频解析
- 《数据结构及算法经典》源代码.
- GD32F303 串口+DMA 收发数据
- 基于OpenGL的场景迷宫漫游可以碰撞检
- STDLIB.H头文件
- WM算法C
- opencv检查图片中是否有人
- C经典教材-C和指针课后习题答案
- SWMM51014代码编译及扩展案例
- libevent参考手册(中文版-高清-目录)
- SHA512源码
- QT案例--翻金币小游戏
- 递归下降语法分析器
- mingw-get-setup安装包.zip
- 基于STC89C52单片机温室大棚监控监控系
- opencv提取视频图片并检查人脸
- 利用ffmpeg实现RTSP,RTMP推流以及保存到
- 本科算法实验-线性时间选择
评论
共有 条评论