⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 给大家一个dmx512 接收程序。(页 1) - 〖 单片机园地 〗 - 阿里路路音响世界 ktv 音响|灯光|vod|营销|管理 - 阿里路路 - powered by discuz! archiver.htm

📁 DMX512资料及其DMX512接收程序
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0048)http://www.alilulu.cn/bbs/archiver/tid-5137.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>给大家一个DMX512 接收程序。(页 1) - 〖 单片机园地 〗 - 阿里路路音响世界 ktv | 音响|灯光|VOD|营销|管理 -> 阿里路路 - Powered by Discuz! Archiver</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gbk">
<META 
content="Discuz!,Board,Comsenz,forums,bulletin board,阿里路路,调音台,卡拉OK,音响,灯光,舞台,音箱,功放,ktv,vod,点歌,广播,会议,演出,设计,软件,歌库" 
name=keywords>
<META 
content="bit     CHK_SIGN;bit     DMX_SIGN;#define DmxCH   6int8    Dmxdat[DmxCH];int16   pdata Dmxaddr;int16   ADDR_CON;int8    RECDAT;int8    DmxSign;void SERI_DMX() interrupt 4 using 2{RI = 0;  if (RB8== ... 阿里路路音响世界 阿里路路,调音台,卡拉OK,音响,灯光,舞台,音箱,功放,ktv,vod,点歌,广播,会议,演出,设计,软件,歌库 - Discuz! Archiver" 
name=description>
<META content="MSHTML 6.00.2900.3199" name=GENERATOR>
<META content="Discuz! Team &amp; Comsenz UI Team" name=author>
<META content="2001-2007 Comsenz Inc." name=copyright><LINK 
href="给大家一个DMX512 接收程序。(页 1) - 〖 单片机园地 〗 - 阿里路路音响世界 ktv  音响|灯光|VOD|营销|管理 - 阿里路路 - Powered by Discuz! Archiver.files/style_1.css" 
type=text/css rel=stylesheet>
<STYLE type=text/css></STYLE>
</HEAD>
<BODY class=archiver>
<DIV class=wrap>
<DIV id=nav><A href="http://www.alilulu.cn/bbs/archiver/">阿里路路音响世界</A> &raquo; <A 
href="http://www.alilulu.cn/bbs/archiver/fid-188.html">〖 单片机园地 〗</A> &raquo; 
给大家一个DMX512 接收程序。</DIV>
<H1><A href="http://www.alilulu.cn/bbs/viewthread.php?tid=5137" 
target=_blank>查看完整版本: 给大家一个DMX512 接收程序。</A></H1>
<DIV class=archiver_post>
<P><CITE>dairen</CITE> 2006-10-7 13:18</P>
<DIV class=archiver_postbody>
<H2>给大家一个DMX512 接收程序。</H2>bit&nbsp; &nbsp;&nbsp;&nbsp;CHK_SIGN;<BR><SPAN 
style="DISPLAY: none">n Ts?/VcNF3u</SPAN> bit&nbsp; 
&nbsp;&nbsp;&nbsp;DMX_SIGN;<BR><SPAN style="DISPLAY: none">0~5D:Y4w9Y7i</SPAN> 
#define DmxCH&nbsp; &nbsp;6<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">3x'k 
X})~#iZ/~</FONT><BR>int8&nbsp; &nbsp; Dmxdat[DmxCH];<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd"> P9L0hyi] K</FONT><BR>int16&nbsp; 
&nbsp;pdata Dmxaddr;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">ur0{:s/b?</FONT><BR>int16&nbsp; 
&nbsp;ADDR_CON;<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">0c)V4[PN}Q 
F"s</FONT><BR>int8&nbsp; &nbsp; RECDAT;<BR><SPAN style="DISPLAY: none">A+e!s 
y5j5`e"g</SPAN> int8&nbsp; &nbsp; DmxSign;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">n'd"T6M Nt</FONT><BR>void SERI_DMX() 
interrupt 4 using 2{RI = 0; <FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">4tV.? 
@"D</FONT><BR>if (RB8==0){<BR><SPAN style="DISPLAY: none">L:k2FD0L0h</SPAN> 
&nbsp;&nbsp;CHK_SIGN=0;<BR><SPAN style="DISPLAY: none">(M0@X j%ev</SPAN> 
&nbsp;&nbsp;if (SBUF!=0){<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">0L].b 
]9g1mZ$o+D R</FONT><BR>&nbsp; &nbsp;DMX_SIGN=1;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd"> { i~jx"T9Q;v</FONT><BR>&nbsp; 
&nbsp;return;<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd"> 
F9pG~2IxWe</FONT><BR>&nbsp;&nbsp;} <BR><SPAN style="DISPLAY: none">,{~ 
o-}&amp;b`\%x</SPAN> &nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;DMX_SIGN=0;<BR><SPAN style="DISPLAY: none">&amp;| \E|l j 
CP;u</SPAN> &nbsp;&nbsp;ADDR_CON=0;<BR><SPAN style="DISPLAY: none">@O@ 
fZ</SPAN> &nbsp;&nbsp;RECDAT=0;<BR><SPAN 
style="DISPLAY: none">?q:W0_!|</SPAN> &nbsp;&nbsp;return;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">)pQVX,O a</FONT><BR>}<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd"> }'zR+t(@Kj</FONT><BR>else if 
(CHK_SIGN!=1){<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">Vp'Q3B^/[</FONT><BR>&nbsp;&nbsp;if 
(DMX_SIGN==0){<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd"> |:ys7p 
?V</FONT><BR>&nbsp; &nbsp;DMX_SIGN=1;&nbsp;&nbsp;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">"a0k.^O+A}D/i</FONT><BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;if (SBUF==0){<BR><SPAN 
style="DISPLAY: none">?R/w/IR:h7S"fe</SPAN> &nbsp; &nbsp; 
CHK_SIGN=1;<BR><SPAN style="DISPLAY: none">9E!RLFRf</SPAN> &nbsp; &nbsp; 
DmxSign = 200;<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd"> _:k 
MR%b'S</FONT><BR>&nbsp; &nbsp; return;<BR><SPAN style="DISPLAY: none">e![QO 
yT1P7Hs9vN?~</SPAN> &nbsp; &nbsp;}<BR><SPAN style="DISPLAY: none">+v;[8K,~Y 
U2LA</SPAN> &nbsp; &nbsp;&nbsp;&nbsp;}&nbsp; &nbsp;&nbsp;&nbsp;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">{:\3p$@J's"j1p</FONT><BR>&nbsp; 
&nbsp;&nbsp;&nbsp;return;&nbsp;&nbsp;<BR><SPAN 
style="DISPLAY: none">&amp;BS,|0WoL-[</SPAN> }<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">%TIs8K.aEm%~Z+S</FONT><BR>if(RECDAT==0){<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">^6k!D+|+p/g-Q</FONT><BR>&nbsp; 
&nbsp;&nbsp;&nbsp;ADDR_CON++;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">Kh)kn)r5t5]</FONT><BR>&nbsp; 
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;if(ADDR_CON==0x0001)<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">V-h1e)LY+Wp 
@N</FONT><BR>&nbsp;&nbsp;goto rec; <FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">4cX8\Oq</FONT><BR>&nbsp;&nbsp;return;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">/~F]W9s@$b*i</FONT><BR>&nbsp; &nbsp; 
}&nbsp;&nbsp;<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">v 
qEF;jQj</FONT><BR>rec:Dmxdat[RECDAT]=SBUF;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
&nbsp;&nbsp; &nbsp;<BR><SPAN style="DISPLAY: none">:pX:i}1qdT[g a</SPAN> 
&nbsp; &nbsp; RECDAT++;<BR><SPAN style="DISPLAY: none">&amp;~h#Dxo)k3T</SPAN> 
&nbsp; &nbsp; if(RECDAT &gt;= DmxCH){<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd"> 
t)},@V-wJ&amp;S</FONT><BR>&nbsp;&nbsp;RECDAT=0; <FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">viE(UF'tW9`</FONT><BR>&nbsp; &nbsp; 
}&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; 
&nbsp;<BR><SPAN style="DISPLAY: none">B*g9qi%StXD</SPAN> }</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>format</CITE> 2006-10-7 14:21</P>
<DIV class=archiver_postbody>这个是什么来的</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>dairen</CITE> 2006-10-8 10:39</P>
<DIV class=archiver_postbody>
<H2>回复 #2 format 的帖子</H2>是在舞台灯光控制用的DMX512调光协议中的接收程序。</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>zhangtq</CITE> 2006-10-17 09:00</P>
<DIV class=archiver_postbody>好东西,顶一下</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>wyf</CITE> 2006-10-31 19:24</P>
<DIV class=archiver_postbody>接收不了吧</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>zp</CITE> 2006-10-31 19:34</P>
<DIV class=archiver_postbody>[quote]原帖由 [i]wyf[/i] 于 2006-10-31 19:24 发表<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">'Iq%L5Q~ ]~!z3Y</FONT><BR>接收不了吧 
[/quote]<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd"> Gbx/j 
^9O</FONT><BR>有没有测试过.</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>dairen</CITE> 2006-11-17 08:18</P>
<DIV class=archiver_postbody>
<H2>这个程序是一直用的,没有问题的</H2></DIV></DIV>
<DIV class=archiver_post>
<P><CITE>dairen</CITE> 2006-11-17 08:19</P>
<DIV class=archiver_postbody>
<H2>这个程序是一直用的,没有问题的</H2></DIV></DIV>
<DIV class=archiver_post>
<P><CITE>dairen</CITE> 2006-11-18 19:12</P>
<DIV class=archiver_postbody>
<H2>希望大家支持,继续努力。</H2>[url=http://rich.qq.com/spr/code_pay.shtml?Spid=sprv1&amp;Comment1=66094136&amp;p=2&amp;][img]http://rich.qq.com/spr/spr_images/code_but01hy.gif[/img][/url][url=http://rich.qq.com/spr/code_pay.shtml?Spid=sprv1&amp;Comment1=66094136&amp;p=2&amp;]点此链接立即购买[/url]</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>阳光</CITE> 2006-11-18 19:49</P>
<DIV class=archiver_postbody>[quote]原帖由 [i]dairen[/i] 于 2006-11-18 19:12 发表<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">LC%[ 
iH"SuJ</FONT><BR>[img]http://rich.qq.com/spr/spr_images/code_but01hy.gif[/img]点此链接立即购买 
[/quote]<FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">@ W 
jo#FOY</FONT><BR><BR><SPAN style="DISPLAY: none">5D T&amp;rZW6A 
J(mo6QJz</SPAN> <BR><SPAN style="DISPLAY: none">v-I.j!pRd nES$QV</SPAN> 
这是什么来的是不是帮QQ做广告</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>philix</CITE> 2006-12-2 08:51</P>
<DIV class=archiver_postbody>最好是打包下来,程序不好复制...........:)</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>luobinxp</CITE> 2007-1-11 23:04</P>
<DIV class=archiver_postbody>楼主能给个比较完善的程序//以及注释--! <FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">;E7anq6K^3Z</FONT><BR>本人 
QQ:690738446<BR><SPAN style="DISPLAY: none">c_$z0n;Q+r0~$p</SPAN> 
[email]dafangzhuo@163.com[/email]<BR><SPAN style="DISPLAY: none">@;n6\{ 
z})r2L/Y</SPAN> <FONT style="FONT-SIZE: 0px; COLOR: #e8f3fd">0M@/^?6hW 
E</FONT><BR>或则我们可以交换程序,</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>luobinxp</CITE> 2007-1-16 21:26</P>
<DIV class=archiver_postbody>哈哈,我已经会了!我发现楼主的程序有些BUG 
(不过还是感谢楼主的程序,至少还有参考的用处!)!如果全部采用中断处理,不大合理。中断部分只要检测复位信号就够了!调用一个外部函数用while(~RI)加个看门狗就OK了!<BR><SPAN 
style="DISPLAY: none">0\q#f T;p2k#Z$w `"Q</SPAN> <BR><SPAN 
style="DISPLAY: none">Nr9M7S ^^</SPAN> 以前没做过之前以为很难,做了才知道那么简单!比起modbus 协议 
TCP/IP协议 以及 CAN总线简单多了,剩下只是过零检测(数字调压),小菜一碟!:)&nbsp; &nbsp; 不好意思 
本人以前是做自动化的控制的&nbsp;&nbsp;<BR><SPAN style="DISPLAY: none">/w 
Ql&amp;yclV1Z\Q%r!f</SPAN> 
[color=Red][size=4][color=Red]QQ:546045137&nbsp;&nbsp;提供有偿咨询服务[/color][/size][/color]<BR><SPAN 
style="DISPLAY: none">"R;R*H7w9DH8\q6n j G</SPAN> &nbsp;&nbsp;<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">*eH,s(P4WabV</FONT><BR>用单片机的做没意思了,该玩ARM9,装个uCLinux或则WinCe配合触摸屏玩玩才够意思,毕竟单片机快要淘汰了!<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">e Bu0c c\+k</FONT><BR><BR><SPAN 
style="DISPLAY: none">3t bsB$z!i$Y9Hb#X }</SPAN> 
[MP=480,65,true]http://wma.139mtv.com/2007/2006/12/4/139mtv_12894/10.wma[/MP]<FONT 
style="FONT-SIZE: 0px; COLOR: #e8f3fd">%@*x'g%qhSo%Y</FONT><BR><BR><SPAN 
style="DISPLAY: none">h4Zfo9{ C7j6I</SPAN> [[i] 本帖最后由 luobinxp 于 2007-4-24 
10:47 编辑 [/i]]</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>天中</CITE> 2007-3-1 13:28</P>
<DIV class=archiver_postbody>
<H2>恩,好东西</H2>好东西,:) 顶一下</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>haosheng</CITE> 2007-3-2 14:51</P>
<DIV class=archiver_postbody>学习中,谢谢</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>xzpig</CITE> 2007-3-15 09:20</P>
<DIV class=archiver_postbody>好东西,顶一下</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>hulin_123</CITE> 2007-4-23 16:43</P>
<DIV class=archiver_postbody>
<H2>回复 #11 philix 的帖子</H2>堪布件、</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>lja2007</CITE> 2007-7-6 11:59</P>
<DIV class=archiver_postbody>此程序可用,我试过!!!</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>xiaoqingy</CITE> 2007-7-12 22:18</P>
<DIV class=archiver_postbody>请问楼主用的是什么单片机,串口是怎么设置的?怎么会要用到RB8?</DIV></DIV>
<DIV class=archiver_post>
<P><CITE>henry</CITE> 2007-7-14 06:29</P>
<DIV 
class=archiver_postbody>欢迎访问【阿里路路音响世界论坛[url]www.alilulu.cn/bbs[/url]】</DIV></DIV>
<DIV class=archiver_pages>页: <STRONG>[1]</STRONG> </DIV>
<DIV class=archiver_fullversion>查看完整版本: <STRONG><A 
href="http://www.alilulu.cn/bbs/viewthread.php?tid=5137" 
target=_blank>给大家一个DMX512 接收程序。</A></STRONG></DIV></DIV>
<P id=copyright>Powered by <STRONG><A href="http://www.discuz.net/" 
target=_blank>Discuz! Archiver</A></STRONG> <EM>6.0.0</EM>&nbsp; &copy; 2001-2006 <A 
href="http://www.comsenz.com/" target=_blank>Comsenz 
Inc.</A><BR><BR></P></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -