【正文】
************ write_inst(0x34); write_inst(0x36); clear_picture_fast(); display_picture1(); //顯示一幅個(gè)性化圖片 delay(100);//*********************************************************// 轉(zhuǎn)換為文本方式//********************************************************* write_inst(0x30); write_inst(0x0c); write_inst(0x01); write_inst(0x06);//*********************************************************// 顯示一幅個(gè)人信息//********************************************************* disp_log1(); delay(200); write_inst(0x01);//*********************************************************// 主程序循環(huán)開(kāi)始//********************************************************* while(1) { if(mode==0) //模式0: 顯示空車狀態(tài) { INTE=0; count=0; kongche(); } else if(mode==1) //模式1: { if(!flag) //標(biāo)志位為0時(shí) { INTE=0; //禁止中斷產(chǎn)生 write_inst(0x01); yingke(); //顯示歡迎界面 play(17,50); //播放“您好” play(18,5); //播放“歡迎” play(25,100); //播放“乘坐本公司出租汽車” delay(200); flag=1; write_inst(0x01); } else //標(biāo)志位為1時(shí) { INTE=1; //允許產(chǎn)生中斷 price(); //里程和費(fèi)率計(jì)算 zaike(); //進(jìn)入載客界面 } } else if(mode==2) //模式2: { INTE=0; //禁止中斷產(chǎn)生 if(!play_fg1) //標(biāo)志位為0時(shí) { daozhan(); //進(jìn)入到站界面 play(21,60); //播放“車已到站” delay(50); playsound_km(RunMil); //播放行使里程 delay(50); playsound_mn(Price); //播放應(yīng)付金額 play_fg1=1; //置標(biāo)志位為1 write_inst(0x01); } jieshu(); //進(jìn)入結(jié)束界面 if(!play_fg2) //標(biāo)志位為0時(shí) { play(24,100); //播放“請(qǐng)檢查您的隨身物品” play(18,5); //播放“歡迎” play(20,5); //播放“再次” play(25,100); //播放“乘坐本公司出租汽車” play(19,5); //播放“再見(jiàn)” play_fg2=1; //置標(biāo)志位為1 } } scankey(); //鍵盤(pán)掃描模塊 } } //*********************************************************// 費(fèi)率計(jì)算函數(shù)//*********************************************************void price() { if(RunMilege=2300) TotalPrice=700+PendingCharges; if((RunMilege2300)amp。amp。(RunMilege=35000)) TotalPrice=700+(RunMilege2300)*+PendingCharges; if(RunMilege35000) TotalPrice=700+(350002300)*+(RunMilege35000)*+PendingCharge; }//*********************************************************// 鍵盤(pán)處理程序//*********************************************************void scankey() { if(k2()) { bell(); if(mode==0x00) { mode=0x01; write_inst(0x01); } else if(mode==0x01) { flag=0; mode=0x02; write_inst(0x01); } } if(k4()) { bell(); if(mode==0x02) { flag=0; play_fg1=0; play_fg2=0; mode=0x00; write_inst(0x01); count=0; } } } *********************************************************附錄C 相關(guān)外文文獻(xiàn)及譯文Power Measurement Instruments Meter, a social possession of a considerable number of measurement instruments, it is a measure adopted within a certain period of time the cumulative value of the electricity meters. The universal application of the sensorhour meters, it is the people in 1889 in accordance with the Ferraris of Italy39。s first professor of inductionhour meters and principles of design made of, to the 19th century and formed a more plete induction of the basic Meter Manufacturing theory. So far, the sensorMeter manufacturing techniques have been fairly mature, low prices, durable, the average service life of more than 10 years. However, due to its principles and structure of factors such as constraints, it is necessary to further improve the measurement accuracy and expansion is limited. Power resources as a driving force in the national economy occupies a pivotal position, for a long time because of insufficient power supply capacity, highpower market supply and demand contradiction. At the same time many panies, there is a family of nonpayment of electricity problems. In addition, China39。s electricity sector is the most used of induction meters, the electricity sector is the supply of affordable electricity, the burden of the tariff table reproduced, electricity, such as the recovery of heavy labor. All these have has been unable to meet China39。s rapid socioeconomic development. As the market economy in depth, power supply enterprise management is necessary to achieve modernization, to the electronic power management, information technology development in the future development of the power management mode an inevitable trend. It is with electronic technology, puter technology, munications technology and the development of IC card technology, now have a smart card IC prepaid meters of the birth of the possible. IC Card Ammeter not only to achieve the electronic electricity charges, but also changed the first electricity charges after the unreasonable situation, so that power truly bee a modity, the change from passive to active, and improve electricity sales areas, a fundamental resolution of the Manual meterreading fees public consumption of timeconsuming defects, in particular, can eliminate tariff arrears and accelerate the return of electricity funds in order to achieve selfuser services, and improving the supply and demand relations, measures to promote electricity charges in a scientific management, a certain Social and economic benefits. With electricity demand growth and the increase of energy supply and d