久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 2212|回復: 1
打印 上一主題 下一主題
收起左側

求大神幫忙看下程序怎么改

[復制鏈接]
跳轉到指定樓層
樓主
ID:258066 發表于 2017-12-6 10:26 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
#include <reg52.h>
#include <intrins.h>
#define uint  unsigned int
#define uchar  unsigned char
#define ulong  unsigned long
#define LCD_DATA  P0
#define LCD_1602_DATA  LCD_DATA
code unsigned char View_Data[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f};
sbit LCD_RS=P2^5;
sbit LCD_RW=P2^6;
sbit LCD_E=P2^7;
sbit Maibo=P3^2;
sbit speaker=P2^4;
void lcd_1602_word(uchar Adress_Com,uchar Num_Adat,uchar *Adress_Data);
void delay5ms(void);
void LCD_WriteData(uchar LCD_1602_DATA);
void LCD_WriteCom(uchar LCD_1602_COM);
void Tim_Init();
void InitLcd();
void main()
{
  InitLcd();
  Tim_Init();
  lcd_1602_word(0x80,16,"Pulse Rate: ");
  TR0=1;
  TR1=1;
  While(1)
  {
    if(Key_Change)
        {
          Key_Change=0;
          View_Change=1;
          switch(Key_Value)
        }
        if(View_Change)
        {
          View_Change=0;
          if(stop==0)
          {
            if(View_Data[0]==0x30)
                View_Data[0]=' ';
          }
          else
          {
           View_Data[0]=' ';
           View_Data[1]=' ';
           View_Data[2]=' ';
          }
          switch(View_Con)
          }
          }
        }
        void Timel() interrupt 3
        {
          static uchar Key_Con,Maibo_Con;
          TH1=0xd8;
          TL1=0xf0;
          switch(Key_Con)
          {
           case 0:
           {
            
                }
           case 1:
           {
             
           }
           case 2:
           {
                 
           }
      }
          switch(Maibo_Con)
          {
           case 0:
           {
             
           }
           case 4:
           {
            
           }
          }
        }
void lcd_1602_word(uchar Adress_Com,uchar Num_Adat,uchar *Adress_Data)
{
uchar a=0;
uchar Data_Word;
LCD_WriteCom(Adress_Com);
for(a=0;a<Num_Adat;a++)
{
  Data_Word=*Adress_Data;
  LCD_WriteData(Data_Word);
  Adress_Data++;
}
}
void LCD_WriteData(uchar LCD_1602_DATA)
{
  delay5ms();
  LCD_E=0;
  LCD_RS=1;
  LCD_RW=0;
  _nop_();
  LCD_E=1;
  LCD_DATA=LCD_1602_DATA;
  LCD_E=0;
  LCD_RS=0;
}
void LCD_WriteCom(uchar LCD_1602_COM)
{
delay5ms();
LCD_E=0;
LCD_RS=0;
LCD_RW=0;
_nop_();
LCD_E=1;
LCD_DATA=LCD_1602_DATA;
LCD_E=0;
LCD_RS=0;
}
void InitLcd()
{
delay5ms();
delay5ms();
LCD_WriteCom(0x38);
LCD_WriteCom(0x38);
LCD_WriteCom(0x38);
LCD_WriteCom(0x06);
LCD_WriteCom(0x0c);
LCD_WriteCom(0x01);
delay5ms();
delay5ms();
}
報錯:
yjxs.c(27): warning C206: 'While': missing function-prototype
yjxs.c(27): error C267: 'While': requires ANSI-style prototype
yjxs.c(28): error C141: syntax error near '{'
yjxs.c(29): error C202: 'Key_Change': undefined identifier
yjxs.c(31): error C202: 'Key_Change': undefined identifier
yjxs.c(32): error C202: 'View_Change': undefined identifier
yjxs.c(33): error C202: 'Key_Value': undefined identifier
yjxs.c(34): error C141: syntax error near '}'
yjxs.c(35): error C202: 'View_Change': undefined identifier
yjxs.c(37): error C202: 'View_Change': undefined identifier
yjxs.c(38): error C202: 'stop': undefined identifier
yjxs.c(49): error C202: 'View_Con': undefined identifier
yjxs.c(50): error C141: syntax error near '}'
Target not created

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享淘帖 頂 踩
回復

使用道具 舉報

沙發
ID:149988 發表于 2017-12-6 19:04 | 只看該作者

RE: 求大神幫忙看下程序怎么改

報警:Pro_main.C(27): error C267: 'While': requires ANSI-style prototype是因為While(1)中w用了大寫W應該w。
Pro_main.C(29): error C202: 'Key_Change': undefined identifier中 'Key_Change'沒有定義。
Pro_main.C(32): error C202: 'View_Change': undefined identifier中View_Change沒有定義。
Pro_main.C(33): error C202: 'Key_Value': undefined identifier中Key_Value沒有定義
Pro_main.C(34): error C141: syntax error near '}'中switch(Key_Value)應用不當
Pro_main.C(35): error C202: 'View_Change': undefined identifier中View_Change沒有定義
沒有定義
Pro_main.C(38): error C202: 'stop': undefined identifier中stop'沒有定義
Pro_main.C(41): error C183: unmodifiable lvalue中View_Data[0]==0x30錯誤
Pro_main.C(45): error C183: unmodifiable lvalue中View_Data[0]==0x30錯誤
Pro_main.C(46): error C183: unmodifiable lvalue中View_Data[0]==0x30錯誤
Pro_main.C(47): error C183: unmodifiable lvalue中View_Data[0]==0x30錯誤
Pro_main.C(49): error C202: 'View_Con': undefined identifier中View_Con'沒有定義
Pro_main.C(50): error C141: syntax error near '}'中switch(View_Con)應用錯誤
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 91视频在线网站 | 在线视频一区二区 | 一区二区日本 | 亚洲人精品午夜 | av网站在线播放 | 天堂综合网久久 | 中文字幕综合在线 | 天天操天天舔 | 一级黄色夫妻生活 | av香蕉 | 在线观看av中文字幕 | 91精品国产综合久久久动漫日韩 | 久久69精品久久久久久久电影好 | 精品中文在线 | 日韩精品一区二区久久 | 久久久久久国产精品 | 日本一区二区三区四区 | 四虎影院新地址 | 亚洲风情在线观看 | 午夜伦理影院 | 91深夜福利视频 | 日韩不卡视频在线 | 久久国内精品 | 欧美精品一区二区三区四区 在线 | 久久国产精品视频 | 欧美精品欧美精品系列 | 国产精品久久久久久238 | yiren22综合网成人 | 国产精品久久久久久二区 | 久久一区二区免费视频 | 欧美在线观看一区 | 成人三级视频 | 欧美在线一区二区三区 | 欧美一级三级 | 成人精品视频在线 | 成人免费观看视频 | yeyeav| av在线播放不卡 | 亚洲二区精品 | www.夜夜骑 | 美女黄网 |