/*************************************************************
旋转LED平面字体测试程序
程序编写:Fucp 2012-7-24
DIY套件 http://59tiaoba.taobao.com
单片机 STC8912C5A32S2 或者其他51
字模软件用 PC2002
逐列取模方式
电机旋转方向 顺时针
/***********************************************************
说明:
硬件介绍:用单片机的串行口发送数据给3个595 并行驱动LED
采用无线供电方式以及性能较好的RF370电机,在5V供电下 显示的效果非常好.电机速度也够快
够安静.
看程序前请看下原理图,根据原理图来理解比较容易!
程序用判断红外起点的方法开始显示 每转一圈,列数往后移动一列
显示完指定的字数后循环 此种弊端是没用中断,一圈的开始后必须要显示完
指定的列数才能退出,如果电机速度太快会造成头吃尾的后果,后面会介绍避免
头吃尾的方法,让整一圈都能显示字 盲点很小。
学习知识:
只为简单的理解显示的原理,利用人眼视觉暂存,用电机旋转做列扫描,
每送一列数据延时 再送下一列数据,原理比较简单,跟点阵显示差不多。
*************************************************************/
#include "NEW_8051.H"
#define uchar unsigned char
#define uint unsigned int //宏定义
sbit STRA=P4^3; //锁存
sbit OEA=P3^4; //595使能
sbit STRB=P1^5; //锁存
sbit OEB=P1^4; //595使能
sbit SDAB=P1^6; //数据
sbit SCKB=P1^7; //时钟
sbit STRC=P1^1; //锁存
sbit OEC=P1^0; //595使能
sbit SDAC=P1^2; //数据
sbit SCKC=P1^3; //时钟
sbit LED=P0^3; //外圈LED
sbit KEY=P3^2; //红外检测起点
//字幕软件用pc2002 参数设置 见设置图片 电机正转
unsigned char code love[] = {
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,/*" ",0*/
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,/*" ",1*/
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,/*" ",2*/
0xFF,0xFF,0xF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F,0xBF,0xBD,0xC7,0x7D,0xEE,0xFB,
0xFF,0xF7,0xFF,0xE7,0xFF,0x8F,0x00,0x1F,0xFF,0xEF,0xFF,0xF3,0xFF,0xF9,0xFF,0xFB,/*"以",32*/
0xFF,0xFD,0xFF,0xFB,0xBF,0xF6,0xBF,0xCE,0xBE,0x3D,0x81,0xFD,0xBE,0x7B,0xBF,0x97,
0xBD,0xEF,0xB0,0xEF,0x8D,0x97,0xFC,0x7B,0xFD,0xF9,0xFF,0xFC,0xFF,0xFD,0xFF,0xFF,/*"及",33*/
0xFF,0xFD,0xFF,0xF3,0xFF,0x8F,0x80,0x7F,0xB7,0xFF,0xB7,0x01,0xB7,0x77,0xB7,0x77,
0xB7,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x01,0x77,0xFF,0xFF,0xFF,0xFF,0xFF,/*"后",34*/
0xFF,0xBF,0xFB,0xBF,0xF7,0x7F,0xEF,0x00,0x1E,0xAD,0xAE,0xAD,0xB5,0xAD,0xBB,0x81,
0xBB,0xAD,0xB5,0xAD,0x8E,0xAD,0xBE,0x00,0xFF,0x7F,0xFF,0x3F,0xFF,0x7F,0xFF,0xFF,/*"备",35*/
0xFF,0xFF,0xFF,0xFF,0xE0,0x0F,0xED,0xDF,0xED,0xDF,0xED,0xDF,0xED,0xDF,0x00,0x03,
0xED,0xDD,0xED,0xDD,0xED,0xDD,0xED,
weixin_42651887
- 粉丝: 104
- 资源: 1万+
最新资源
- 永磁同步电机直接转矩控制DTC仿真模型,三相PMSM直接转矩控制matlab仿真算法,基于matlab simulink搭建 附参考资料,简单电子资料
- 2025年春节烟花特效html
- Python_利用AI大模型一键生成高清短视频 Generate short videos with one clic.zip
- Python_连接到任何数据源,轻松可视化仪表板和共享您的数据.zip
- Python_利用GDB开发和逆向工程变得容易.zip
- 永磁同步电机PMSMsimulink仿真,模型参考自适应方法在线辩识转动惯量,可选变增益,纯手工搭建,附参考资料
- Python_领先的ETL ELT数据管道数据集成平台,从api数据库文件到数据仓库、数据湖、数据湖,包括自托管和云托.zip
- Python_令人敬畏的开源启动替代知名SaaS产品列表.zip
- Python_流氓接入点框架.zip
- Python_马尔:口齿不清.zip
- Python_免费超快副驾驶替代Vim和Neovim.zip
- Python_麦考夫核心麦考夫人工智能平台.zip
- Python_每个人的开源机器学习框架.zip
- Python_免费的计算机编程类中文书籍欢迎投稿.zip
- 光伏逆变器仿真模型,boost加NPC拓扑结构,基于MATLAB Simulink建模仿真 具备中点平衡SVPWM控制,正负序分离控制,可以进行功率调度仿真 仿真模型使用MATLAB 2017b搭
- Python_免费和开源企业资源规划ERP.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈