资源描述:
《单片机点阵式显示器代码》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、实验原理51单片机的点阵显示器的使用,点阵数字拉幕显示和点阵数字显示区别与实现.主要器件以及电路图单片机——AT89C51,缓冲驱动电路——74LS245,电容——CAPCAP-ELEC,点阵——matrix-8*8-red。点阵数字拉幕显示汇编程序源码R_CNTEQU31HNUMBEQU32HTCOUNTEQU33HORG00HLJMPSTARTORG0BHLJMPINT_T0ORG30HSTART:MOVR0,#00H;显示的幕次(即每一幕显示的行码起始序号)置0MOVR_CNT,#00H;列码序号置0MOVNUMB,#00
2、H;行码序号置0MOVTCOUNT,#00HMOVTMOD,#01HMOVTH0,#(65536-5000)/256;定时5msMOVTL0,#(65536-5000)MOD256SETBTR0MOVIE,#82HSJMP$INT_T0:MOVTH0,#(65536-5000)/256MOVTL0,#(65536-5000)MOD256MOVDPTR,#TAB;取列码表首地址MOVA,R_CNTMOVCA,@A+DPTRMOVP3,AMOVDPTR,#NUB;取行码表首地址MOVA,NUMBMOVCA,@A+DPTRMOVP0,A
3、;输出行码INCNUMBNEXT1:INCR_CNTMOVA,R_CNTCJNEA,#8,NEXT2MOVR_CNT,#00HMOVNUMB,R0NEXT2:INCTCOUNTMOVA,TCOUNTCJNEA,#40,NEXT4;每个数字显示200ms。必须在TCOUNT数值是8的整数倍时再进行下面的移位操作,否则显示衔接时会乱。MOVTCOUNT,#00HINCR0;上一幕显示行码的起始序号+1CJNER0,#88,NEXT3MOVR0,#00HNEXT3:MOVNUMB,R0;送新一幕显示行码的起始序号NEXT4:RETITA
4、B:DB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FHNUB:DB00H,00H,00H,00H,00H,00H,00H,00H;空DB00H,00H,3EH,41H,41H,41H,3EH,00H;0DB00H,00H,00H,00H,21H,7FH,01H,00H;1DB00H,00H,27H,45H,45H,45H,39H,00H;2DB00H,00H,22H,49H,49H,49H,36H,00H;3DB00H,00H,0CH,14H,24H,7FH,04H,00H;4DB00H,00H,72
5、H,51H,51H,51H,4EH,00H;5DB00H,00H,3EH,49H,49H,49H,26H,00H;6DB00H,00H,40H,40H,40H,4FH,70H,00H;7DB00H,00H,36H,49H,49H,49H,36H,00H;8DB00H,00H,32H,49H,49H,49H,3EH,00H;9DB00H,00H,00H,00H,00H,00H,00H,00H;空END点阵数字显示汇编程序源码TCOUNTEQU30HR_CNTEQU31HNUMBEQU32HORG00HLJMPSTARTORG0BHL
6、JMPINT_T0ORG30HSTART:MOVTCOUNT,#00HMOVR_CNT,#00HMOVNUMB,#0HMOVTMOD,#01HMOVTH0,#(65536-4000)/256MOVTL0,#(65536-4000)MOD256SETBTR0MOVIE,#82HSJMP$INT_T0:MOVTH0,#(65536-4000)/256MOVTL0,#(65536-4000)MOD256MOVDPTR,#TABMOVA,R_CNTMOVCA,@A+DPTRMOVP3,AMOVDPTR,#NUBMOVA,NUMBMOVB,
7、#8MULABADDA,R_CNTMOVCA,@A+DPTRMOVP0,AINCR_CNTMOVA,R_CNTCJNEA,#8,NEXTMOVR_CNT,#00HNEXT:INCTCOUNTMOVA,TCOUNTCJNEA,#250,NEXMOVTCOUNT,#00HINCNUMBMOVA,NUMBCJNEA,#10,NEXMOVNUMB,#00HNEX:RETITAB:DB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,7FHNUB:DB00H,00H,3EH,41H,41H,41H,3EH,00HDB00
8、H,00H,00H,00H,21H,7FH,01H,00HDB00H,00H,27H,45H,45H,45H,39H,00HDB00H,00H,22H,49H,49H,49H,36H,00HDB00H,00H,0CH,14H,24H,7FH,04H