Hi,
ich bin am verzweifeln mein kleines Prog geht einfach nich so wie ich will schaut mal drüber. wenn ich denn taster drück geht er nich in die schleife und wenn die taster dinger drausen sind wechsel die leds nicht. kann ich das vieleicht anders lösen und das is falsch oder bin ich nur zu "dumm".
Code:$regfile = "m8def.dat" $crystal = 4000000 $baud = 19200 Config Pinb.1 = Output Config Pinb.2 = Output Config Pind.6 = Input Config Pind.5 = Input Config Pinc.0 = Output Config Pinc.1 = Output Config Pinc.2 = Output Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Up , Prescale = 1024 Do Sound Portc.2 , 400 , 450 anfangs ein sound If Pind.6 = 1 Then taster abfrage Goto Vor End If Sound Portc.2 , 400 , 250 eine sound If Pind.5 = 1 Then und anderer taster Goto Zuruck End If Loop Und von vorne Vor: Compare1a = 100 motor leuft vor Portc.0 = 1 Waitms 50 Portc.1 = 0 Waitms 50 Zuruck: motor leuft zuruek Compare1a = 100 Portc.0 = 0 Waitms 50 Portc.1 = 1 Waitms 50 End
ich hoffe ihr könnt mir helfen oder es mir einfach besser zeigen.
das ich nicht die schönsten progs der welt schreibe weiss ich.
compliemirt habe ich ohne kommentare ins ja klar oder so .......
mfg m.r.







Zitieren

Lesezeichen