1、学生毕业论文(设计)鉴定表题目基于单片机的LED点阵电子显示屏设计姓名王晓南学号2012540330125系部电子信息工程系专业电子与信息工程技术指导教师彭高丰职称副教授2014年11月18日长沙师范学院教务处制基于51单片机的LED点阵显示屏系统的设计与实现摘要在这个信息化社会中,人们对信息的传达需求激增,点阵式LED显示屏成为重要的传播媒体。金融证券、体育场所、交通运输、商业广告、邮电电信及学校教育等领域都得到了广泛的应用。因此,点阵式LED显示屏的研发、设计、生产获得迅速的发展,并且成为了产业。点阵式LED显示屏的显示效果、功率环保也不断优化。点阵式LED屏具有较大的信息显示量、寿命长、
2、功耗小、重量轻、空间尺寸小及造价低等优点。本设计通过使用单片机为控制核心,设计一款点阵式LED屏。同时,使用电脑VB编写的上位机通过串口通信对点阵显示屏的信息更新、显示速度控制等。关键词AT89S51LED点阵单片机串口通信LEDDOTMATRIXDISPLAYBASEDONSINGLECHIPDESIGNTANJINBIAO2007COMPUTERSCIENCEANDTECHNOLOGYMAJOR,DEPARTMENTOFMATHEMATICSANDCOMPUTERSCIENCE,SANMINGUNIVERSITYABSTRACTINTHISINFORMATIONSOCIETY,PEOPLE
3、SURGEINDEMANDFORINFORMATIONCOMMUNICATION,DOTMATRIXLEDDISPLAYHASBECOMEANIMPORTANTMEDIAFINANCIALSECURITIES,SPORTSVENUES,TRANSPORTATION,ADVERTISING,POSTANDTELECOMMUNICATIONSFIELDSOFTELECOMMUNICATIONSANDSCHOOLEDUCATIONHAVEBEENWIDELYUSEDTHEREFORE,THEDOTMATRIXLEDDISPLAYRAN920629075620REGENOLD,STEPHENLEDSA
4、RESTILLPOPULARANDIMPROVINGAFTERALLTHESEYEARSZSEP2004,VOL18ISSUE9,4444,1/7P,1CAN14525210附录1硬件原理图12330PFC630PFC5VCC1KR271KR251KR26MR9CLK8A1B2Q03Q14Q25Q36Q410Q511Q612Q713VCC14GND7U3SN74LS164NMR9CLK8A1B2Q03Q14Q25Q36Q410Q511Q612Q713VCC14GND7U2SN74LS164NMR9CLK8A1B2Q03Q14Q25Q36Q410Q511Q612Q713VCC14GND7U5SN
5、74LS164NMR9CLK8A1B2Q03Q14Q25Q36Q410Q511Q612Q713VCC14GND7U4SN74LS164NIN11IN22IN33IN44IN55IN66IN77IN88OUT118OUT316OUT415OUT514OUT613OUT712OUT811OUT217COMD10GND9U8ULN2803AIN11IN22IN33IN44IN55IN66IN77IN88OUT118OUT316OUT415OUT514OUT613OUT712OUT811OUT217COMD10GND9U9ULN2803AD27O15O39GND10O515D38O412O719D03
6、D718D514O02D413D14VCC20D617OE1O26LE11O616U6SN74LS373DWD27O15O39GND10O515D38O412O719D03D718D514O02D413D14VCC20D617OE1O26LE11O616U7SN74LS373DW5KR8RES25KR7RES25KR6RES25KR5RES25KR4RES25KR3RES25KR2RES25KR1RES21KR10RES21KR11RES21KR12RES21KR13RES21KR14RES21KR16RES21KR9RES21KR15RES21KR21RES21KR20RES21KR22RE
7、S21KR19RES21KR23RES21KR24RES21KR18RES21KR17RES2C11VDD2C13C24C25VEE6T2OUT7R2IN8R2OUT9T2IN10T1IN11R1OUT12R1IN13T1OUT14GND15VCC16U1MAX232CPE100PFC4CAP100PFC2CAP100PFC1CAP100PFC3CAP1234567891110J1DCONNECTOR94SWPB12SWPB35SWPB26855078550885509855010855011855012855013855014855015855016855017855018855019855
8、0208550218550P1P1P3P312345678910111213141516171819202122232425262728293031323334353637383940AT89S51S5150KRESTAPLEDLED附录2设计程序/主程序主要为各功能子程序提供运行平台,子程序分为显示程序,特效显示程序,/按键输入中断子程序/INCLUDE/INCLUDE/INCLUDEINCLUDE/INCLUDEDEFINECOUNT34DEFINEW0X01UNSIGNEDCHARBUFFERCOUNTUNSIGNEDCHARPOINTSBITA1P10/定义第一列对应端口SBITA2P
9、11/第二列SBITA3P14/第一行SBITA4P15/第二行SBITCLK_LP12/列移位时钟上升沿触发SBITCLEAR_LP13/列清除控制位低电平有效SBITCLK_HP16/行移位时钟SBITCLEAR_HP17/行清除控制位低电平有效SBITENP20SBITP21P21SBITOEP22/三态允许控制端低电平有效SBITLEP23/锁存允许端UNSIGNEDCHARCODEH1161,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,H2160,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0/分别暂存行(H)列(L)所要显示的数据UNSIGNEDCHAR
10、L1,L2,I,COMMAND,K,JCHARZ,L,M,N,XUNSIGNEDCHARDATAZIKU32UNSIGNEDCHARIDATASORT32UNSIGNEDINTDATATEMPUNSIGNEDCHARCODEBMP019/静态显示内容/源文件/文字寿宽高(像素)1616字模格式/大小单色点阵液晶字模,纵向取模,字节正序/32字节数据转换日期2007531162659/0X00,0X22,0X22,0X2A,0X2A,0X2A,0X2F,0XFA,0X2A,0X2A,0X2A,0X2B,0X2A,0X2A,0X22,0X00,0X04,0X04,0X08,0X10,0X20,0X
11、C0,0X20,0X5C,0X48,0X42,0X41,0XFE,0X40,0X40,0X40,0X00/串口中断程序/功能从PC机接收数据,当接收满34位后将接收到的数据发送回PC机/COM_INTERRUPTVOIDINTERRUPT4USING3UNSIGNEDCHARRECEIVR_BUFFERIFRI1RECEIVR_BUFFERSBUFRI0TI0IFPOINT0IFRECEIVR_BUFFERSPOINTELSEPOINT0IFPOINT0OE1LE1IFL10X00FORJ0J1L21OE0LE0DELAY110CLEAR_H0DELAY1CLEAR_H1/右移显示/功能使得L
12、ED产生画面右移得效果VOIDSDISPLAY_LEFTIFM0ZM30IFZ15L0Z0DISPLAYM/右移显示/功能使得LED产生画面右移得效果/VOIDSDISPLAY_RIGHTIFM1ZM30IFZ15L0Z0DISPLAYM/上移显示/功能使得LED产生画面上移得效果/VOIDSDISPLAY_UPZ0L1M0FORK0K8ZIKUNTEMPDODISPLAYMIFM50L0M0ELSEL1WHILEL/下移显示/功能使得LED产生画面下移得效果/VOIDSDISPLAY_DOWNZ0L1M0FORK0K1ZIKUN16TEMPTEMP8ZIKUNTEMPDODISPLAYMIF
13、M50L0M0ELSEL1WHILEL/主程序MAINEA1/允许启用外部中断EX01EX11IT00/外部中断为电平触发方式(低电平有效)P32为IT10/显示允许位P33为特效允许位ES1SCON0X58TMOD0X21TH10XFDTR11ET10ES1PS1EA1X1WHILE1IFX1FORL0L32LZIKULBMP019LELSEFORK0K32KZIKUKSORTKX1SWITCHCOMMANDCASELWHILEXSDISPLAY_LEFTCASERWHILEXSDISPLAY_RIGHTCASEUWHILEXFORK0K32KZIKUKSORTKSDISPLAY_UPCASEDWHILEXFORK0K32KZIKUKSORTKSDISPLAY_DOWNDEFAULTWHILEXDISPLAY附录3系统PCB图