资源描述:
《公交车智能报站系统》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、#inccdeAreg51.hv/、(sr2^烟”灯弃4fcinc-udeAinMinshv#inc-ude・・source.h・・井defineLcdDaiaBus3二0BoSBsb二cdCslnP2>9二雷1•苗®船血殍・swssbiiLcdCs2HP2>士二番2、击曲书血殍、sbiiLcdRsHP2>JvsbiiLcdRwNP2>3-3爲俳m二dlr]j0^—棘sbitLcdEnnP2>4」-nwnplH0X09sbiikeyfP1>0;sbiikey2HPI>1;sbiiy=R2>5」voidReadLcdBusy(vo.d)二诙=.^=B'11K霍DB7
2、涉」程总voidwriteLcdcommand(unsignedcharva-ue)二丽LCD^<1>1SI^voidwriteLcdDaMunsignedcharva-ue)二、JI1]LCDg^®^'/unsignedcharReadLcdDas-(void)八、/iMLCD磬甫因磬voidseiLcdpage(unsignedcharva-ueh//i§5LCD列因錢voidseiLcdstarEne(unsignedcharva-ue)二、茹嘛LCD^^s^qIvoid8eiLcdstarlco-umn(unsignedcharva-ue「/、isBLCD
3、®^IJ^5_」voidseiLcdswioh(unsignedcharva-uexLCDl=n]^F來voidse-ec-Lcdscreen(unsignedcharva-ue「/、is¥LCD^WvoidclearLcdscreen(unsignedcharva-ue)八二训和voidInitLcd(void);//初始化LCDvoidDisplayHZ(unsignedcharScreen,unsignedcharPage,unsignedcharColumn,unsignedchar*point);〃显示汉字函数voiddelay10ms(void){un
4、signedchari,j;for(i=2000;i>0;i-)for(j=2000;j>0;j-);}voidmain(){unsignedchari,m,n;m=n=O;lnitLcd();〃初始12864aearLcdScreen(O);〃清屏SetLcdStartLine(O);while(1){aearLcdScreen(O);if(key1==0){delaylOms();if(key1==O){DisplayHZ(1,0,0,wen);DisplayHZ(1,0,1,li);DisplayHZ(1,0,2,xue);DisplayHZ(1,0,3,y
5、uan);DisplayHZ(2,0,0,jian);DisplayHZ(2,0,1,xia):DisplayHZ(2,0,2,nan);DisplayHZ(2,0,3,men);switch(n){case0:DisplayHZ(1,3,2,wen);DisplayHZ(1,3,3,li);DisplayHZ(2,3,0,xue);DisplayHZ(2,3,1,yuan);DisplayHZ(1,6,1,xia);DisplayHZ(1,6,2,yi);DisplayHZ(1,6,3,zhan);DisplayHZ(2,6,0,shi);DisplayHZ(2
6、,6,1,can);DisplayHZ(2,6,2,lian);n++;break;1:DisplayHZ(1,3,1,shi);DisplayHZ(1,3,2,can):DisplayHZ(1,3,3,lian);DisplayHZ(2,3,0,dao);DisplayHZ(2,3,1,le);DisplayHZ(1,6,1,xia);DisplayHZ(1,6,2,yi);DisplayHZ(1,6,3,zhan);DisplayHZ(2,6,0,shi);DisplayHZ(2,6,1,ren);DisplayHZ(2,6,2,da);n++;break;c
7、ase2:DisplayHZ(1,3,1,shi):DisplayHZ(1,3,2,ren):DisplayHZ(1,3,3,da);DisplayHZ(2,3,0,dao);DisplayHZ(2,3,1,le);DisplayHZ(1,6,1,xia);DisplayHZ(1,6,2,yi):DisplayHZ(1,6,3,zhan);DisplayHZ(2,6,0,shi);DisplayHZ(2,6,1,zheng);DisplayHZ(2,6,2,fu);n++;break;case3:DisplayHZ(1,3,1,shi);DisplayHZ(1,3
8、,2,zh