在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
芯片精品文章合集(500篇!) 创芯人才网--重磅上线啦!
查看: 3411|回复: 3

[原创] 十字旋转LED点阵套件

[复制链接]
发表于 2011-8-29 12:09:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
十字旋转LED点阵套件:单片机32个IO口分别控制16个红LED和16个绿LED;一个红外发射管,一个红外接收管,板上的红外接收管每转动一圈就会导通一次,让单片机知道从哪一点开始播放字符或者图象;无线供电部分通过线圈向主板供电,相当于变压器的工作原理更多详情登陆http://www.51dz.com/0/s---2489--.htm查询。
最后,祝大家制作成功!祝大家制作升值!(如果做好了能实用展示广告,就可以升值;如果做不好,那就变成一团垃圾,购买前请仔细考虑!)下面是可以在本套件上运行的一个例子源程序:
org 00h
  jmp cfg
  org 03h
  clr 00h
  reti
cfg: ;setb ea
;  setb ex0
;  setb it0
  mov dptr,#tab
MM00: CLR 00H
mm: mov a,r2
  movc a,@a+dptr
cpl a
call hbit
  mov r4,a
  deC r2
  mov a,r2
  movc a,@a+dptr
dec r2
  
  cpl a
call hbit
jb 01h,gr0
mov p1,a
mov p3,r4
jmp gr00
gr0:mov p2,a
mov p0,r4
gr00:
djnz r6,$
djnz r6,$
;djnz r6,$
cjne r2,#0ffh,mmm
mov p0,#0ffh
mov p1,#0ffh
mov p2,#0ffh
mov p3,#0ffh
jb 0e8h.3,$   ;检测是否低电平
mmm:  jb 0e8h.3,MM00   ;检测是否低电平
  jb 00h,mm
  setb 00h
mov r2,#0ffh
  inc dptr
  inc dptr
  inc dptr
  inc dptr
mov a,dph
cjne a,#tab2/256,e0d
  mov dptr,#tab
cpl 01h
e0d: jmp mm
hbit:  ;这是一个位交换子程序,用来实现字倒着显示或者正着显示,倒着显示时适合电动机在上面挂起来安装的情况。
mov c,acc.0
mov b.7,c
mov c,acc.1
mov b.6,c
mov c,acc.2
mov b.5,c
mov c,acc.3
mov b.4,c
mov c,acc.4
mov b.3,c
mov c,acc.5
mov b.2,c
mov c,acc.6
mov b.1,c
mov c,acc.7
mov b.0,c
mov a,b
ret

org 200h;org 300h,下面是显示的数据内容,是用本站软件自动生成的供码,请自行修改,其中的0000000000数据是加进去的空白代码,用来显示开头和结尾的空白;;………………数据内容省略,请用本站的自动数码代码程序自动生成摇摇棒、LED点阵代码生成下载器
tab:
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
db 00h,04h,40h,04h,41h,04h,41h,04h
db 41h,04h,41h,0fch,7fh,04h,41h,04h
db 41h,04h,41h,04h,43h,0fch,41h,04h
db 40h,04h,00h,0ch,00h,04h,00h,00h
db 00h,00h,01h,00h,01h,00h,01h,00h
db 01h,00h,01h,00h,01h,00h,01h,00h
db 01h,00h,01h,00h,01h,00h,01h,00h
db 01h,00h,03h,00h,01h,00h,00h,00h
db 00h,00h,00h,00h,1fh,0f0h,12h,20h
db 12h,20h,12h,20h,12h,20h,0ffh,0fch
db 12h,22h,12h,22h,12h,22h,12h,22h
db 1fh,0f2h,00h,02h,00h,0eh,00h,00h
db 00h,80h,00h,80h,40h,80h,40h,80h
db 40h,80h,40h,82h,40h,81h,47h,0feh
db 48h,80h,50h,80h,60h,80h,40h,80h
db 00h,80h,01h,80h,00h,80h,00h,00h
db 10h,04h,1fh,0fch,00h,84h,01h,00h
db 01h,00h,01h,04h,00h,0fch,00h,04h
db 00h,00h,01h,00h,01h,00h,07h,0f8h
db 01h,04h,01h,04h,00h,00h,00h,00h
db 00h,00h,01h,00h,01h,00h,07h,0f8h
db 01h,04h,01h,04h,00h,00h,00h,00h
db 01h,01h,01h,0ffh,00h,85h,01h,04h
db 01h,04h,00h,88h,00h,70h,00h,00h
db 00h,00h,00h,00h,00h,00h,03h,0ch
db 03h,0ch,00h,00h,00h,00h,00h,00h
db 00h,00h,00h,06h,00h,18h,00h,60h
db 01h,80h,06h,00h,18h,00h,20h,00h
db 00h,00h,00h,06h,00h,18h,00h,60h
db 01h,80h,06h,00h,18h,00h,20h,00h
tab1:db 01h,0f0h,01h,0ch,00h,30h,01h,0c0h
db 00h,30h,01h,0ch,01h,0f0h,01h,00h
db 01h,0f0h,01h,0ch,00h,30h,01h,0c0h
db 00h,30h,01h,0ch,01h,0f0h,01h,00h
db 01h,0f0h,01h,0ch,00h,30h,01h,0c0h
db 00h,30h,01h,0ch,01h,0f0h,01h,00h
db 00h,00h,00h,0ch,00h,0ch,00h,00h
db 00h,00h,00h,00h,00h,00h,00h,00h
db 00h,00h,1fh,98h,10h,84h,11h,04h
db 11h,04h,10h,88h,10h,70h,00h,00h
;………………数据内容省略,请用本站的自动数码代码程序自动生成摇摇棒、LED点阵代码生成下载器
tab2:end
发表于 2011-9-13 14:54:58 | 显示全部楼层
希望提供原理图~~
发表于 2014-8-31 14:02:52 | 显示全部楼层
谢谢 !!!!!!
发表于 2014-11-30 07:24:47 | 显示全部楼层
謝謝樓主分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条


小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-22 22:44 , Processed in 0.039520 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表