【正文】
位滅 } if((speed220000)amp。amp。(speed260000)) //速度1:20km/h60km/h { PWME|=0x08。 //使能PWM1 PORTB=PORTBamp。0x0f。 //PB高四位亮 } else { PWMEamp。=0xf7。 //關(guān)閉PWM02 PORTB=PORTB|0xf0。 //PB高四位滅 } } } //判斷速度pragma CODE_SEG __NEAR_SEG NON_BANKED //中斷處理void interrupt 66 PIT0Interrupt() //PIT中斷計(jì)時(shí){ _asm(MOVB $01,PITTF)。 EnableInterrupts。 F1=s1。 F2=s2。 s1=0。 s2=0。 }include include { byte i=8。 LCD_Data_Out amp。= ~LCD_CS。 LCD_Data_Outamp。=~LCD_SCL。 while(i) { if(dataamp。0x80) {LCD_Data_Out|=LCD_SDA。} else {LCD_Data_Outamp。=~LCD_SDA。} LCD_Data_Out|=LCD_SCL。 asm(nop)。 } LCD_Data_Out |= LCD_CS。 }void LCD_WrCmd(byte cmd){ byte i=8。 LCD_Data_Out amp。= ~LCD_CS。 LCD_Data_Outamp。=~LCD_SCL。while(i) { if(cmdamp。0x80){LCD_Data_Out|=LCD_SDA。} else{LCD_Data_Outamp。=~LCD_SDA。} LCD_Data_Outamp。=~LCD_SCL。 cmd=1。 } LCD_Data_Out |= LCD_CS。 }void LCD_Set_Pos(byte x, byte y){ LCD_WrCmd(0xb0+y)。 LCD_WrCmd((xamp。0x0f)|0x01)。 } void LCD_Fill(byte bmp_data){ byte y,x。 for(y=0。y8。y++) { LCD_WrCmd(0xb0+y)。 for(x=0。xX_WIDTH。x++) LCD_WrDat(bmp_data)。 }}void LCD_CLS(void){ byte y,x。 for(y=0。y8。y++) { for(x=0。xX_WIDTH。x++) LCD_WrDat(0)。 }}void LCD_DLY_ms(word ms){ word a。 while(ms) { a=1335。 while(a)。 ms。 } return。}void LCD_Init(void) { LCD_Data_Dir |= 0xff。 LCD_Data_Out |= LCD_SCL+LCD_CS。 //預(yù)制SLK和CS為高電平 LCD_DLY_ms(20)。 LCD_WrCmd(0xaf)。 //0xaf LCD On 10101111 LCD_Fill(0x00)。 //初始清屏} void LCD_PutPixel(byte x,byte y){ byte data1。 //data1當(dāng)前點(diǎn)的數(shù)據(jù) LCD_Set_Pos(x,y)。 LCD_WrCmd(0xb0+(y3))。 LCD_WrDat(data1)。 }void LCD_P8x16Str(byte x,byte y,byte ch[]){ byte c=0,i=0,j=0。 while (ch[j]!=39。\039。)} LCD_Set_Pos(x , y)。 for(wm = 0。wm 14。wm++) { LCD_WrDat(F14x16[adder])。 adder += 1。 } LCD_Set_Pos(x,y + 1)。 for(wm = 0。wm 14。wm++) { LCD_WrDat(F14x16[adder])。 adder += 1。 } } else //顯示空白字符 { ii += 1。 LCD_Set_Pos(x,y)。 for(wm = 0。wm 16。wm++) { LCD_WrDat(0)。 } LCD_Set_Pos(x,y + 1)。 for(wm = 0。wm 16。wm++) { LCD_WrDat(0)。 } } x += 14。 ii += 2。 }}void LCD_Print(byte x, byte y, byte ch[]){ byte ch2[3]。 while(ch[ii] != 39。\039。) { if(ch[ii] 127) { ch2[0] = ch[ii]。 ch2[1] = ch[ii + 1]。 LCD_P14x16Str(x , y, ch2)。 //顯示漢字 x += 14。 ii += 2。 } else { ch2[0] = ch[ii]。 ch2[1] = 39。\039。 //字母占一個(gè)字節(jié) LCD_P8x16Str(x , y , ch2)。 //顯示字母 x += 8。 ii+= 1。 } }} void ShowSpeed(unsigned char x,unsigned char y,dword Show_D){byte Results[11]=。 byte ERROR[11] =Limited 。 dword Temp,temp_Dat。 temp_Dat=Show_D。 Results[0]=(byte)(Temp/10000+39。039。)。 Results[1]=(byte)(Temp/1000+39。039。)。 Results[2]=39。.39。 Results[3]=(byte)(Temp/100+39。039。)。 { //Results=amp。ERROR[0]。 LCD_P8x16Str(x,y,ERROR)。 } else { if(temp_Dat9999) //去零顯示 { Results[0]=39。 39。 } LCD_P8x16Str(x,y,Results)。 }}輸入輸出電路運(yùn)算電路運(yùn)算電路穩(wěn)壓電源電源監(jiān)控電路故障存儲(chǔ)電路繼電器驅(qū)動(dòng)電路電磁閥控制電路電磁閥控制電路繼電器電源信號(hào)輸出輪速傳感器信號(hào)輸出外部通信線路報(bào)警燈繼電器電磁閥(左前)電磁閥后電磁閥右前外部控制電源圖1系統(tǒng)構(gòu)成圖圖2 MC9S12XS單片機(jī)芯片圖3 ABS在整車(chē)上的布置g an employment tribunal claiEmployment tribunals sort out disagreements between employers and employees.You may need to make a claim to an employment tribunal if: you don39。t agree with the disciplinary action your employer has taken against you your employer dismisses you and you think that you have been dismissed unfairly.For more information about dismissal and unfair dismissal, seeDismissal.You can make a claim to an employment tribunal, even if you haven39。tappealedagainst the disciplinary action your employer has taken against you. However, if you win your case, the tribunal may reduce any pensation awarded to you as a result of your failure to appeal.Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are plaining about happened. If your application is received after this time limit, the tribunal will not usually accept i.If you are worried about how the time limits apply to you, take advice from one of the organisations listed underFurther help.Employment tribunals are less formal than some other courts, but it is still a legal process and you will need to give evidence under an oath or affirmation.Most people find making a claim to an employment tribunal challenging. If you are thinking about making a claim to an employment tribunal, you should get help straight away from one of the organisations listed underFurther help.If you are being represented by a solicitor at the tribunal, they may ask you to sign an agreement where you pay their fee out of your pensation if you win the case. This is known as adamagesbased agreement. In England and Wales, your solicitor can39。t charge you more than 35% of your pensation if you win the case.If you are thinking about signing up for a damagesbased agreement, you should make sure you39。re clear about the terms of the agreement. It might be best to get advice from an experienced adviser, for example, at a Citizens Advice Bureau. To find your nearest CAB, including those that give advice by , click onnearest CAB.For more information about making a claim to an employment tribunal, seeEmployment tribunals.The (lack of) air up there Watch mCaym