Hallo zusammen,
ich möchte mir eine Tankanzeige für das Motorrad Basteln, bleibe aber am Programm hängen, das ich nicht zum laufen bekomme. Was habe ich falsch gemacht (Neuling).
Ich bitte um euere Hilfe.
Vielen Dank im VorausCode:$regfile = "m8def.dat" ' ATmega8 $crystal = 3686400 ' myAVR Board $baud = 4800 $hwstack = 60 $swstack = 60 $framesize = 60 '$sim Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portc.5 , E = Portc.1 , Rs = Portc.0 Config Timer1 = Counter , Edge = Falling Config Pind.5 = Input Set Portd.5 On Timer1 Timer1_isr Dim Count0 As Word Dim Count1 As Word Dim Count2 As Single Dim Count3 As Single Dim Verbr As String * 5 Dim Inh As String * 5 Cls Cursor Off Noblink Enable Timer1 Enable Interrupts '--------------------------------------------------------- Do Count1 = 45120 - Count0 Count2 = Count1 / 1880 'Geber 1880 Impulse/L Inh = Fusing(count2 , "#.##") Count3 = Count0 / 1880 Verbr = Fusing(count3 , "#.##") If Count2 > 10 Then Locate 1 , 1 Lcd "Inhalt: " ; Inh ; " L" Else Locate 1 , 1 Lcd "Inhalt: " ; Inh ; " L" End If If Count3 > 10 Then Locate 2 , 1 Lcd "Verbr.: " ; Verbr ; " L" Else Locate 2 , 1 Lcd "Verbr.: " ; Verbr ; " L" End If Waitms 500 Loop End '--------------------------------------------------------- Timer1_isr: Incr Count0 Return '---------------------------------------------------------
Gruß
Gerhard







					
					
					
						
Zitieren

Lesezeichen